MCPcopy Create free account
hub / github.com/JsAaron/jQuery / computePixelPositionAndBoxSizingReliable

Function computePixelPositionAndBoxSizingReliable

2.1.1/test/jquery-2.1.1.js:5609–5624  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

jquery-2.1.1.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected