Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F95326405
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
Sat, Dec 14, 18:14
Size
365 B
Mime Type
text/x-java
Expires
Mon, Dec 16, 18:14 (1 d, 10 h)
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