mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Move createSafeFragment to the top to satisfy lint
This commit is contained in:
parent
3661835101
commit
a74cbb2b91
@ -1,5 +1,22 @@
|
|||||||
(function( jQuery ) {
|
(function( jQuery ) {
|
||||||
|
|
||||||
|
function createSafeFragment( document ) {
|
||||||
|
var nodeNames = (
|
||||||
|
"abbr article aside audio canvas datalist details figcaption figure footer " +
|
||||||
|
"header hgroup mark meter nav output progress section summary time video"
|
||||||
|
).split( " " ),
|
||||||
|
safeFrag = document.createDocumentFragment();
|
||||||
|
|
||||||
|
if ( safeFrag.createElement ) {
|
||||||
|
while ( nodeNames.length ) {
|
||||||
|
safeFrag.createElement(
|
||||||
|
nodeNames.pop()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return safeFrag;
|
||||||
|
}
|
||||||
|
|
||||||
var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
|
var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
|
||||||
rleadingWhitespace = /^\s+/,
|
rleadingWhitespace = /^\s+/,
|
||||||
rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,
|
rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,
|
||||||
@ -777,21 +794,4 @@ function evalScript( i, elem ) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function createSafeFragment( document ) {
|
|
||||||
var nodeNames = (
|
|
||||||
"abbr article aside audio canvas datalist details figcaption figure footer " +
|
|
||||||
"header hgroup mark meter nav output progress section summary time video"
|
|
||||||
).split( " " ),
|
|
||||||
safeFrag = document.createDocumentFragment();
|
|
||||||
|
|
||||||
if ( safeFrag.createElement ) {
|
|
||||||
while ( nodeNames.length ) {
|
|
||||||
safeFrag.createElement(
|
|
||||||
nodeNames.pop()
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return safeFrag;
|
|
||||||
}
|
|
||||||
|
|
||||||
})( jQuery );
|
})( jQuery );
|
||||||
|
Loading…
Reference in New Issue
Block a user