-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Replace DOMParser
with template
+ innerHTML
to avoid memory leak
#23
Comments
Thanks for raising an issue @JounQin! 🙇 I ask because the StackOverflow issue https://stackoverflow.com/questions/56451731/dom-parser-chrome-extension-memory-leak, is all over the place. The Twitter post referenced https://twitter.com/DIYgod/status/1761065494185156663
(translated to English) Appears to come from parsing XML rather than HTML and also hasn't been reported to or confirmed by the Chromium team. |
Indeed.
I believe it should be an issue of Chrome. And we can avoid this potential issue by just replacing the usage of And it's very common to use
It's parsing |
#19 already landed. |
Ah, I can’t keep track. |
|
I don’t understand what you want. Please keep in mind that |
Yes, sorry for the confusion, before I know there could be a memory leak I'd prefer So my proposal would be change to use If you agree, I'd like to raise a PR. |
Based on the last comment I’d say go for it 👍 |
I'm okay with that, if there are no HTTP requests sent for images, and scripts don't run! |
Sure, that's syntax-tree/hast-util-from-html-isomorphic#2 talking about. |
This brings the code in line w/: <https://github.com/syntax-tree/hast-util-from-html-isomorphic> Closes GH-23.
Initial checklist
Affected packages and versions
rehype-dom-parse
Link to runnable example
No response
Steps to reproduce
https://stackoverflow.com/questions/56451731/dom-parser-chrome-extension-memory-leak
Expected behavior
No memory leak
Actual behavior
I just noticed this issue from https://twitter.com/DIYgod/status/1761065494185156663
Runtime
No response
Package manager
No response
OS
No response
Build and bundle tools
No response
The text was updated successfully, but these errors were encountered: