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

Why doesn't insertAdjacentHTML return anything? (eg. a NodeList) #868

Closed
alystair opened this issue May 27, 2020 · 3 comments
Closed

Why doesn't insertAdjacentHTML return anything? (eg. a NodeList) #868

alystair opened this issue May 27, 2020 · 3 comments

Comments

@alystair
Copy link

alystair commented May 27, 2020

Why does insertAdjacentElement return the resulting element, yet insertAdjacentHTML doesn't have a return value? In my mind it should return a NodeList if successful. Has this ever been discussed?

Also why does MDN link insertAdjacentElement to a W3C spec, and insertAdjacentHTML to WhatWG?

@annevk
Copy link
Member

annevk commented May 27, 2020

So, HTML is defined at https://w3c.github.io/DOM-Parsing/, Element is defined at https://dom.spec.whatwg.org/. If you can update MDN, that'd be good.

Making it return anything seems a bit involved looking at its definition.

@annevk annevk closed this as completed May 27, 2020
@annevk annevk reopened this May 27, 2020
@alystair
Copy link
Author

If you can update MDN, that'd be good.

Seems I was confused whilst jumping through the bureaucratic hoops, insertAdjacentHTML indeed links to W3C and insertAdjacentElement links to WhatWG. I've edited the issue to reflect that.

@annevk
Copy link
Member

annevk commented May 27, 2020

Good, I suggest filing this request at https://github.com/w3c/DOM-Parsing/issues/new as this standard doesn't define it. Please keep in mind https://whatwg.org/faq#adding-new-features though, especially for feature requests it's important the motivation is clear.

@annevk annevk closed this as completed May 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants