MCPcopy Create free account
hub / github.com/bytecodealliance/component-docs / writeSlugToUrl

Function writeSlugToUrl

component-model/theme/tabs-url-sync.js:14–18  ·  view source on GitHub ↗
(slug)

Source from the content-addressed store, hash-verified

12 }
13
14 function writeSlugToUrl(slug) {
15 const url = new URL(window.location.href);
16 url.searchParams.set(PARAM_NAME, slug);
17 history.replaceState(null, '', url.toString());
18 }
19
20 function activateByName(name) {
21 const tab = document.querySelector(

Callers 1

tabs-url-sync.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…