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

DOMNodeInserted: event.relatedNode is null #2

Open
peterzanetti opened this issue Aug 12, 2024 · 1 comment
Open

DOMNodeInserted: event.relatedNode is null #2

peterzanetti opened this issue Aug 12, 2024 · 1 comment

Comments

@peterzanetti
Copy link

After adding the polyfill and using it with code previously working with DOMNodeInserted, the event.relatedNode is null.

@mfreed7
Copy link
Owner

mfreed7 commented Aug 19, 2024

Yeah, I agree that's a point that the polyfill doesn't fully address. I just updated the README (and a bit of the tests) to acknowledge that.

There is some code to add relatedNode, but it doesn't always work:
https://github.com/mfreed7/mutation-events-polyfill/blob/main/src/mutation_events.js#L54

I'm very open to pull requests, if you want to take a look at adding better support for relatedNode!

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