"../core",
"../var/document",
"./var/rsingleTag",
- "../manipulation/buildFragment",
-
- // This is the only module that needs core/support
- "./support"
-], function( jQuery, document, rsingleTag, buildFragment, support ) {
+ "../manipulation/buildFragment"
+], function( jQuery, document, rsingleTag, buildFragment ) {
// data: string of html
// context (optional): If specified, the fragment will be created in this context,
keepScripts = context;
context = false;
}
-
- // document.implementation stops scripts or inline event handlers from
- // being executed immediately
- context = context || ( support.createHTMLDocument ?
- document.implementation.createHTMLDocument( "" ) :
- document );
+ context = context || document;
var parsed = rsingleTag.exec( data ),
scripts = !keepScripts && [];
+++ /dev/null
-define( [
- "../var/document",
- "../var/support"
-], function( document, support ) {
-
-// Support: Safari 8+
-// In Safari 8 documents created via document.implementation.createHTMLDocument
-// collapse sibling forms: the second one becomes a child of the first one.
-// Because of that, this security measure has to be disabled in Safari 8.
-// https://bugs.webkit.org/show_bug.cgi?id=137337
-support.createHTMLDocument = ( function() {
- if ( !document.implementation.createHTMLDocument ) {
- return false;
- }
- var doc = document.implementation.createHTMLDocument( "" );
- doc.body.innerHTML = "<form></form><form></form>";
- return doc.body.childNodes.length === 2;
-} )();
-
-return support;
-} );
assert.equal( jQuery.parseHTML( "<td><td>" )[ 1 ].parentNode.nodeType, 11, "parentNode should be documentFragment" );
} );
-if ( jQuery.support.createHTMLDocument && !/opera.*version\/12\.1/i.test( navigator.userAgent ) ) {
- QUnit.asyncTest( "jQuery.parseHTML", function( assert ) {
- assert.expect( 1 );
-
- Globals.register( "parseHTMLError" );
-
- jQuery.globalEval( "parseHTMLError = false;" );
- jQuery.parseHTML( "<img src=x onerror='parseHTMLError = true'>" );
-
- window.setTimeout( function() {
- QUnit.start();
- assert.equal( window.parseHTMLError, false, "onerror eventhandler has not been called." );
- }, 2000 );
- } );
-}
-
QUnit.test( "jQuery.parseJSON", function( assert ) {
assert.expect( 20 );
"checkOn": true,
"clearCloneStyle": version >= 13,
"cors": true,
- "createHTMLDocument": true,
"cssFloat": true,
"deleteExpando": true,
"enctype": true,
"checkOn": true,
"clearCloneStyle": true,
"cors": true,
- "createHTMLDocument": true,
"cssFloat": true,
"deleteExpando": true,
"enctype": true,
"checkOn": true,
"clearCloneStyle": false,
"cors": true,
- "createHTMLDocument": true,
"cssFloat": true,
"deleteExpando": true,
"enctype": true,
"checkOn": true,
"clearCloneStyle": false,
"cors": false,
- "createHTMLDocument": true,
"cssFloat": true,
"deleteExpando": true,
"enctype": true,
"checkOn": true,
"clearCloneStyle": true,
"cors": false,
- "createHTMLDocument": false,
"cssFloat": false,
"deleteExpando": false,
"enctype": true,
"checkOn": true,
"clearCloneStyle": true,
"cors": false,
- "createHTMLDocument": false,
"cssFloat": false,
"deleteExpando": false,
"enctype": true,
"checkOn": true,
"clearCloneStyle": true,
"cors": false,
- "createHTMLDocument": false,
"cssFloat": false,
"deleteExpando": false,
"enctype": true,
"checkOn": true,
"clearCloneStyle": true,
"cors": true,
- "createHTMLDocument": true,
"cssFloat": true,
"deleteExpando": true,
"enctype": true,
"checkOn": true,
"clearCloneStyle": true,
"cors": true,
- "createHTMLDocument": true,
"cssFloat": true,
"deleteExpando": true,
"enctype": true,
"checkOn": true,
"clearCloneStyle": true,
"cors": true,
- "createHTMLDocument": false,
"cssFloat": true,
"deleteExpando": true,
"enctype": true,
"checkOn": false,
"clearCloneStyle": true,
"cors": true,
- "createHTMLDocument": true,
"cssFloat": true,
"deleteExpando": true,
"enctype": true,
"checkOn": true,
"clearCloneStyle": true,
"cors": true,
- "createHTMLDocument": true,
"cssFloat": true,
"deleteExpando": true,
"enctype": true,
"checkOn": true,
"clearCloneStyle": true,
"cors": true,
- "createHTMLDocument": true,
"cssFloat": true,
"deleteExpando": true,
"enctype": true,
"checkOn": true,
"clearCloneStyle": true,
"cors": true,
- "createHTMLDocument": true,
"cssFloat": true,
"deleteExpando": true,
"enctype": true,
"checkOn": true,
"clearCloneStyle": true,
"cors": true,
- "createHTMLDocument": false,
"cssFloat": true,
"deleteExpando": true,
"enctype": true,
"checkOn": true,
"clearCloneStyle": true,
"cors": true,
- "createHTMLDocument": true,
"cssFloat": true,
"deleteExpando": true,
"enctype": true,
"checkOn": true,
"clearCloneStyle": true,
"cors": true,
- "createHTMLDocument": true,
"cssFloat": true,
"deleteExpando": true,
"enctype": true,
"checkOn": false,
"clearCloneStyle": true,
"cors": true,
- "createHTMLDocument": true,
"cssFloat": true,
"deleteExpando": true,
"enctype": true,
"checkOn": false,
"clearCloneStyle": false,
"cors": true,
- "createHTMLDocument": true,
"cssFloat": true,
"deleteExpando": true,
"enctype": true,