Skip to content
Snippets Groups Projects
  • Reiter, Christoph's avatar
    9a638b18
    Add getShadowRootDocument() helper · 9a638b18
    Reiter, Christoph authored
    In case the scoped registry polyfill is loaded we need to create
    elements inside of the shadowroot.
    
    getShadowRootDocument() returns the polyfilled shadowroot, or in case
    the polyfill is not loaded just return the global document, which works
    in case there are no scoped registries.
    
    In case we get something like https://github.com/open-wc/open-wc/pull/2389
    this will be usefull. Also it makes IDE completion work + eslint.
    9a638b18
    History
    Add getShadowRootDocument() helper
    Reiter, Christoph authored
    In case the scoped registry polyfill is loaded we need to create
    elements inside of the shadowroot.
    
    getShadowRootDocument() returns the polyfilled shadowroot, or in case
    the polyfill is not loaded just return the global document, which works
    in case there are no scoped registries.
    
    In case we get something like https://github.com/open-wc/open-wc/pull/2389
    this will be usefull. Also it makes IDE completion work + eslint.