### Describe the bug Compiled components use a deprecated `initCustomEvent`, which is not supported by e.g. `happy-dom`. Instead of ``` function custom_event(type, detail, bubbles = false) { const e = document.createEvent('CustomEvent'); e.initCustomEvent(type, bubbles, false, detail); return e; } ``` it would be nice to use the CustomEvent constructor, which is supported in all modern browsers. https://caniuse.com/?search=CustomEvent ### Reproduction Open `svelte/internal/index.mjs` ### Logs _No response_ ### System Info ```shell Not relevant ``` ### Severity annoyance