diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2016-01-16 18:31:17 +0100 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2016-01-16 18:31:17 +0100 |
commit | c39799d24b7610f3dd0f5c718ac4fce77f25db25 (patch) | |
tree | 2e4253fcf0e628f1c0688dfb0a85203f0a3aaaf2 /js/vendor/jquery/src/css/defaultDisplay.js | |
parent | f7d566c54c8cb80dc5425eb8d7d48ea02196bf7e (diff) |
udpate js client deps
Diffstat (limited to 'js/vendor/jquery/src/css/defaultDisplay.js')
-rw-r--r-- | js/vendor/jquery/src/css/defaultDisplay.js | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/js/vendor/jquery/src/css/defaultDisplay.js b/js/vendor/jquery/src/css/defaultDisplay.js index 046ae91b9..b1fb5774d 100644 --- a/js/vendor/jquery/src/css/defaultDisplay.js +++ b/js/vendor/jquery/src/css/defaultDisplay.js @@ -1,27 +1,29 @@ -define([ +define( [ "../core", + "../var/document", "../manipulation" // appendTo -], function( jQuery ) { +], function( jQuery, document ) { var iframe, - elemdisplay = {}; + elemdisplay = { + + // Support: Firefox + // We have to pre-define these values for FF (#10227) + HTML: "block", + BODY: "block" + }; /** * Retrieve the actual display of a element * @param {String} name nodeName of the element * @param {Object} doc Document object */ + // Called only from within defaultDisplay function actualDisplay( name, doc ) { - var style, - elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), + var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), - // getDefaultComputedStyle might be reliably used only on attached element - display = window.getDefaultComputedStyle && ( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ? - - // Use of this method is a temporary fix (more like optimization) until something better comes along, - // since it was removed from specification and supported only in FF - style.display : jQuery.css( elem[ 0 ], "display" ); + display = jQuery.css( elem[ 0 ], "display" ); // We don't have any data stored on the element, // so use "detach" method as fast way to get rid of the element @@ -45,7 +47,8 @@ function defaultDisplay( nodeName ) { if ( display === "none" || !display ) { // Use the already-created iframe if possible - iframe = (iframe || jQuery( "<iframe frameborder='0' width='0' height='0'/>" )).appendTo( doc.documentElement ); + iframe = ( iframe || jQuery( "<iframe frameborder='0' width='0' height='0'/>" ) ) + .appendTo( doc.documentElement ); // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse doc = iframe[ 0 ].contentDocument; @@ -66,5 +69,4 @@ function defaultDisplay( nodeName ) { } return defaultDisplay; - -}); +} ); |