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

mobile js exception

parent f6ecc5f3
......@@ -109,10 +109,10 @@ jQuery.fn = jQuery.prototype = {
return this;
}
if ( jQuery.isFunction( selector ) ) {
return rootjQuery.ready( selector );
}
if ( jQuery.isFunction( selector ) ) {
return rootjQuery.ready( selector );
}
return jQuery.makeArray( _null_object, this );
},
......@@ -4683,34 +4683,35 @@ var makeArray = function( array, results ) {
// converting a NodeList to an array using builtin methods.
// Also verifies that the returned array holds DOM nodes
// (which is not the case in the Blackberry browser)
try {
Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType;
// Provide a fallback method if it does not work
} catch( e ) {
makeArray = function( array, results ) {
var i = 0,
ret = results || [];
if ( toString.call(array) === "[object Array]" ) {
Array.prototype.push.apply( ret, array );
} else {
if ( typeof array.length === "number" ) {
for ( var l = array.length; i < l; i++ ) {
ret.push( array[i] );
}
} else {
for ( ; array[i]; i++ ) {
ret.push( array[i] );
}
}
}
//try {
// Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType;
//
//// Provide a fallback method if it does not work
//} catch( e ) {
// makeArray = function( array, results ) {
// var i = 0,
// ret = results || [];
//
// if ( toString.call(array) === "[object Array]" ) {
// Array.prototype.push.apply( ret, array );
//
// } else {
// if ( typeof array.length === "number" ) {
// for ( var l = array.length; i < l; i++ ) {
// ret.push( array[i] );
// }
//
// } else {
// for ( ; array[i]; i++ ) {
// ret.push( array[i] );
// }
// }
// }
//
// return ret;
// };
//}
return ret;
};
}
var sortOrder, siblingCheck;
......@@ -5993,38 +5994,38 @@ function cloneFixAttributes( src, dest ) {
}
jQuery.buildFragment = function( args, nodes, scripts ) {
var fragment, cacheable, cacheresults, doc,
first = args[ 0 ];
doc = 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
// 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
// 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 &&
first.charAt(0) === "<" && !rnocache.test( first ) &&
(jQuery.support.checkClone || !rchecked.test( first )) &&
(jQuery.support.html5Clone || !rnoshimcache.test( first )) ) {
cacheable = true;
cacheresults = jQuery.fragments[ first ];
if ( cacheresults && cacheresults !== 1 ) {
fragment = cacheresults;
}
}
if ( !fragment ) {
fragment = doc.createDocumentFragment();
jQuery.clean( args, doc, fragment, scripts );
}
if ( cacheable ) {
jQuery.fragments[ first ] = cacheresults ? fragment : 1;
}
var fragment, cacheable, cacheresults, doc,
first = args[ 0 ];
doc = 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
// 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
// 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 &&
first.charAt(0) === "<" && !rnocache.test( first ) &&
(jQuery.support.checkClone || !rchecked.test( first )) &&
(jQuery.support.html5Clone || !rnoshimcache.test( first )) ) {
cacheable = true;
cacheresults = jQuery.fragments[ first ];
if ( cacheresults && cacheresults !== 1 ) {
fragment = cacheresults;
}
}
if ( !fragment ) {
fragment = doc.createDocumentFragment();
jQuery.clean( args, doc, fragment, scripts );
}
if ( cacheable ) {
jQuery.fragments[ first ] = cacheresults ? fragment : 1;
}
return { fragment: fragment, cacheable: cacheable };
};
......@@ -8995,4 +8996,4 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
})( window );
var jQuery = window.jQuery;
var $ = window.$;
\ No newline at end of file
var $ = window.$;
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