Skip to content

Speculative fix for DOM manipulation using standalone xmldom library #447

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

Closed
wants to merge 1 commit into from

Conversation

rathboma
Copy link

@rathboma rathboma commented May 4, 2021

Replaces browser-built-in DOM libs with xmldom. Should fix issues using library in webworkers. Testing now.

Also, you guys really should commit a package-lock.json or a yarn.lock file to make sure your resolved dependencies don't change between machines. I've added a yarn.lock, because I use yarn, but that's up to you.

Fix #401

@ghost
Copy link

ghost commented May 4, 2021

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.

❌ rathboma sign now
You have signed the CLA already but the status is still pending? Let us recheck it.

@jeremymeng
Copy link
Member

@rathboma Thanks for the PR! However, in general we try to avoid adding additional dependencies for browser users as it unnecessarily increases the bundle size for users who don't need XML feature. This is why we suggest polyfilling the DOM api as a workaround.

@jeremymeng
Copy link
Member

@rathboma a polyfill workaround would be similar to the one in https://github.com/Azure/azure-sdk-for-js/blob/589ce99c13a16de07dd8e9dc2117cd3e44666d4d/samples/web-workers/js/polyfill.worker.js. I am closing this PR. Please let us know if you have any further questions.

@jeremymeng jeremymeng closed this Aug 16, 2021
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

Successfully merging this pull request may close these issues.

DOMParser is not defined error when initializing client in Web Worker
2 participants