refactor(shim): Move node CustomEvent polyfill to Platform.shim (#357)

This commit is contained in:
absidue
2023-03-15 04:49:33 +01:00
committed by GitHub
parent 9b005d62d6
commit ffd7d79308
6 changed files with 25 additions and 25 deletions

View File

@@ -0,0 +1,13 @@
// See https://github.com/nodejs/node/issues/40678#issuecomment-1126944677
export default class CustomEvent extends Event {
#detail;
constructor(type: string, options?: CustomEventInit<any[]>) {
super(type, options);
this.#detail = options?.detail ?? null;
}
get detail() {
return this.#detail;
}
}