aklinker1 / webext-core

Collection of essential libraries and tools for building web extensions
https://webext-core.aklinker1.io
MIT License
116 stars 13 forks source link

fix(isolated-element): Ensure proper bubbling of events from isolated elements #54

Closed mefengl closed 9 months ago

mefengl commented 9 months ago

Found this issue during merging it to wxt.

Previously, tests for isolated elements might have inaccurately passed by directly appending the isolatedElement to the document.body.

This commit corrects the event propagation mechanism by removing the direct appendage of isolatedElement, ensuring it mimics real-life scenarios more closely.

Moreover, the 'composed: true' attribute has been added to the events, allowing them to bubble out of the shadow DOM or isolated elements as they would naturally.