MCPcopy Create free account
hub / github.com/DioxusLabs/dioxus / create_script

Method create_script

packages/desktop/src/document.rs:51–60  ·  view source on GitHub ↗

Create a new script tag in the head

(&self, props: ScriptProps)

Source from the content-addressed store, hash-verified

49
50 /// Create a new script tag in the head
51 fn create_script(&self, props: ScriptProps) {
52 let myself = self.clone();
53 queue_effect(move || {
54 myself.eval(create_element_in_head(
55 "script",
56 &props.attributes(),
57 props.script_contents().ok(),
58 ));
59 });
60 }
61
62 /// Create a new style tag in the head
63 fn create_style(&self, props: StyleProps) {

Callers

nothing calls this directly

Calls 7

queue_effectFunction · 0.85
create_element_in_headFunction · 0.85
script_contentsMethod · 0.80
cloneMethod · 0.45
evalMethod · 0.45
attributesMethod · 0.45
okMethod · 0.45

Tested by

no test coverage detected