diff --git a/.changeset/polite-crabs-admire.md b/.changeset/polite-crabs-admire.md new file mode 100644 index 0000000..243f924 --- /dev/null +++ b/.changeset/polite-crabs-admire.md @@ -0,0 +1,5 @@ +--- +"haunted": patch +--- + +Don't use Shadow Root for contexts. diff --git a/src/create-context.ts b/src/create-context.ts index 5a624a1..c9eecc8 100644 --- a/src/create-context.ts +++ b/src/create-context.ts @@ -76,7 +76,7 @@ function makeContext(component: ComponentCreator): Creator { const context = useContext(Context); return render(context); - }), + }, { useShadowDOM: false }), defaultValue, }; diff --git a/test/context.test.ts b/test/context.test.ts index 024fc3c..569ec71 100644 --- a/test/context.test.ts +++ b/test/context.test.ts @@ -93,7 +93,7 @@ describe('context', function() { } function getContentResults(selector: string) { - return [...document.querySelector('context-tests').shadowRoot.querySelectorAll(selector)].map((consumer) => (consumer).shadowRoot.textContent); + return [...document.querySelector('context-tests').shadowRoot.querySelectorAll(selector)].map((consumer) => (consumer).textContent); } beforeEach(async () => {