MCPcopy Create free account
hub / github.com/csskit/csskit / loadExample

Method loadExample

website/script/index.js:669–677  ·  view source on GitHub ↗
(example)

Source from the content-addressed store, hash-verified

667 }
668
669 async loadExample(example) {
670 if (example == "") {
671 return this.dispatchEvent(new LoadCodeEvent(""));
672 }
673 const res = await fetch(new URL(example, window.location.href));
674 if (res.ok) {
675 this.dispatchEvent(new LoadCodeEvent(await res.text()));
676 }
677 }
678}
679
680class WasmLoader extends HTMLElement {

Callers 2

handleEventMethod · 0.95
setValueFromUrlMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected