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

Method create_script

packages/web/src/document.rs:138–146  ·  view source on GitHub ↗

Create a new script tag in the head

(&self, props: ScriptProps)

Source from the content-addressed store, hash-verified

136
137 /// Create a new script tag in the head
138 fn create_script(&self, props: ScriptProps) {
139 queue_effect(move || {
140 _ = append_element_to_head(
141 "script",
142 &props.attributes(),
143 props.script_contents().ok().as_deref(),
144 );
145 });
146 }
147
148 /// Create a new style tag in the head
149 fn create_style(&self, props: StyleProps) {

Callers

nothing calls this directly

Calls 6

queue_effectFunction · 0.85
append_element_to_headFunction · 0.85
script_contentsMethod · 0.80
attributesMethod · 0.45
as_derefMethod · 0.45
okMethod · 0.45

Tested by

no test coverage detected