initial commit
This commit is contained in:
21
public/scripts/jquery/src/selector/contains.js
vendored
Normal file
21
public/scripts/jquery/src/selector/contains.js
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
define( [
|
||||
"../core"
|
||||
], function( jQuery ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
// Note: an element does not contain itself
|
||||
jQuery.contains = function( a, b ) {
|
||||
var bup = b && b.parentNode;
|
||||
|
||||
return a === bup || !!( bup && bup.nodeType === 1 && (
|
||||
|
||||
// Support: IE 9 - 11+
|
||||
// IE doesn't have `contains` on SVG.
|
||||
a.contains ?
|
||||
a.contains( bup ) :
|
||||
a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
|
||||
) );
|
||||
};
|
||||
|
||||
} );
|
31
public/scripts/jquery/src/selector/escapeSelector.js
vendored
Normal file
31
public/scripts/jquery/src/selector/escapeSelector.js
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
define( [
|
||||
"../core"
|
||||
], function( jQuery ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
// CSS string/identifier serialization
|
||||
// https://drafts.csswg.org/cssom/#common-serializing-idioms
|
||||
var rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;
|
||||
|
||||
function fcssescape( ch, asCodePoint ) {
|
||||
if ( asCodePoint ) {
|
||||
|
||||
// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER
|
||||
if ( ch === "\0" ) {
|
||||
return "\uFFFD";
|
||||
}
|
||||
|
||||
// Control characters and (dependent upon position) numbers get escaped as code points
|
||||
return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " ";
|
||||
}
|
||||
|
||||
// Other potentially-special ASCII characters get backslash-escaped
|
||||
return "\\" + ch;
|
||||
}
|
||||
|
||||
jQuery.escapeSelector = function( sel ) {
|
||||
return ( sel + "" ).replace( rcssescape, fcssescape );
|
||||
};
|
||||
|
||||
} );
|
Reference in New Issue
Block a user