MCPcopy Create free account
hub / github.com/GrapesJS/react / loadStyle

Function loadStyle

packages/grapesjs-react/src/utils/dom.ts:9–14  ·  view source on GitHub ↗
(href: string)

Source from the content-addressed store, hash-verified

7export const stop = (ev?: Event) => ev?.stopPropagation();
8
9export const loadStyle = async (href: string) => {
10 const link = document.createElement('link');
11 link.href = href;
12 link.rel = 'stylesheet';
13 document.head.appendChild(link);
14};
15
16type ScriptToLoad = { id: string; src: string };
17

Callers 1

initFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected