mirror of
https://github.com/jquery/jquery.git
synced 2026-02-01 17:14:58 -05:00
Core: Update tested jsdom, drop obsolete workarounds
The latest version supporting Node.js is 3.1.2; some workarounds are not needed for this version. For example, in jsdom 3.1.2 a document created via document.implementation.createHTMLDocument( "" ) has a body. Fixes gh-2153 Closes gh-2154
This commit is contained in:
@@ -4,14 +4,9 @@ define([
|
||||
], function( document, support ) {
|
||||
|
||||
support.createHTMLDocument = (function() {
|
||||
var doc = document.implementation.createHTMLDocument( "" );
|
||||
// Support: Node with jsdom<=1.5.0+
|
||||
// jsdom's document created via the above method doesn't contain the body
|
||||
if ( !doc.body ) {
|
||||
return false;
|
||||
}
|
||||
doc.body.innerHTML = "<form></form><form></form>";
|
||||
return doc.body.childNodes.length === 2;
|
||||
var body = document.implementation.createHTMLDocument( "" ).body;
|
||||
body.innerHTML = "<form></form><form></form>";
|
||||
return body.childNodes.length === 2;
|
||||
})();
|
||||
|
||||
return support;
|
||||
|
||||
Reference in New Issue
Block a user