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

Use native DOMParser and XMLSerializer #26

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

nodaguti
Copy link

After #25, I've made a further progress in the direction of removing xml-js, migrating from a xml library that provides their original interface, to Web standard DOMParser and XMLSerializer.

With this change the package size with required dependencies will be reduced by ~128KB.

While DOMParser and XMLSerializer are supported since Chrome 4, for environments that don't support DOMParser and/or XMLSerializer, there are polyfills like xmldom and jsdom. xmldom is a lightweight (30KB) pure JS implementation of DOMParser and XMLSerializer with no dependencies on Node.js standard modules, so I use it in the updated tests to verify that our vast/vmap parsers will work well with xmldom.

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.

1 participant