mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-04-03 22:30:31 +00:00
use existing elem instead of creating a new one.
This commit is contained in:
parent
323601ad25
commit
845dc1ef73
1 changed files with 5 additions and 6 deletions
|
|
@ -29,13 +29,12 @@ function propExists( prop ) {
|
|||
|
||||
// Thanks to Modernizr src for this test idea
|
||||
function transform3dTest() {
|
||||
var prop = "transform-3d",
|
||||
div = document.createElement('div');
|
||||
var prop = "transform-3d";
|
||||
|
||||
div.setAttribute('style', '-moz-perspective: 100px');
|
||||
/* Android 2.3 (at least) returns a positive for 3D-specific properties—`perspective`, `perspective-origin`, `backface-visibility`—necessitating the preceeding approach to pass FF10+.
|
||||
TODO: This method of creating an element, setting a style attribute, then grabbing the result is used in a few places now. We should probably look into globalizing it, a la Modernizr. */
|
||||
return div.style.MozPerspective !== undefined || $.mobile.media( "(-" + vendors.join( "-" + prop + "),(-" ) + "-" + prop + "),(" + prop + ")" );
|
||||
fakeBody[ 0 ].setAttribute('style', '-moz-perspective: 100px');
|
||||
// Android 2.3 (at least) returns a positive for 3D-specific properties—`perspective`, `perspective-origin`, `backface-visibility`—necessitating the preceeding approach to pass FF10+.
|
||||
// We should continue to look at ways to include other platforms as 3D support improves. IE10, for example.
|
||||
return fakeBody[ 0 ].style.MozPerspective !== undefined || $.mobile.media( "(-" + vendors.join( "-" + prop + "),(-" ) + "-" + prop + "),(" + prop + ")" );
|
||||
}
|
||||
|
||||
// Test for dynamic-updating base tag support ( allows us to avoid href,src attr rewriting )
|
||||
|
|
|
|||
Loading…
Reference in a new issue