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

Method create_script

packages/liveview/src/document.rs:110–119  ·  view source on GitHub ↗

Create a new script tag in the head

(&self, props: ScriptProps)

Source from the content-addressed store, hash-verified

108
109 /// Create a new script tag in the head
110 fn create_script(&self, props: ScriptProps) {
111 let myself = self.clone();
112 queue_effect(move || {
113 myself.eval(create_element_in_head(
114 "script",
115 &props.attributes(),
116 props.script_contents().ok(),
117 ));
118 });
119 }
120
121 /// Create a new style tag in the head
122 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