-
Notifications
You must be signed in to change notification settings - Fork 0
Shadow DOM
Glenn Vandeuren edited this page Mar 20, 2017
·
7 revisions
Backed(class CoolElement extends HTMLElement {
created() {
// When on Custom Elements V0, attachShadow will actually call createShadowRoot().
this.root = this.attachShadow({mode: 'open'});
this.root.innerHTML = '<slot></slot>';
}
connected() {
this.innerHTML = 'Hello world!';
}
ready() {
// Backed is finished, all properties & attributes are set
}
});