From 2f5a885f82452b34b49f9396e9423e5035cea554 Mon Sep 17 00:00:00 2001 From: Cyperghost Date: Fri, 18 Oct 2024 14:15:41 +0200 Subject: [PATCH] Can't extends custom elements --- .../Core/Component/EmojiPicker/woltlab-core-emoji-picker.ts | 6 +----- .../Core/Component/EmojiPicker/woltlab-core-emoji-picker.js | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/ts/WoltLabSuite/Core/Component/EmojiPicker/woltlab-core-emoji-picker.ts b/ts/WoltLabSuite/Core/Component/EmojiPicker/woltlab-core-emoji-picker.ts index 4398f8ce1e..f3cadfebc8 100644 --- a/ts/WoltLabSuite/Core/Component/EmojiPicker/woltlab-core-emoji-picker.ts +++ b/ts/WoltLabSuite/Core/Component/EmojiPicker/woltlab-core-emoji-picker.ts @@ -29,8 +29,4 @@ export class WoltlabCoreEmojiPicker extends Picker { } } -void customElements.whenDefined("emoji-picker").then(() => { - customElements.define("woltlab-core-emoji-picker", WoltlabCoreEmojiPicker, { - extends: "emoji-picker", - }); -}); +customElements.define("woltlab-core-emoji-picker", WoltlabCoreEmojiPicker); diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Component/EmojiPicker/woltlab-core-emoji-picker.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Component/EmojiPicker/woltlab-core-emoji-picker.js index 43b89a01e5..194d79455b 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Component/EmojiPicker/woltlab-core-emoji-picker.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Component/EmojiPicker/woltlab-core-emoji-picker.js @@ -24,9 +24,5 @@ define(["require", "exports", "emoji-picker-element", "WoltLabSuite/Core/Compone } } exports.WoltlabCoreEmojiPicker = WoltlabCoreEmojiPicker; - void customElements.whenDefined("emoji-picker").then(() => { - customElements.define("woltlab-core-emoji-picker", WoltlabCoreEmojiPicker, { - extends: "emoji-picker", - }); - }); + customElements.define("woltlab-core-emoji-picker", WoltlabCoreEmojiPicker); }); -- 2.20.1