-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Living standard: Add document.implementation.createHTMLDocument() #924
Conversation
Hi! This is awesome work. I'd really like to get the web-platform-tests running directly. Is there a reason why you think that's not possible? |
It only differs from the original tests in one point: In the living standard, |
Well, anything in DOM level 1 is just wrong, so let's definitely fix that, even if jsdom has tests to the contrary. |
Here you go. |
Awesome! Can we run the web-platform-tests directly now? Per https://github.com/tmpvar/jsdom/blob/master/Contributing.md#writing-or-importing-tests ? |
Unfortunately not yet:
As this is my first PR to this project (with a complex codebase), I tried to be cautious not to break anything. If you can point me to the right direction, I'll see to get the w3c test passing as well in the next days. |
Fixing doctype._publicId = publicId ? String(publicId) : "";
doctype._systemId = systemId ? String(systemId) : ""; |
Obviously it's ok to just call 'toString()' on null, false, {} etc. as <title> values.
Ok, added the w3c test, one test is still failing, regarding character escaping on href attributes when using |
OK sweet, we'll try to fix that for you and merge this asap :) |
Cool, thanks! |
|
||
|
||
// https://dom.spec.whatwg.org/#concept-element-local-name | ||
defineGetter(core.Node.prototype, "localName", function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Element, not Node
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, ok. Just took it from https://github.com/tmpvar/jsdom/blob/master/lib/jsdom/level2/core.js#L153
You're welcome! Thanks for all the work with jsdom and your great help with the PR. Not many maintainers take the time to review contributions in such detail. |
This adds support for
document.implementation.createHTMLDocument()
to the living standard.It took some time to get my head around the jsdom code, hopefully I did it right. ;)