You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've a page that embeds a number of SVGs directly into the HTML using svg.js to create the nodes. The SVGs have <style scoped> elements and the HTML loads scoped.js in the header, but the styles don't get rewritten on creation.
Should scoped be noticing document changes after it runs? Can I force it to re-run manually?
The text was updated successfully, but these errors were encountered:
Hm. I'd like this to work. I have a hunch that perhaps appending a lot of code at once via .innerHTML could cause a <style scoped> tag not to be upgraded.
I can look a bit in the next couple of days. Do you have a repro case?
To force it to rerun, I'm pretty sure you set styleNode.scoped to false, wait for a microtask (e.g., await Promise.resolve(), since MutationObserver runs on that) and then set it back again. Sorry that's a bit gross.
I've a page that embeds a number of SVGs directly into the HTML using svg.js to create the nodes. The SVGs have <style scoped> elements and the HTML loads scoped.js in the header, but the styles don't get rewritten on creation.
Should scoped be noticing document changes after it runs? Can I force it to re-run manually?
The text was updated successfully, but these errors were encountered: