MCPcopy Create free account
hub / github.com/nwutils/nw-sample-apps / computePixelPositionAndBoxSizingReliable

Function computePixelPositionAndBoxSizingReliable

camera/jquery.js:5610–5625  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5608 // Executing both pixelPosition & boxSizingReliable tests require only one layout
5609 // so they're executed at the same time to save the second computation.
5610 function computePixelPositionAndBoxSizingReliable() {
5611 div.style.cssText =
5612 // Support: Firefox<29, Android 2.3
5613 // Vendor-prefix box-sizing
5614 "-webkit-box-sizing:border-box;-moz-box-sizing:border-box;" +
5615 "box-sizing:border-box;display:block;margin-top:1%;top:1%;" +
5616 "border:1px;padding:1px;width:4px;position:absolute";
5617 div.innerHTML = "";
5618 docElem.appendChild( container );
5619
5620 var divStyle = window.getComputedStyle( div, null );
5621 pixelPositionVal = divStyle.top !== "1%";
5622 boxSizingReliableVal = divStyle.width === "4px";
5623
5624 docElem.removeChild( container );
5625 }
5626
5627 // Support: node.js jsdom
5628 // Don't assume that getComputedStyle is a property of the global object

Callers 1

jquery.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected