custom-element.js — svelte Source File
Architecture documentation for custom-element.js, a javascript file in the svelte codebase. 8 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 1a45e32c_24fc_a764_ca2d_b81df9bec325["custom-element.js"] 9478150a_17fe_efce_10bd_3938ed8558e2["legacy-client.js"] 1a45e32c_24fc_a764_ca2d_b81df9bec325 --> 9478150a_17fe_efce_10bd_3938ed8558e2 6b2154e5_6ad8_6202_e830_6eed90af75e8["createClassComponent"] 1a45e32c_24fc_a764_ca2d_b81df9bec325 --> 6b2154e5_6ad8_6202_e830_6eed90af75e8 1ae6fa4e_16ee_acdf_5e28_17eb0819fddb["effects.js"] 1a45e32c_24fc_a764_ca2d_b81df9bec325 --> 1ae6fa4e_16ee_acdf_5e28_17eb0819fddb cf74814c_38ff_1817_80eb_cbc1bb490472["effect_root"] 1a45e32c_24fc_a764_ca2d_b81df9bec325 --> cf74814c_38ff_1817_80eb_cbc1bb490472 7494b934_a3b8_689e_91b6_8435e26461c5["render_effect"] 1a45e32c_24fc_a764_ca2d_b81df9bec325 --> 7494b934_a3b8_689e_91b6_8435e26461c5 2ab7c579_f011_f472_7847_c9e9979c6b2a["template.js"] 1a45e32c_24fc_a764_ca2d_b81df9bec325 --> 2ab7c579_f011_f472_7847_c9e9979c6b2a e3f9d623_9f97_2d01_0473_63e757414179["append"] 1a45e32c_24fc_a764_ca2d_b81df9bec325 --> e3f9d623_9f97_2d01_0473_63e757414179 cb946435_ce66_d1e8_6bee_287bdb07e7c5["utils.js"] 1a45e32c_24fc_a764_ca2d_b81df9bec325 --> cb946435_ce66_d1e8_6bee_287bdb07e7c5 style 1a45e32c_24fc_a764_ca2d_b81df9bec325 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { createClassComponent } from '../../../../legacy/legacy-client.js';
import { effect_root, render_effect } from '../../reactivity/effects.js';
import { append } from '../template.js';
import { define_property, get_descriptor, object_keys } from '../../../shared/utils.js';
/**
* @typedef {Object} CustomElementPropDefinition
* @property {string} [attribute]
* @property {boolean} [reflect]
* @property {'String'|'Boolean'|'Number'|'Array'|'Object'} [type]
*/
/** @type {any} */
let SvelteElement;
if (typeof HTMLElement === 'function') {
SvelteElement = class extends HTMLElement {
/** The Svelte component constructor */
$$ctor;
/** Slots */
$$s;
/** @type {any} The Svelte component instance */
$$c;
/** Whether or not the custom element is connected */
$$cn = false;
/** @type {Record<string, any>} Component props data */
$$d = {};
/** `true` if currently in the process of reflecting component props back to attributes */
$$r = false;
/** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
$$p_d = {};
/** @type {Record<string, EventListenerOrEventListenerObject[]>} Event listeners */
$$l = {};
/** @type {Map<EventListenerOrEventListenerObject, Function>} Event listener unsubscribe functions */
$$l_u = new Map();
/** @type {any} The managed render effect for reflecting attributes */
$$me;
/** @type {ShadowRoot | null} The ShadowRoot of the custom element */
$$shadowRoot = null;
/**
* @param {*} $$componentCtor
* @param {*} $$slots
* @param {ShadowRootInit | undefined} shadow_root_init
*/
constructor($$componentCtor, $$slots, shadow_root_init) {
super();
this.$$ctor = $$componentCtor;
this.$$s = $$slots;
if (shadow_root_init) {
// We need to store the reference to shadow root, because `closed` shadow root cannot be
// accessed with `this.shadowRoot`.
this.$$shadowRoot = this.attachShadow(shadow_root_init);
}
}
/**
* @param {string} type
* @param {EventListenerOrEventListenerObject} listener
// ... (284 more lines)
Domain
Subdomains
Dependencies
Source
Frequently Asked Questions
What does custom-element.js do?
custom-element.js is a source file in the svelte codebase, written in javascript. It belongs to the ClientRuntime domain, DOMOperations subdomain.
What functions are defined in custom-element.js?
custom-element.js defines 3 function(s): create_custom_element, get_custom_element_value, get_custom_elements_slots.
What does custom-element.js depend on?
custom-element.js imports 8 module(s): append, createClassComponent, effect_root, effects.js, legacy-client.js, render_effect, template.js, utils.js.
Where is custom-element.js in the architecture?
custom-element.js is located at packages/svelte/src/internal/client/dom/elements/custom-element.js (domain: ClientRuntime, subdomain: DOMOperations, directory: packages/svelte/src/internal/client/dom/elements).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free