summaryrefslogtreecommitdiffstats
path: root/js/vendor/jquery/src/manipulation
diff options
context:
space:
mode:
Diffstat (limited to 'js/vendor/jquery/src/manipulation')
-rw-r--r--js/vendor/jquery/src/manipulation/_evalUrl.js10
-rw-r--r--js/vendor/jquery/src/manipulation/buildFragment.js102
-rw-r--r--js/vendor/jquery/src/manipulation/createSafeFragment.js20
-rw-r--r--js/vendor/jquery/src/manipulation/getAll.js21
-rw-r--r--js/vendor/jquery/src/manipulation/setGlobalEval.js20
-rw-r--r--js/vendor/jquery/src/manipulation/support.js13
-rw-r--r--js/vendor/jquery/src/manipulation/var/nodeNames.js5
-rw-r--r--js/vendor/jquery/src/manipulation/var/rcheckableType.js6
-rw-r--r--js/vendor/jquery/src/manipulation/var/rleadingWhitespace.js3
-rw-r--r--js/vendor/jquery/src/manipulation/var/rscriptType.js3
-rw-r--r--js/vendor/jquery/src/manipulation/var/rtagName.js3
-rw-r--r--js/vendor/jquery/src/manipulation/wrapMap.js27
12 files changed, 220 insertions, 13 deletions
diff --git a/js/vendor/jquery/src/manipulation/_evalUrl.js b/js/vendor/jquery/src/manipulation/_evalUrl.js
index 6704749ae..85ca2c62a 100644
--- a/js/vendor/jquery/src/manipulation/_evalUrl.js
+++ b/js/vendor/jquery/src/manipulation/_evalUrl.js
@@ -1,18 +1,20 @@
-define([
+define( [
"../ajax"
], function( jQuery ) {
jQuery._evalUrl = function( url ) {
- return jQuery.ajax({
+ return jQuery.ajax( {
url: url,
+
+ // Make this explicit, since user can override this through ajaxSetup (#11264)
type: "GET",
dataType: "script",
async: false,
global: false,
"throws": true
- });
+ } );
};
return jQuery._evalUrl;
-});
+} );
diff --git a/js/vendor/jquery/src/manipulation/buildFragment.js b/js/vendor/jquery/src/manipulation/buildFragment.js
new file mode 100644
index 000000000..cfdd1c0e6
--- /dev/null
+++ b/js/vendor/jquery/src/manipulation/buildFragment.js
@@ -0,0 +1,102 @@
+define( [
+ "../core",
+ "./var/rtagName",
+ "./var/rscriptType",
+ "./wrapMap",
+ "./getAll",
+ "./setGlobalEval"
+], function( jQuery, rtagName, rscriptType, wrapMap, getAll, setGlobalEval ) {
+
+var rhtml = /<|&#?\w+;/;
+
+function buildFragment( elems, context, scripts, selection, ignored ) {
+ var elem, tmp, tag, wrap, contains, j,
+ fragment = context.createDocumentFragment(),
+ nodes = [],
+ i = 0,
+ l = elems.length;
+
+ for ( ; i < l; i++ ) {
+ elem = elems[ i ];
+
+ if ( elem || elem === 0 ) {
+
+ // Add nodes directly
+ if ( jQuery.type( elem ) === "object" ) {
+
+ // Support: Android<4.1, PhantomJS<2
+ // push.apply(_, arraylike) throws on ancient WebKit
+ jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
+
+ // Convert non-html into a text node
+ } else if ( !rhtml.test( elem ) ) {
+ nodes.push( context.createTextNode( elem ) );
+
+ // Convert html into DOM nodes
+ } else {
+ tmp = tmp || fragment.appendChild( context.createElement( "div" ) );
+
+ // Deserialize a standard representation
+ tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase();
+ wrap = wrapMap[ tag ] || wrapMap._default;
+ tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];
+
+ // Descend through wrappers to the right content
+ j = wrap[ 0 ];
+ while ( j-- ) {
+ tmp = tmp.lastChild;
+ }
+
+ // Support: Android<4.1, PhantomJS<2
+ // push.apply(_, arraylike) throws on ancient WebKit
+ jQuery.merge( nodes, tmp.childNodes );
+
+ // Remember the top-level container
+ tmp = fragment.firstChild;
+
+ // Ensure the created nodes are orphaned (#12392)
+ tmp.textContent = "";
+ }
+ }
+ }
+
+ // Remove wrapper from fragment
+ fragment.textContent = "";
+
+ i = 0;
+ while ( ( elem = nodes[ i++ ] ) ) {
+
+ // Skip elements already in the context collection (trac-4087)
+ if ( selection && jQuery.inArray( elem, selection ) > -1 ) {
+ if ( ignored ) {
+ ignored.push( elem );
+ }
+ continue;
+ }
+
+ contains = jQuery.contains( elem.ownerDocument, elem );
+
+ // Append to fragment
+ tmp = getAll( fragment.appendChild( elem ), "script" );
+
+ // Preserve script evaluation history
+ if ( contains ) {
+ setGlobalEval( tmp );
+ }
+
+ // Capture executables
+ if ( scripts ) {
+ j = 0;
+ while ( ( elem = tmp[ j++ ] ) ) {
+ if ( rscriptType.test( elem.type || "" ) ) {
+ scripts.push( elem );
+ }
+ }
+ }
+ }
+
+ return fragment;
+}
+
+return buildFragment;
+} );
diff --git a/js/vendor/jquery/src/manipulation/createSafeFragment.js b/js/vendor/jquery/src/manipulation/createSafeFragment.js
new file mode 100644
index 000000000..5b766d435
--- /dev/null
+++ b/js/vendor/jquery/src/manipulation/createSafeFragment.js
@@ -0,0 +1,20 @@
+define( [
+ "./var/nodeNames"
+], function( nodeNames ) {
+
+function createSafeFragment( document ) {
+ var list = nodeNames.split( "|" ),
+ safeFrag = document.createDocumentFragment();
+
+ if ( safeFrag.createElement ) {
+ while ( list.length ) {
+ safeFrag.createElement(
+ list.pop()
+ );
+ }
+ }
+ return safeFrag;
+}
+
+return createSafeFragment;
+} );
diff --git a/js/vendor/jquery/src/manipulation/getAll.js b/js/vendor/jquery/src/manipulation/getAll.js
new file mode 100644
index 000000000..cc913f29e
--- /dev/null
+++ b/js/vendor/jquery/src/manipulation/getAll.js
@@ -0,0 +1,21 @@
+define( [
+ "../core"
+], function( jQuery ) {
+
+function getAll( context, tag ) {
+
+ // Support: IE9-11+
+ // Use typeof to avoid zero-argument method invocation on host objects (#15151)
+ var ret = typeof context.getElementsByTagName !== "undefined" ?
+ context.getElementsByTagName( tag || "*" ) :
+ typeof context.querySelectorAll !== "undefined" ?
+ context.querySelectorAll( tag || "*" ) :
+ [];
+
+ return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
+ jQuery.merge( [ context ], ret ) :
+ ret;
+}
+
+return getAll;
+} );
diff --git a/js/vendor/jquery/src/manipulation/setGlobalEval.js b/js/vendor/jquery/src/manipulation/setGlobalEval.js
new file mode 100644
index 000000000..8ca69a03a
--- /dev/null
+++ b/js/vendor/jquery/src/manipulation/setGlobalEval.js
@@ -0,0 +1,20 @@
+define( [
+ "../data/var/dataPriv"
+], function( dataPriv ) {
+
+// Mark scripts as having already been evaluated
+function setGlobalEval( elems, refElements ) {
+ var i = 0,
+ l = elems.length;
+
+ for ( ; i < l; i++ ) {
+ dataPriv.set(
+ elems[ i ],
+ "globalEval",
+ !refElements || dataPriv.get( refElements[ i ], "globalEval" )
+ );
+ }
+}
+
+return setGlobalEval;
+} );
diff --git a/js/vendor/jquery/src/manipulation/support.js b/js/vendor/jquery/src/manipulation/support.js
index 822a014f5..cd4081ebb 100644
--- a/js/vendor/jquery/src/manipulation/support.js
+++ b/js/vendor/jquery/src/manipulation/support.js
@@ -1,13 +1,14 @@
-define([
+define( [
+ "../var/document",
"../var/support"
-], function( support ) {
+], function( document, support ) {
-(function() {
+( function() {
var fragment = document.createDocumentFragment(),
div = fragment.appendChild( document.createElement( "div" ) ),
input = document.createElement( "input" );
- // Support: Safari<=5.1
+ // Support: Android 4.0-4.3, Safari<=5.1
// Check state lost if the name is set (#11217)
// Support: Windows Web Apps (WWA)
// `name` and `type` must use .setAttribute for WWA (#14901)
@@ -25,8 +26,8 @@ define([
// Make sure textarea (and checkbox) defaultValue is properly cloned
div.innerHTML = "<textarea>x</textarea>";
support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
-})();
+} )();
return support;
-});
+} );
diff --git a/js/vendor/jquery/src/manipulation/var/nodeNames.js b/js/vendor/jquery/src/manipulation/var/nodeNames.js
new file mode 100644
index 000000000..05bb604f4
--- /dev/null
+++ b/js/vendor/jquery/src/manipulation/var/nodeNames.js
@@ -0,0 +1,5 @@
+define( function() {
+ return "abbr|article|aside|audio|bdi|canvas|data|datalist|" +
+ "details|dialog|figcaption|figure|footer|header|hgroup|main|" +
+ "mark|meter|nav|output|picture|progress|section|summary|template|time|video";
+} );
diff --git a/js/vendor/jquery/src/manipulation/var/rcheckableType.js b/js/vendor/jquery/src/manipulation/var/rcheckableType.js
index c27a15dc4..4c95394ac 100644
--- a/js/vendor/jquery/src/manipulation/var/rcheckableType.js
+++ b/js/vendor/jquery/src/manipulation/var/rcheckableType.js
@@ -1,3 +1,3 @@
-define(function() {
- return (/^(?:checkbox|radio)$/i);
-});
+define( function() {
+ return ( /^(?:checkbox|radio)$/i );
+} );
diff --git a/js/vendor/jquery/src/manipulation/var/rleadingWhitespace.js b/js/vendor/jquery/src/manipulation/var/rleadingWhitespace.js
new file mode 100644
index 000000000..96ef95f31
--- /dev/null
+++ b/js/vendor/jquery/src/manipulation/var/rleadingWhitespace.js
@@ -0,0 +1,3 @@
+define( function() {
+ return ( /^\s+/ );
+} );
diff --git a/js/vendor/jquery/src/manipulation/var/rscriptType.js b/js/vendor/jquery/src/manipulation/var/rscriptType.js
new file mode 100644
index 000000000..0c77c8a58
--- /dev/null
+++ b/js/vendor/jquery/src/manipulation/var/rscriptType.js
@@ -0,0 +1,3 @@
+define( function() {
+ return ( /^$|\/(?:java|ecma)script/i );
+} );
diff --git a/js/vendor/jquery/src/manipulation/var/rtagName.js b/js/vendor/jquery/src/manipulation/var/rtagName.js
new file mode 100644
index 000000000..9e542694a
--- /dev/null
+++ b/js/vendor/jquery/src/manipulation/var/rtagName.js
@@ -0,0 +1,3 @@
+define( function() {
+ return ( /<([\w:-]+)/ );
+} );
diff --git a/js/vendor/jquery/src/manipulation/wrapMap.js b/js/vendor/jquery/src/manipulation/wrapMap.js
new file mode 100644
index 000000000..fdb430a03
--- /dev/null
+++ b/js/vendor/jquery/src/manipulation/wrapMap.js
@@ -0,0 +1,27 @@
+define( function() {
+
+// We have to close these tags to support XHTML (#13200)
+var wrapMap = {
+
+ // Support: IE9
+ option: [ 1, "<select multiple='multiple'>", "</select>" ],
+
+ // XHTML parsers do not magically insert elements in the
+ // same way that tag soup parsers do. So we cannot shorten
+ // this by omitting <tbody> or other required elements.
+ thead: [ 1, "<table>", "</table>" ],
+ col: [ 2, "<table><colgroup>", "</colgroup></table>" ],
+ tr: [ 2, "<table><tbody>", "</tbody></table>" ],
+ td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
+
+ _default: [ 0, "", "" ]
+};
+
+// Support: IE9
+wrapMap.optgroup = wrapMap.option;
+
+wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
+wrapMap.th = wrapMap.td;
+
+return wrapMap;
+} );