Skip to content

Commit 1fb81ce

Browse files
committed
move shadow innerHTML to constructor
1 parent 2a99375 commit 1fb81ce

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/shader-doodle.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,11 @@ class ShaderDoodleElement extends SDNodeElement {
1414
constructor() {
1515
super();
1616
this.shadow = this.attachShadow({ mode: 'open' });
17-
}
18-
19-
connectedCallback() {
2017
this.shadow.innerHTML = Template.render(this.width, this.height);
2118
this.canvas = Template.map(this.shadow).canvas;
19+
}
2220

21+
connectedCallback() {
2322
setTimeout(() => {
2423
try {
2524
this.init();

0 commit comments

Comments
 (0)