Closed pYr0x closed 2 years ago
beside the fact I don't care what jsdom does as it's not a goal of this project to be another jsdom, as stated in the README, can you please provide a minimal example of what's the issue here? the code coverage tests Custom Elements and if an element has no attributes then the callback doesn't fire even with native custom elements so I am not sure what are you after.
rude answer... i fork this and go on with myself
the
attributeChangedCallback
and the start of observation is only fired if there is an attribute on the custom element. https://github.com/WebReflection/linkedom/blob/main/cjs/interface/element.js#L266if you have a custom element with no attributes the attributeChangedCallback is never called.
mdm docs: Note that to get the attributeChangedCallback() callback to fire when an attribute changes, you have to observe the attributes. This is done by specifying a static get observedAttributes() method inside custom element class - this should return an array containing the names of the attributes you want to observe:
we need some like
jsdom
did: https://github.com/jsdom/jsdom/blob/master/lib/jsdom/living/custom-elements/CustomElementRegistry-impl.js#L156-L162