Skip to content

Commit

Permalink
Fix DOMParser URL inheritance
Browse files Browse the repository at this point in the history
Closes #2809.
  • Loading branch information
domenic committed May 27, 2023
1 parent e5b8e8a commit 35259cc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 3 additions & 2 deletions lib/jsdom/living/domparsing/DOMParser-impl.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

const { parseIntoDocument } = require("../../browser/parser");

const idlUtils = require("../generated/utils");
const Document = require("../generated/Document");

exports.implementation = class DOMParserImpl {
Expand Down Expand Up @@ -44,8 +45,8 @@ exports.implementation = class DOMParserImpl {
encoding: "UTF-8",
contentType,
readyState: "complete",
scriptingDisabled: true
// TODO: somehow set URL to active document's URL
scriptingDisabled: true,
url: idlUtils.implForWrapper(this._globalObject._document).URL
}
});

Expand Down
1 change: 0 additions & 1 deletion test/web-platform-tests/to-run.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,6 @@ DOMParser-parseFromString-url-moretests.html: [fail, Unknown]
DOMParser-parseFromString-url-pushstate.html: [fail, iframe onload timing]
DOMParser-parseFromString-url.html: [fail, iframe onload timing]
DOMParser-parseFromString-xml-doctype.html: [fail, saxes doesn't support DTD validation]
DOMParser-parseFromString-xml.html: [fail, needs to get "the active document's URL" which is not possible with one DOMParser shared across all windows]
XMLSerializer-serializeToString.html: [fail, Unknown]
createContextualFragment.html: [fail, Script execution timing]
idlharness.window.html: [fail, Depends on fetch]
Expand Down

0 comments on commit 35259cc

Please sign in to comment.