-
-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathindex.test.html
More file actions
31 lines (22 loc) · 691 Bytes
/
index.test.html
File metadata and controls
31 lines (22 loc) · 691 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<script>
class FooBar extends HTMLElement {
constructor () {
super ()
console.log('this issss', this)
this.attachShadow({ mode: 'open' })
} // constructor
connectedCallback () {
console.log('CONNECTED!!!!', this.tagName, this, this.outerHTML, this.childNodes.length)
console.log (this.foo)
console.log (this.bar)
for ( let node of this.childNodes.values () )
console.log( node )
console.log ( document.querySelector ('[role=application]') )
} // connectedCallback
get foo () { return 'foo' }
get bar () { return 'bar' }
}
customElements.define ( 'foo-bar', FooBar )
</script>
<h1>Test Harness</h1>
<foo-bar>Hot<br />Damn!</foo-bar>