aboutsummaryrefslogtreecommitdiffstats
path: root/bower_components/jquery/src/manipulation
diff options
context:
space:
mode:
authorLibravatarDererk <dererk@satellogic.com>2016-11-15 14:18:53 -0300
committerLibravatarDererk <dererk@satellogic.com>2016-11-15 14:18:53 -0300
commit1ad5102b7ddd181bb9c632b124d3ea4c7db28be6 (patch)
tree73dda18465d0f4b8eb52d4482282a387c9f67c95 /bower_components/jquery/src/manipulation
parentb67294f76809a681ff73f209ed691a3e3f00563d (diff)
parentffb671c61a24a9086343b54bad080e145ff33fc5 (diff)
Merge tag 'upstream/7.8.1'
Upstream version 7.8.1 # gpg: Firmado el mar 15 nov 2016 14:18:48 ART # gpg: usando RSA clave A6C7B88B9583046A11C5403E0B00FB6CEBE2D002 # gpg: Firma correcta de "Ulises Vitulli <dererk@debian.org>" [absoluta] # gpg: alias "Dererk <dererk@torproject.org>" [absoluta] # gpg: alias "Ulises Vitulli <uvitulli@fi.uba.ar>" [absoluta] # gpg: alias "Ulises Vitulli <dererk@satellogic.com>" [absoluta]
Diffstat (limited to 'bower_components/jquery/src/manipulation')
-rw-r--r--bower_components/jquery/src/manipulation/_evalUrl.js11
-rw-r--r--bower_components/jquery/src/manipulation/buildFragment.js157
-rw-r--r--bower_components/jquery/src/manipulation/createSafeFragment.js20
-rw-r--r--bower_components/jquery/src/manipulation/getAll.js33
-rw-r--r--bower_components/jquery/src/manipulation/setGlobalEval.js19
-rw-r--r--bower_components/jquery/src/manipulation/support.js58
-rw-r--r--bower_components/jquery/src/manipulation/var/nodeNames.js5
-rw-r--r--bower_components/jquery/src/manipulation/var/rcheckableType.js6
-rw-r--r--bower_components/jquery/src/manipulation/var/rleadingWhitespace.js3
-rw-r--r--bower_components/jquery/src/manipulation/var/rscriptType.js3
-rw-r--r--bower_components/jquery/src/manipulation/var/rtagName.js3
-rw-r--r--bower_components/jquery/src/manipulation/wrapMap.js30
12 files changed, 310 insertions, 38 deletions
diff --git a/bower_components/jquery/src/manipulation/_evalUrl.js b/bower_components/jquery/src/manipulation/_evalUrl.js
index 6704749..572fe30 100644
--- a/bower_components/jquery/src/manipulation/_evalUrl.js
+++ b/bower_components/jquery/src/manipulation/_evalUrl.js
@@ -1,18 +1,21 @@
-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",
+ cache: true,
async: false,
global: false,
"throws": true
- });
+ } );
};
return jQuery._evalUrl;
-});
+} );
diff --git a/bower_components/jquery/src/manipulation/buildFragment.js b/bower_components/jquery/src/manipulation/buildFragment.js
new file mode 100644
index 0000000..df58bc8
--- /dev/null
+++ b/bower_components/jquery/src/manipulation/buildFragment.js
@@ -0,0 +1,157 @@
+define( [
+ "../core",
+ "./var/rcheckableType",
+ "./var/rtagName",
+ "./var/rscriptType",
+ "./var/rleadingWhitespace",
+ "./createSafeFragment",
+ "./wrapMap",
+ "./getAll",
+ "./setGlobalEval",
+ "./support"
+], function( jQuery, rcheckableType, rtagName, rscriptType, rleadingWhitespace,
+ createSafeFragment, wrapMap, getAll, setGlobalEval, support ) {
+
+var rhtml = /<|&#?\w+;/,
+ rtbody = /<tbody/i;
+
+function fixDefaultChecked( elem ) {
+ if ( rcheckableType.test( elem.type ) ) {
+ elem.defaultChecked = elem.checked;
+ }
+}
+
+function buildFragment( elems, context, scripts, selection, ignored ) {
+ var j, elem, contains,
+ tmp, tag, tbody, wrap,
+ l = elems.length,
+
+ // Ensure a safe fragment
+ safe = createSafeFragment( context ),
+
+ nodes = [],
+ i = 0;
+
+ for ( ; i < l; i++ ) {
+ elem = elems[ i ];
+
+ if ( elem || elem === 0 ) {
+
+ // Add nodes directly
+ if ( jQuery.type( elem ) === "object" ) {
+ 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 || safe.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;
+ }
+
+ // Manually add leading whitespace removed by IE
+ if ( !support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
+ nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[ 0 ] ) );
+ }
+
+ // Remove IE's autoinserted <tbody> from table fragments
+ if ( !support.tbody ) {
+
+ // String was a <table>, *may* have spurious <tbody>
+ elem = tag === "table" && !rtbody.test( elem ) ?
+ tmp.firstChild :
+
+ // String was a bare <thead> or <tfoot>
+ wrap[ 1 ] === "<table>" && !rtbody.test( elem ) ?
+ tmp :
+ 0;
+
+ j = elem && elem.childNodes.length;
+ while ( j-- ) {
+ if ( jQuery.nodeName( ( tbody = elem.childNodes[ j ] ), "tbody" ) &&
+ !tbody.childNodes.length ) {
+
+ elem.removeChild( tbody );
+ }
+ }
+ }
+
+ jQuery.merge( nodes, tmp.childNodes );
+
+ // Fix #12392 for WebKit and IE > 9
+ tmp.textContent = "";
+
+ // Fix #12392 for oldIE
+ while ( tmp.firstChild ) {
+ tmp.removeChild( tmp.firstChild );
+ }
+
+ // Remember the top-level container for proper cleanup
+ tmp = safe.lastChild;
+ }
+ }
+ }
+
+ // Fix #11356: Clear elements from fragment
+ if ( tmp ) {
+ safe.removeChild( tmp );
+ }
+
+ // Reset defaultChecked for any radios and checkboxes
+ // about to be appended to the DOM in IE 6/7 (#8060)
+ if ( !support.appendChecked ) {
+ jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked );
+ }
+
+ 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( safe.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 );
+ }
+ }
+ }
+ }
+
+ tmp = null;
+
+ return safe;
+}
+
+return buildFragment;
+} );
diff --git a/bower_components/jquery/src/manipulation/createSafeFragment.js b/bower_components/jquery/src/manipulation/createSafeFragment.js
new file mode 100644
index 0000000..5b766d4
--- /dev/null
+++ b/bower_components/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/bower_components/jquery/src/manipulation/getAll.js b/bower_components/jquery/src/manipulation/getAll.js
new file mode 100644
index 0000000..d049b79
--- /dev/null
+++ b/bower_components/jquery/src/manipulation/getAll.js
@@ -0,0 +1,33 @@
+define( [
+ "../core"
+], function( jQuery ) {
+
+function getAll( context, tag ) {
+ var elems, elem,
+ i = 0,
+ found = typeof context.getElementsByTagName !== "undefined" ?
+ context.getElementsByTagName( tag || "*" ) :
+ typeof context.querySelectorAll !== "undefined" ?
+ context.querySelectorAll( tag || "*" ) :
+ undefined;
+
+ if ( !found ) {
+ for ( found = [], elems = context.childNodes || context;
+ ( elem = elems[ i ] ) != null;
+ i++
+ ) {
+ if ( !tag || jQuery.nodeName( elem, tag ) ) {
+ found.push( elem );
+ } else {
+ jQuery.merge( found, getAll( elem, tag ) );
+ }
+ }
+ }
+
+ return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
+ jQuery.merge( [ context ], found ) :
+ found;
+}
+
+return getAll;
+} );
diff --git a/bower_components/jquery/src/manipulation/setGlobalEval.js b/bower_components/jquery/src/manipulation/setGlobalEval.js
new file mode 100644
index 0000000..277a8e8
--- /dev/null
+++ b/bower_components/jquery/src/manipulation/setGlobalEval.js
@@ -0,0 +1,19 @@
+define( [
+ "../core"
+], function( jQuery ) {
+
+// Mark scripts as having already been evaluated
+function setGlobalEval( elems, refElements ) {
+ var elem,
+ i = 0;
+ for ( ; ( elem = elems[ i ] ) != null; i++ ) {
+ jQuery._data(
+ elem,
+ "globalEval",
+ !refElements || jQuery._data( refElements[ i ], "globalEval" )
+ );
+ }
+}
+
+return setGlobalEval;
+} );
diff --git a/bower_components/jquery/src/manipulation/support.js b/bower_components/jquery/src/manipulation/support.js
index 2567d7e..4147a33 100644
--- a/bower_components/jquery/src/manipulation/support.js
+++ b/bower_components/jquery/src/manipulation/support.js
@@ -1,12 +1,13 @@
-define([
+define( [
+ "../core",
+ "../var/document",
"../var/support"
-], function( support ) {
+], function( jQuery, document, support ) {
-(function() {
- // Minified: var a,b,c
- var input = document.createElement( "input" ),
- div = document.createElement( "div" ),
- fragment = document.createDocumentFragment();
+( function() {
+ var div = document.createElement( "div" ),
+ fragment = document.createDocumentFragment(),
+ input = document.createElement( "input" );
// Setup
div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
@@ -41,36 +42,31 @@ define([
// #11217 - WebKit loses check when the name is after the checked attribute
fragment.appendChild( div );
- div.innerHTML = "<input type='radio' checked='checked' name='t'/>";
+
+ // Support: Windows Web Apps (WWA)
+ // `name` and `type` must use .setAttribute for WWA (#14901)
+ input = document.createElement( "input" );
+ input.setAttribute( "type", "radio" );
+ input.setAttribute( "checked", "checked" );
+ input.setAttribute( "name", "t" );
+
+ div.appendChild( input );
// Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3
// old WebKit doesn't clone checked state correctly in fragments
support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;
// Support: IE<9
- // Opera does not clone events (and typeof div.attachEvent === undefined).
- // IE9-10 clones events bound via attachEvent, but they don't trigger with .click()
- support.noCloneEvent = true;
- if ( div.attachEvent ) {
- div.attachEvent( "onclick", function() {
- support.noCloneEvent = false;
- });
-
- div.cloneNode( true ).click();
- }
-
- // Execute the test only if not already executed in another module.
- if (support.deleteExpando == null) {
- // Support: IE<9
- support.deleteExpando = true;
- try {
- delete div.test;
- } catch( e ) {
- support.deleteExpando = false;
- }
- }
-})();
+ // Cloned elements keep attachEvent handlers, we use addEventListener on IE9+
+ support.noCloneEvent = !!div.addEventListener;
+
+ // Support: IE<9
+ // Since attributes and properties are the same in IE,
+ // cleanData must set properties to undefined rather than use removeAttribute
+ div[ jQuery.expando ] = 1;
+ support.attributes = !div.getAttribute( jQuery.expando );
+} )();
return support;
-});
+} );
diff --git a/bower_components/jquery/src/manipulation/var/nodeNames.js b/bower_components/jquery/src/manipulation/var/nodeNames.js
new file mode 100644
index 0000000..05bb604
--- /dev/null
+++ b/bower_components/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/bower_components/jquery/src/manipulation/var/rcheckableType.js b/bower_components/jquery/src/manipulation/var/rcheckableType.js
index c27a15d..4c95394 100644
--- a/bower_components/jquery/src/manipulation/var/rcheckableType.js
+++ b/bower_components/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/bower_components/jquery/src/manipulation/var/rleadingWhitespace.js b/bower_components/jquery/src/manipulation/var/rleadingWhitespace.js
new file mode 100644
index 0000000..96ef95f
--- /dev/null
+++ b/bower_components/jquery/src/manipulation/var/rleadingWhitespace.js
@@ -0,0 +1,3 @@
+define( function() {
+ return ( /^\s+/ );
+} );
diff --git a/bower_components/jquery/src/manipulation/var/rscriptType.js b/bower_components/jquery/src/manipulation/var/rscriptType.js
new file mode 100644
index 0000000..0c77c8a
--- /dev/null
+++ b/bower_components/jquery/src/manipulation/var/rscriptType.js
@@ -0,0 +1,3 @@
+define( function() {
+ return ( /^$|\/(?:java|ecma)script/i );
+} );
diff --git a/bower_components/jquery/src/manipulation/var/rtagName.js b/bower_components/jquery/src/manipulation/var/rtagName.js
new file mode 100644
index 0000000..9e54269
--- /dev/null
+++ b/bower_components/jquery/src/manipulation/var/rtagName.js
@@ -0,0 +1,3 @@
+define( function() {
+ return ( /<([\w:-]+)/ );
+} );
diff --git a/bower_components/jquery/src/manipulation/wrapMap.js b/bower_components/jquery/src/manipulation/wrapMap.js
new file mode 100644
index 0000000..d40685a
--- /dev/null
+++ b/bower_components/jquery/src/manipulation/wrapMap.js
@@ -0,0 +1,30 @@
+define( [
+ "./support"
+], function( support ) {
+
+// We have to close these tags to support XHTML (#13200)
+var wrapMap = {
+ option: [ 1, "<select multiple='multiple'>", "</select>" ],
+ legend: [ 1, "<fieldset>", "</fieldset>" ],
+ area: [ 1, "<map>", "</map>" ],
+
+ // Support: IE8
+ param: [ 1, "<object>", "</object>" ],
+ thead: [ 1, "<table>", "</table>" ],
+ tr: [ 2, "<table><tbody>", "</tbody></table>" ],
+ col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
+ td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
+
+ // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,
+ // unless wrapped in a div with non-breaking characters in front of it.
+ _default: support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X<div>", "</div>" ]
+};
+
+// Support: IE8-IE9
+wrapMap.optgroup = wrapMap.option;
+
+wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
+wrapMap.th = wrapMap.td;
+
+return wrapMap;
+} );