Skip to content
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

support DOMParser #1341

Closed
janryWang opened this issue Jan 7, 2016 · 15 comments
Closed

support DOMParser #1341

janryWang opened this issue Jan 7, 2016 · 15 comments
Labels

Comments

@janryWang
Copy link

https://developer.mozilla.org/en/docs/Web/API/DOMParser

@rafaellyra
Copy link

+1 for this feature

@domenic
Copy link
Member

domenic commented Jan 15, 2016

Every +1 causes me to deprioritize this feature by an additional month.

@rafaellyra
Copy link

Can you explain why? (so I can avoid this mistake again)

@domenic
Copy link
Member

domenic commented Jan 15, 2016

+1s add no additional information. They are basically spam.

@rafaellyra
Copy link

for me +1 says how many people need this feature, in a OS project I understand that is important have an idea on how many people need each feature and prioritize they, even asking for people that want the feature to help implementing, and I do understand that if you have an OS project you want that people use and help to improve.

@inikulin
Copy link
Contributor

I wonder how long will it take until someone will write a GitHub bot that converts +1, 👍 , etc. into the voting bar and removes original comments. I have this thing on my TODO list, actually, but it's not a high-priority project idea currently.

@domenic
Copy link
Member

domenic commented Jan 15, 2016

I'd still get the spam email, so it wouldn't solve anything.

@inikulin
Copy link
Contributor

I have big hopes for this thing: https://blog.devspace.io/the-problems-with-github-s-news-feed-abf5e1a7aefd#.dtdoffgru Maybe it will have some filtering functionality to reduce this kind of junk.

@kentcdodds
Copy link

I'm going to try my hand at implementing this one. @domenic, I'm looking at the contributing.md right now and currently running the tests. Is there anything specific about this API that I should be sure to think about? I'll let you know if I have any other questions.

@domenic
Copy link
Member

domenic commented Jun 9, 2016

@kentcdodds I gave an outline in #1368 (comment) that might be helpful :)

@kentcdodds
Copy link

FYI, I just fresh cloned the project, installed the deps, and ran the tests. I have three tests failing out of the gate:

  1) Web Platform Tests html/browsers/history/the-location-interface/location_port.html:
     Failed in "location port": 
assert_equals: port expected "w3c-test.org" but got ""

    at Object.<anonymous> (http://w3c-test.org/html/browsers/history/the-location-interface/location_port.html:17:7)
    at Object.Test.step (http://w3c-test.org/resources/testharness.js:1398:25)
    at test (http://w3c-test.org/resources/testharness.js:496:18)
    at http://w3c-test.org/html/browsers/history/the-location-interface/location_port.html:2:5
    at Object.exports.runInContext (vm.js:44:17)
    at processJavaScript (/Users/kdodds/Developer/jsdom/lib/jsdom/living/nodes/HTMLScriptElement-impl.js:115:10)


  2) Web Platform Tests XMLHttpRequest/security-consideration.sub.html:
     Failed in "ProgressEvent: security consideration": 
assert_unreached: MUST NOT dispatch progress event. Reached unreachable code

    at XMLHttpRequest.callback.(anonymous function) (/Users/kdodds/Developer/jsdom/lib/jsdom/living/events/EventTarget-impl.js:246:32)
    at invokeEventListeners (/Users/kdodds/Developer/jsdom/lib/jsdom/living/events/EventTarget-impl.js:210:27)
    at invokeInlineListeners (/Users/kdodds/Developer/jsdom/lib/jsdom/living/events/EventTarget-impl.js:168:7)


  3) Web Platform Tests cors/basic.htm:
     2 errors in test:

Failed in "Cross domain different port": 
assert_true: Got CORS-allowed response expected true got false

    at Object.<anonymous> (http://w3c-test.org/cors/basic.htm:33:17)
    at Object.Test.step (http://w3c-test.org/resources/testharness.js:1398:25)
    at XMLHttpRequest.onreadystatechange (http://w3c-test.org/resources/testharness.js:1422:35)
    at XMLHttpRequest.callback.(anonymous function) (/Users/kdodds/Developer/jsdom/lib/jsdom/living/events/EventTarget-impl.js:246:32)
    at invokeEventListeners (/Users/kdodds/Developer/jsdom/lib/jsdom/living/events/EventTarget-impl.js:210:27)
    at invokeInlineListeners (/Users/kdodds/Developer/jsdom/lib/jsdom/living/events/EventTarget-impl.js:168:7)
Failed in "Same domain different port": 
assert_true: Got CORS-allowed response expected true got false

    at Object.<anonymous> (http://w3c-test.org/cors/basic.htm:33:17)
    at Object.Test.step (http://w3c-test.org/resources/testharness.js:1398:25)
    at XMLHttpRequest.onreadystatechange (http://w3c-test.org/resources/testharness.js:1422:35)
    at XMLHttpRequest.callback.(anonymous function) (/Users/kdodds/Developer/jsdom/lib/jsdom/living/events/EventTarget-impl.js:246:32)
    at invokeEventListeners (/Users/kdodds/Developer/jsdom/lib/jsdom/living/events/EventTarget-impl.js:210:27)
    at invokeInlineListeners (/Users/kdodds/Developer/jsdom/lib/jsdom/living/events/EventTarget-impl.js:168:7)

Not sure whether that's helpful. I'm thinking it's probably something wrong with my environment because the Travis build has passing tests. So I'm just going to keep going and we'll see if this matters when I make my PR.

@Sebmaster
Copy link
Member

@kentcdodds You might have to do this: https://github.com/w3c/web-platform-tests/#running-the-tests

@kentcdodds
Copy link

I saw that, but the tests seemed to be running ok without me doing that. I should have just assumed that's why these failed. Thanks @Sebmaster :-)

@kentcdodds
Copy link

Thanks @domenic.

@domenic
Copy link
Member

domenic commented Jul 2, 2016

Thank you for getting me started!

nhunzaker pushed a commit to nhunzaker/jsdom that referenced this issue Dec 22, 2016
It's missing:

- <parsererror> elements when parsing XML strings fails
- copying the active document's URL

Also adds the empty-per-spec XMLDocument interface.

Closes jsdom#1341. Part of jsdom#1368.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants