MCPcopy Index your code
hub / github.com/RustPython/RustPython / addCSS

Function addCSS

wasm/notebook/src/process.js:43–50  ·  view source on GitHub ↗
(code)

Source from the content-addressed store, hash-verified

41}
42
43function addCSS(code) {
44 let style = document.createElement('style');
45 style.type = 'text/css';
46 style.innerHTML = code;
47 // add a data attribute to check if css already loaded
48 style.dataset.status = 'loaded';
49 document.getElementsByTagName('head')[0].appendChild(style);
50}
51
52function checkCssStatus() {
53 let style = document.getElementsByTagName('style')[0];

Callers 1

executeNotebookFunction · 0.90

Calls 3

createElementMethod · 0.80
appendChildMethod · 0.45
getElementsByTagNameMethod · 0.45

Tested by

no test coverage detected