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

Using mammoth in a web worker #30

Closed
Gijsjan opened this issue Nov 25, 2014 · 3 comments
Closed

Using mammoth in a web worker #30

Gijsjan opened this issue Nov 25, 2014 · 3 comments

Comments

@Gijsjan
Copy link

Gijsjan commented Nov 25, 2014

I'm trying to use Mammoth.js in a web worker by importing it using "importScripts". The error I get, when doing this is: "Uncaught TypeError: Cannot read property 'MutationObserver' of undefined". When I load mammoth.browser.min.js in the browser I get no such error. The error is thrown immediately after importScripts is run. Any ideas? Thank you.

@mwilliamson
Copy link
Owner

Looks like there was a bug in bluebird [1], the promise library that Mammoth uses. I've updated to the latest version of bluebird in the 0.3.12 release. Could you see if that solves your issue?

[1] petkaantonov/bluebird#179

@Gijsjan
Copy link
Author

Gijsjan commented Nov 26, 2014

I had to check out the repo and run make setup. That generated the js that is working. Npm install of v0.3.12 doesn't contain the updated js yet. Thank you for the quick response and quick fix!

@mwilliamson
Copy link
Owner

Good to hear it's working. The latest release to npm should also have updated files for the browser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants