Last active
June 9, 2022 05:23
-
-
Save mvneerven/0c9b98f60a4869691f616c76e7f9a99f to your computer and use it in GitHub Desktop.
Revisions
-
mvneerven revised this gist
Jun 2, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import { Events } from "./events"; export class MyClass { events = new Events(this); // there we go! constructor(data) { await init(); -
mvneerven revised this gist
Jun 2, 2022 . 1 changed file with 8 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,5 +15,13 @@ export class MyClass { // omitted } }); /* or.... this.dispatchEvent(new CustomEvent("ready", { detail: { // omitted } })); */ } } -
mvneerven created this gist
Jun 2, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ import { Events } from "./events"; export class MyClass { events = new Events(this); constructor(data) { await init(); } async init() { // omitted code this.emit("ready", { detail: { // omitted } }); } }