To create a declarative shadow root, attributes on the template must be set, e.g.:
<my-custom-element>
<template shadowrootmode=open shadowrootdelegatesfocus>...</template>
</my-custom-element>
However, those attributes are handled at parse time, and the sanitizer doesn't recognize them as "attributes". This means that in the current spec, removeAttributes: ["shadowrootmode"] doesn't prevent declarative shadow roots, and likewise removeElements: ["template"].
Is this WAI, or an oversight?
(Note, this is different from #45 which was about allowing the sanitizer to "see into" the shadow root)
cc @mozfreddyb @otherdaniel