Skip to content

Commit 609a4ab

Browse files
author
Steve Orvell
committed
debugging: only without native null
1 parent 3eaf560 commit 609a4ab

2 files changed

Lines changed: 21 additions & 22 deletions

File tree

packages/scoped-custom-element-registry/test/DeclarativeShadowRoot.test.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
class extends HTMLElement {
2020
constructor() {
2121
super();
22-
console.warn('constructing GLOBAL', this.localName);
2322
this.attachShadow({
2423
mode: 'open',
2524
}).innerHTML = `${this.localName}: global`;

packages/scoped-custom-element-registry/test/DeclarativeShadowRoot.test.html.js

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -20,27 +20,27 @@ describe('Declarative ShadowRoot', () => {
2020
const host = document.getElementById('host2');
2121
expect(host.shadowRoot).not.to.be.null;
2222
expect(host.shadowRoot.customElementRegistry).to.be.null;
23-
// const ce = host.shadowRoot.firstElementChild;
24-
// expect(ce.customElementRegistry).to.be.null;
25-
// expect(ce).not.to.be.instanceOf(customElements.get(ce.localName));
23+
const ce = host.shadowRoot.firstElementChild;
24+
expect(ce.customElementRegistry).to.be.null;
25+
expect(ce).not.to.be.instanceOf(customElements.get(ce.localName));
2626
});
2727

28-
// it('should customize when registry initializes', () => {
29-
// const host = document.getElementById('host2');
30-
// const registry = new CustomElementRegistry();
31-
// class RegistryDsdElement extends HTMLElement {
32-
// constructor() {
33-
// super();
34-
// this.attachShadow({
35-
// mode: 'open',
36-
// }).innerHTML = `${this.localName}: scoped`;
37-
// }
38-
// }
39-
// registry.define('dsd-element', RegistryDsdElement);
40-
// registry.initialize(host.shadowRoot);
41-
// expect(host.shadowRoot.customElementRegistry).to.be.equal(registry);
42-
// const ce = host.shadowRoot.firstElementChild;
43-
// expect(ce.customElementRegistry).to.be.equal(registry);
44-
// expect(ce).to.be.instanceOf(RegistryDsdElement);
45-
// });
28+
it('should customize when registry initializes', () => {
29+
const host = document.getElementById('host2');
30+
const registry = new CustomElementRegistry();
31+
class RegistryDsdElement extends HTMLElement {
32+
constructor() {
33+
super();
34+
this.attachShadow({
35+
mode: 'open',
36+
}).innerHTML = `${this.localName}: scoped`;
37+
}
38+
}
39+
registry.define('dsd-element', RegistryDsdElement);
40+
registry.initialize(host.shadowRoot);
41+
expect(host.shadowRoot.customElementRegistry).to.be.equal(registry);
42+
const ce = host.shadowRoot.firstElementChild;
43+
expect(ce.customElementRegistry).to.be.equal(registry);
44+
expect(ce).to.be.instanceOf(RegistryDsdElement);
45+
});
4646
});

0 commit comments

Comments
 (0)