-
Notifications
You must be signed in to change notification settings - Fork 38.2k
Description
#120137 uses Shadow DOM to isolate rendered markdown cells in notebooks.I propose we also adopt Shadow DOM for the output renderers.
The main benefit is isolation: Shadow DOMs should prevent css from one output rendered leaking over into another output renderer. It should also help prevent css from an output renderer leaking into the rest of the back layer webview. This isolation would not be perfect, but I think using a Shadow DOM would steer output renderers in the correct direction
This would be a breaking change for the output renderer API. Specifically, it would break renderers that insert global styles/scripts into the back layer webview. Code like this from the GitHub issue notebook would no longer work (although the workaround is pretty simple: just insert the link tag into the Shadow DOM instead)