Commit 3c64f4d2 authored by alexey.musinov's avatar alexey.musinov

mobile js exception

parent f6ecc5f3
...@@ -109,10 +109,10 @@ jQuery.fn = jQuery.prototype = { ...@@ -109,10 +109,10 @@ jQuery.fn = jQuery.prototype = {
return this; return this;
} }
if ( jQuery.isFunction( selector ) ) { if ( jQuery.isFunction( selector ) ) {
return rootjQuery.ready( selector ); return rootjQuery.ready( selector );
} }
return jQuery.makeArray( _null_object, this ); return jQuery.makeArray( _null_object, this );
}, },
...@@ -4683,34 +4683,35 @@ var makeArray = function( array, results ) { ...@@ -4683,34 +4683,35 @@ var makeArray = function( array, results ) {
// converting a NodeList to an array using builtin methods. // converting a NodeList to an array using builtin methods.
// Also verifies that the returned array holds DOM nodes // Also verifies that the returned array holds DOM nodes
// (which is not the case in the Blackberry browser) // (which is not the case in the Blackberry browser)
try { //try {
Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType; // Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType;
//
// Provide a fallback method if it does not work //// Provide a fallback method if it does not work
} catch( e ) { //} catch( e ) {
makeArray = function( array, results ) { // makeArray = function( array, results ) {
var i = 0, // var i = 0,
ret = results || []; // ret = results || [];
//
if ( toString.call(array) === "[object Array]" ) { // if ( toString.call(array) === "[object Array]" ) {
Array.prototype.push.apply( ret, array ); // Array.prototype.push.apply( ret, array );
//
} else { // } else {
if ( typeof array.length === "number" ) { // if ( typeof array.length === "number" ) {
for ( var l = array.length; i < l; i++ ) { // for ( var l = array.length; i < l; i++ ) {
ret.push( array[i] ); // ret.push( array[i] );
} // }
//
} else { // } else {
for ( ; array[i]; i++ ) { // for ( ; array[i]; i++ ) {
ret.push( array[i] ); // ret.push( array[i] );
} // }
} // }
} // }
//
// return ret;
// };
//}
return ret;
};
}
var sortOrder, siblingCheck; var sortOrder, siblingCheck;
...@@ -5993,38 +5994,38 @@ function cloneFixAttributes( src, dest ) { ...@@ -5993,38 +5994,38 @@ function cloneFixAttributes( src, dest ) {
} }
jQuery.buildFragment = function( args, nodes, scripts ) { jQuery.buildFragment = function( args, nodes, scripts ) {
var fragment, cacheable, cacheresults, doc, var fragment, cacheable, cacheresults, doc,
first = args[ 0 ]; first = args[ 0 ];
doc = document; doc = document;
// Only cache "small" (1/2 KB) HTML strings that are associated with the main document // Only cache "small" (1/2 KB) HTML strings that are associated with the main document
// Cloning options loses the selected state, so don't cache them // Cloning options loses the selected state, so don't cache them
// IE 6 doesn't like it when you put <object> or <embed> elements in a fragment // IE 6 doesn't like it when you put <object> or <embed> elements in a fragment
// Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache // Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache
// Lastly, IE6,7,8 will not correctly reuse cached fragments that were created from unknown elems #10501 // Lastly, IE6,7,8 will not correctly reuse cached fragments that were created from unknown elems #10501
if ( args.length === 1 && typeof first === "string" && first.length < 512 && doc === document && if ( args.length === 1 && typeof first === "string" && first.length < 512 && doc === document &&
first.charAt(0) === "<" && !rnocache.test( first ) && first.charAt(0) === "<" && !rnocache.test( first ) &&
(jQuery.support.checkClone || !rchecked.test( first )) && (jQuery.support.checkClone || !rchecked.test( first )) &&
(jQuery.support.html5Clone || !rnoshimcache.test( first )) ) { (jQuery.support.html5Clone || !rnoshimcache.test( first )) ) {
cacheable = true; cacheable = true;
cacheresults = jQuery.fragments[ first ]; cacheresults = jQuery.fragments[ first ];
if ( cacheresults && cacheresults !== 1 ) { if ( cacheresults && cacheresults !== 1 ) {
fragment = cacheresults; fragment = cacheresults;
} }
} }
if ( !fragment ) { if ( !fragment ) {
fragment = doc.createDocumentFragment(); fragment = doc.createDocumentFragment();
jQuery.clean( args, doc, fragment, scripts ); jQuery.clean( args, doc, fragment, scripts );
} }
if ( cacheable ) { if ( cacheable ) {
jQuery.fragments[ first ] = cacheresults ? fragment : 1; jQuery.fragments[ first ] = cacheresults ? fragment : 1;
} }
return { fragment: fragment, cacheable: cacheable }; return { fragment: fragment, cacheable: cacheable };
}; };
...@@ -8995,4 +8996,4 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) { ...@@ -8995,4 +8996,4 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
})( window ); })( window );
var jQuery = window.jQuery; var jQuery = window.jQuery;
var $ = window.$; var $ = window.$;
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment