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

Document relationship between xmldom and standard Web APIs #119

Closed
brodybits opened this issue Sep 14, 2020 · 3 comments · Fixed by #211
Closed

Document relationship between xmldom and standard Web APIs #119

brodybits opened this issue Sep 14, 2020 · 3 comments · Fixed by #211
Labels
documentation Improvements or additions to documentation

Comments

@brodybits
Copy link
Member

xmldom seems to be like a "ponyfill" ([1], [2]) for some standard Web APIs

I really like the arguments for "ponyfill" and would favor documenting this.

[1] https://github.com/sindresorhus/ponyfill
[2] https://ponyfoo.com/articles/polyfills-or-ponyfills

@karfau
Copy link
Member

karfau commented Jan 21, 2021

Related: #176

@rooby
Copy link

rooby commented Feb 23, 2021

This would be very useful. As it is, it's pretty confusing that this just appears to replicate a standard API and the docs make no mention of it or why you should or shouldn't use this instead of the API.

@karfau
Copy link
Member

karfau commented Apr 5, 2021

@rooby Sorry for the late reply.
I agree that the documentation is not very clear about how far xmldom covers which spec, or how it relates to those specs.

But I'm quite certain about this aspect:

and the docs make no mention of it or why you should or shouldn't use this instead of the API.

I would think it only makes sense to use xmldom over the native API, if you need to be able to deal with XML outside of browser (runtimes).
One could even only use xmldom in a code base, if the APIs it mimics are not available, but this of course bears the risk that the code behaves differently between different runtimes, just because xmldom implements things slightly different than the browsers do.

I added some more information as part of #211, please have a look and comment if you think something is missing or not clear.

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

Successfully merging a pull request may close this issue.

3 participants