We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Actually when you receive a MutationRecord from observer, there should be a specified target property.
target
At happy-dom the target is missing everywhere and that makes MutationObserver unusable.
there are few locations where I noticed the target is missing:
happy-dom/packages/happy-dom/src/nodes/node/Node.ts
Line 271 in a853a6f
Line 307 in a853a6f
Line 372 in a853a6f
happy-dom/packages/happy-dom/src/nodes/element/Element.ts
Line 803 in 78210cf
Line 879 in 78210cf
happy-dom/packages/happy-dom/src/nodes/character-data/CharacterData.ts
Line 63 in be38195
So for example if observer receives a callback about an attribute change, this is what you get:
MutationRecord { type: 'attributes', target: null, addedNodes: [], removedNodes: [], previousSibling: null, nextSibling: null, attributeName: 'data-uuid', attributeNamespace: null, oldValue: null }
Here are docs for MutationRecord: https://developer.mozilla.org/en-US/docs/Web/API/MutationRecord
The text was updated successfully, but these errors were encountered:
#394@patch: Adds support for target in MutationRecord when using Muta…
3a87324
…tionObserver.
Merge pull request #398 from capricorn86/task/394-target-missing-in-m…
8df94aa
…utation-records #394@patch: Adds support for target in MutationRecord when using Muta…
Thank you for reporting @sionzee! 🙂
I have added support for target in MutationRecord now.
You can read more about the release here: https://github.com/capricorn86/happy-dom/releases/tag/v2.46.2
Sorry, something went wrong.
capricorn86
No branches or pull requests
Actually when you receive a MutationRecord from observer, there should be a specified
target
property.At happy-dom the target is missing everywhere and that makes MutationObserver unusable.
there are few locations where I noticed the target is missing:
happy-dom/packages/happy-dom/src/nodes/node/Node.ts
Line 271 in a853a6f
happy-dom/packages/happy-dom/src/nodes/node/Node.ts
Line 307 in a853a6f
happy-dom/packages/happy-dom/src/nodes/node/Node.ts
Line 372 in a853a6f
happy-dom/packages/happy-dom/src/nodes/element/Element.ts
Line 803 in 78210cf
happy-dom/packages/happy-dom/src/nodes/element/Element.ts
Line 879 in 78210cf
happy-dom/packages/happy-dom/src/nodes/character-data/CharacterData.ts
Line 63 in be38195
So for example if observer receives a callback about an attribute change, this is what you get:
Here are docs for MutationRecord: https://developer.mozilla.org/en-US/docs/Web/API/MutationRecord
The text was updated successfully, but these errors were encountered: