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

Function readSlugFromUrl

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

Source from the content-addressed store, hash-verified

7 const NAME_TO_SLUG = { 'WASI P2': 'p2', 'WASI P3': 'p3' };
8
9 function readSlugFromUrl() {
10 const value = new URLSearchParams(window.location.search).get(PARAM_NAME);
11 return value && SLUG_TO_NAME[value] ? value : null;
12 }
13
14 function writeSlugToUrl(slug) {
15 const url = new URL(window.location.href);

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…