Implement Range and Selection APIs#2719
Conversation
domenic
left a comment
There was a problem hiding this comment.
Wow, good stuff. Only one concern with the Range constructor.
I admit not reviewing several of the very-long files in great detail, but scrolling through them they all seem very nicely structured, with lots of spec references, just in the awesome manner I've come to appreciate from your work. So I'm happy to merge this soon.
| }); | ||
|
|
||
| // https://dom.spec.whatwg.org/#dom-range-range | ||
| function Range() { |
There was a problem hiding this comment.
Why implement this in this manner instead of using webidl2js?
There was a problem hiding this comment.
This is not needed anymore, it was used to associate the Range with the Document. This is not needed anymore with the webidl2js constructor reform. The Document can now be extracted out of the newly introduced globalObject.
2993143 to
2d4e35c
Compare
|
I re-ran the CI three times and it gives segfaults on the latest Node stable once we start hitting the dom/ranges tests. https://travis-ci.org/jsdom/jsdom/jobs/618664359 . So probably we shouldn't merge until we either find a workaround or Node.js fixes their upstream bug. I haven't tried reproducing locally yet; I hope it isn't hard to do so :(. |
|
I was able to reproduce the issue locally against node |
|
The segfault was fixed with node |
|
I really appreciate this work. I'm refactoring a highlighting feature, so this will be extremely valuable to me. |
|
Thank you for this! Should it have also implemented If range itself is fully supported, I believe this will open the door to automated color contrast accessibility testing via |
|
There's probably no way for us to implement |
|
@TimothyGu Thank you for the information! |
Changes
This PR implements the
Rangeand theSelectionAPIs. Sorry for this large PR, however the Range WPT tests are highly coupled with the Selection WPT tests and because of this wanted to make those 2 land at the same time.Fix #317, fix #937