-
Notifications
You must be signed in to change notification settings - Fork 14
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
should createContextualFragment be added in Document / DocumentFragment? #33
Comments
It would help if you started with a problem statement, before going to what the solution might look like. See also https://whatwg.org/faq#adding-new-features. |
Hi, right, sorry Basically I often need this feature 'isomorphically' (browser + node) (example: writing a module parsing html, filterXSS, etc..), jsdom has a convenient I wonder a bit why it was added in Range.prototype, it doesn't even return a Range. So the current way to access createContextualFragment in DOM is not practical, maybe you would agree |
It's a legacy API that all browsers were forced to adopt. I don't recall reading about the design history. |
I think there's some work concerning let's close it, maybe and thanks again |
instead of in Range prototype, I think it could be great to just do
document.createContextualRange('<br>')
The text was updated successfully, but these errors were encountered: