Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F95057389
width.js
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Dec 12, 12:52
Size
365 B
Mime Type
text/x-java
Expires
Sat, Dec 14, 12:52 (2 d)
Engine
blob
Format
Raw Data
Handle
22922487
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
width.js
View Options
import getWindow from './isWindow';
import offset from './offset';
/**
* Returns the width of a given element.
*
* @param node the element
* @param client whether to use `clientWidth` if possible
*/
export default function getWidth(node, client) {
var win = getWindow(node);
return win ? win.innerWidth : client ? node.clientWidth : offset(node).width;
}
Event Timeline
Log In to Comment