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

Method create_head_element

packages/document/src/document.rs:74–83  ·  view source on GitHub ↗

Create a new element in the head

(
        &self,
        name: &str,
        attributes: &[(&str, String)],
        contents: Option<String>,
    )

Source from the content-addressed store, hash-verified

72
73 /// Create a new element in the head
74 fn create_head_element(
75 &self,
76 name: &str,
77 attributes: &[(&str, String)],
78 contents: Option<String>,
79 ) {
80 // This default implementation remains to make the trait compatible with the 0.6 version, but it should not be used
81 // The element should only be created inside an effect so it is not called while the component is suspended
82 self.eval(create_element_in_head(name, attributes, contents));
83 }
84
85 /// Create a new meta tag in the head
86 fn create_meta(&self, props: MetaProps) {

Callers 4

create_metaMethod · 0.45
create_scriptMethod · 0.45
create_styleMethod · 0.45
create_linkMethod · 0.45

Implementers 8

dioxus_document.rspackages/native-dom/src/dioxus_documen
document.rspackages/desktop/src/document.rs
document.rspackages/fullstack-core/src/document.r
document.rspackages/liveview/src/document.rs
document.rspackages/document/src/document.rs
document.rspackages/fullstack-server/src/document
document.rspackages/web/src/document.rs
contexts.rspackages/native/src/contexts.rs

Calls 2

create_element_in_headFunction · 0.85
evalMethod · 0.45

Tested by

no test coverage detected