Home / Function/ constructor() — svelte Function Reference

constructor() — svelte Function Reference

Architecture documentation for the constructor() function in url.js from the svelte codebase.

Entity Profile

Dependency Diagram

graph TD
  c71ab870_d61a_b6ae_5f3b_186fe2bf4681["constructor()"]
  25654e33_e6d5_1b08_6baf_586a26ac3d8f["SvelteURL"]
  c71ab870_d61a_b6ae_5f3b_186fe2bf4681 -->|defined in| 25654e33_e6d5_1b08_6baf_586a26ac3d8f
  4dfcf957_8573_ff55_bd31_4181227109e3["tag()"]
  c71ab870_d61a_b6ae_5f3b_186fe2bf4681 -->|calls| 4dfcf957_8573_ff55_bd31_4181227109e3
  style c71ab870_d61a_b6ae_5f3b_186fe2bf4681 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/svelte/src/reactivity/url.js lines 57–75

	constructor(url, base) {
		url = new URL(url, base);
		super(url);

		if (DEV) {
			tag(this.#protocol, 'SvelteURL.protocol');
			tag(this.#username, 'SvelteURL.username');
			tag(this.#password, 'SvelteURL.password');
			tag(this.#hostname, 'SvelteURL.hostname');
			tag(this.#port, 'SvelteURL.port');
			tag(this.#pathname, 'SvelteURL.pathname');
			tag(this.#hash, 'SvelteURL.hash');
			tag(this.#search, 'SvelteURL.search');
		}

		current_url = this;
		this.#searchParams = new SvelteURLSearchParams(url.searchParams);
		current_url = null;
	}

Subdomains

Calls

Frequently Asked Questions

What does constructor() do?
constructor() is a function in the svelte codebase, defined in packages/svelte/src/reactivity/url.js.
Where is constructor() defined?
constructor() is defined in packages/svelte/src/reactivity/url.js at line 57.
What does constructor() call?
constructor() calls 1 function(s): tag.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free