feat: make internal Svelte Custom Element treeshakable

pull/16075/head
Justinas Delinda 4 months ago
parent 2342c8719a
commit 802afc6b7b

@ -0,0 +1,5 @@
---
'svelte': patch
---
Make internal Svelte Custom Element treeshakable

@ -10,11 +10,12 @@ import { define_property, get_descriptor, object_keys } from '../../../shared/ut
* @property {'String'|'Boolean'|'Number'|'Array'|'Object'} [type]
*/
/** @type {any} */
let SvelteElement;
function get_svelte_element_class() {
if (typeof HTMLElement !== 'function') {
return;
}
if (typeof HTMLElement === 'function') {
SvelteElement = class extends HTMLElement {
return class extends HTMLElement {
/** The Svelte component constructor */
$$ctor;
/** Slots */
@ -219,6 +220,9 @@ if (typeof HTMLElement === 'function') {
};
}
/** @type {any} */
const SvelteElement = /* @__PURE__ */ get_svelte_element_class();
/**
* @param {string} prop
* @param {any} value

Loading…
Cancel
Save