Skip to content

Commit 05dbbb1

Browse files
fix: remove unnecessary Shadow DOM environment guards from ShadowDOMSuite (jitSuite is browser-only)
Co-authored-by: NullVoxPopuli <[email protected]> Agent-Logs-Url: https://github.com/emberjs/ember.js/sessions/b893cd15-386a-4913-8907-af52f66f8772
1 parent 15154be commit 05dbbb1

1 file changed

Lines changed: 0 additions & 30 deletions

File tree

  • packages/@glimmer-workspace/integration-tests/lib/suites

packages/@glimmer-workspace/integration-tests/lib/suites/shadow-dom.ts

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@ export class ShadowDOMSuite extends RenderTest {
1010

1111
@test
1212
'Renders content into shadow root via declarative shadow DOM (<template shadowrootmode="open">)'() {
13-
if (typeof document === 'undefined' || !('attachShadow' in document.createElement('div'))) {
14-
this.assert.ok(true, 'Shadow DOM not supported, skipping');
15-
return;
16-
}
17-
1813
// Render a template that uses declarative shadow DOM syntax.
1914
// The <template shadowrootmode="open"> should cause Glimmer to attach a
2015
// shadow root to the parent element and render children into it.
@@ -36,11 +31,6 @@ export class ShadowDOMSuite extends RenderTest {
3631

3732
@test
3833
'Shadow DOM content renders alongside regular DOM content'() {
39-
if (typeof document === 'undefined' || !('attachShadow' in document.createElement('div'))) {
40-
this.assert.ok(true, 'Shadow DOM not supported, skipping');
41-
return;
42-
}
43-
4434
this.render(
4535
'<div><p>regular content</p><div><template shadowrootmode="open"><em>shadow content</em></template></div></div>'
4636
);
@@ -66,11 +56,6 @@ export class ShadowDOMSuite extends RenderTest {
6656

6757
@test
6858
'<template shadowrootmode="open"> as component root renders into the parent element shadow root'() {
69-
if (typeof document === 'undefined' || !('attachShadow' in document.createElement('div'))) {
70-
this.assert.ok(true, 'Shadow DOM not supported, skipping');
71-
return;
72-
}
73-
7459
this.registerComponent(
7560
'TemplateOnly',
7661
'ShadowComp',
@@ -108,11 +93,6 @@ export class ShadowDOMSuite extends RenderTest {
10893

10994
@test
11095
'<template shadowrootmode="open"> as component root re-renders correctly after full component recreation'() {
111-
if (typeof document === 'undefined' || !('attachShadow' in document.createElement('div'))) {
112-
this.assert.ok(true, 'Shadow DOM not supported, skipping');
113-
return;
114-
}
115-
11696
this.registerComponent(
11797
'TemplateOnly',
11898
'ShadowComp',
@@ -152,11 +132,6 @@ export class ShadowDOMSuite extends RenderTest {
152132

153133
@test
154134
'<template shadowrootmode="open"> as component root with tracked state re-renders into same shadow root'() {
155-
if (typeof document === 'undefined' || !('attachShadow' in document.createElement('div'))) {
156-
this.assert.ok(true, 'Shadow DOM not supported, skipping');
157-
return;
158-
}
159-
160135
class Counter extends GlimmerishComponent {
161136
@tracked count = 0;
162137
}
@@ -199,11 +174,6 @@ export class ShadowDOMSuite extends RenderTest {
199174

200175
@test
201176
'conditional <template shadowrootmode="open"> inside a host element attaches shadow root when rendered'() {
202-
if (typeof document === 'undefined' || !('attachShadow' in document.createElement('div'))) {
203-
this.assert.ok(true, 'Shadow DOM not supported, skipping');
204-
return;
205-
}
206-
207177
this.render(
208178
'<div class="host">{{#if this.useShadow}}<template shadowrootmode="open"><p>shadow content</p></template>{{else}}<div>regular content</div>{{/if}}</div>',
209179
{ useShadow: true }

0 commit comments

Comments
 (0)