Type of Change
Summary
Just want to make sure I'm properly handling HTMLElement.getInnerHTML for?
getInnerHTML(options = {}) {
return options.includeShadowRoots
? `
<template shadowroot="${this.shadowRoot.mode}">
${this.shadowRoot.innerHTML}
</template>
`
: this.shadowRoot.innerHTML;
}
Details
Coming out of #19 and made a repo for testing, since it appears I might be taking some serious liberties with the implementation here. 😅
https://github.com/thescientist13/get-inner-html
Somewhat related to this, not sure if there is value in having a way to opt-out at the top level for this, like if your page is a custom element? Perhaps you want your page as light DOM, but still keep the shadow DOM for all nested children?
edit: to the above, I just recently pulled a feature called lightMode since I realized a better way to output non shadow content was to just let user's opt-out by using innerHTML. But in relation to this, if say someone is using a third party library and wants that library rendered without Shadow DOM (obviously mileage will vary vastly on this from lib to lib) but then that's a way to bring that config back?
Type of Change
Summary
Just want to make sure I'm properly handling
HTMLElement.getInnerHTMLfor?Details
Coming out of #19 and made a repo for testing, since it appears I might be taking some serious liberties with the implementation here. 😅
https://github.com/thescientist13/get-inner-html
Somewhat related to this, not sure if there is value in having a way to opt-out at the top level for this, like if your page is a custom element? Perhaps you want your page as light DOM, but still keep the shadow DOM for all nested children?
edit: to the above, I just recently pulled a feature called
lightModesince I realized a better way to output non shadow content was to just let user's opt-out by usinginnerHTML. But in relation to this, if say someone is using a third party library and wants that library rendered without Shadow DOM (obviously mileage will vary vastly on this from lib to lib) but then that's a way to bring that config back?