-
Notifications
You must be signed in to change notification settings - Fork 219
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
Web worker support? #168
Comments
Actually I mean that the library should work in worker when it only receive HTML and produce Data URL. Or parsing HTML can be done with silently copying the element. |
Hey, there actually is quite a bit of code that needs to have access to the document or window object:
only to name a few. In fact web workers only have very limited access judging by https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Functions_and_classes_available_to_workers. The only way that I currently see for moving towards web workers is to
But then this already sounds like a bit of a rewrite/separate direction. I haven't looked into this into more detail though, and I'm happy to be proven wrong. Might be worth giving it a try if you want :) |
@chuyik If you need full server side rendering, PhantomJS, SlimerJS or headless Chrome might be an option. |
It seems taking very long time rendering large document especially those including MathJax rendered formulas. Since loading an image is asynchronously done by browser, this library seems to be the only thing stucking the browser. I've read the code and havn't found any part producing the data URL which need
document
object. I think it would be nice to support doing this inside a web worker.P.S. I really love this project. If I were able to improve it I would really like to pull request. Thank you for providing it.
The text was updated successfully, but these errors were encountered: