use connected callback for loading SVGs instead of constructor
This commit is contained in:
parent
c4685355b5
commit
f155578daa
1 changed files with 1 additions and 2 deletions
|
@ -1,6 +1,5 @@
|
|||
class svgLoad extends HTMLElement {
|
||||
constructor(){
|
||||
super();
|
||||
connectedCallback() {
|
||||
let svgName = this.getAttribute("data-name");
|
||||
let xhr = new XMLHttpRequest();
|
||||
xhr.onreadystatechange = () => {
|
||||
|
|
Loading…
Reference in a new issue