fixed architecture to dispatch events when routes and token changes

This commit is contained in:
Fran Jurmanović
2021-05-31 12:00:07 +02:00
parent 48df6fc7cf
commit e1ab0e51d6
10 changed files with 131 additions and 29 deletions

View File

@@ -3,6 +3,7 @@ import { target } from "@github/catalyst";
class BaseLayoutElement extends HTMLElement {
@target slotted: HTMLElement;
public isLayout: boolean = true;
public _slotted: string;
constructor() {
super();
}
@@ -19,7 +20,9 @@ class BaseLayoutElement extends HTMLElement {
};
setElement = (newTag: string) => {
this.slotted.innerHTML = `<${newTag}></${newTag}>`;
const _slotted = `<${newTag}></${newTag}>`;
this._slotted = _slotted;
this.slotted.innerHTML = _slotted;
};
}