Move notebook container into shadow DOM
Follow the example of the `<hypothesis-sidebar>` element by making the `<hypothesis-notebook>` element an unstyled shadow-host which serves as the root container for the notebook, isolating it from the page's styles. Inside this is a styled element which serves as the visual container. As well as isolating the notebook from the host page's styles, this will also make it possible to avoid loading annotator styles into the host page. See https://github.com/hypothesis/client/issues/2979. To reduce resource usage a little when the notebook is not used, only the notebook's shadow host is created initially. The styled inner container is created when the notebook is shown for the first time.
Showing
Please register or sign in to comment