Second call to StyleModule.mount with different shadow root has no effect #12
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
After the 4.1.1 update
StyleModule.mountis broken when used on multiple shadow roots (with support for adoptedStyleSheets).The function behaves correctly on the first call, but on the second call it does not apply any styles. This appears to be caused by the caching of
StyleSets in theadoptedSetvariable. TheStyleSetfetched fromadoptedSeton the second call has itsrootproperty set to the root from the first call. WhenStyleSet.mountis called the old root is used and the new root receives no styles.Indeed, I introduced a bug there. Attached patch should help.
Thank you for the quick fix!