Fix additional attributes for js renderers (#3625)
This commit is contained in:
1 parent
67515ce812
commit
2d188452ae
10 files changed
+125
-1
No files matched your search
@@ -62,6 +62,7 @@ fn app() -> Element {
|
||||
PreventDefault {}
|
||||
OnMounted {}
|
||||
WebSysClosure {}
|
||||
DocumentElements {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,6 +139,22 @@ fn WebSysClosure() -> Element {
|
||||
}
|
||||
}
|
||||
|
||||
/// This component tests the document::* elements
|
||||
#[component]
|
||||
fn DocumentElements() -> Element {
|
||||
rsx! {
|
||||
document::Meta { id: "meta-head", name: "testing", data: "dioxus-meta-element" }
|
||||
document::Link {
|
||||
id: "link-head",
|
||||
rel: "stylesheet",
|
||||
href: "https://fonts.googleapis.com/css?family=Roboto+Mono"
|
||||
}
|
||||
document::Stylesheet { id: "stylesheet-head", href: "https://fonts.googleapis.com/css?family=Roboto:300,300italic,700,700italic" }
|
||||
document::Script { id: "script-head", async: true, "console.log('hello world');" }
|
||||
document::Style { id: "style-head", "body {{ font-family: 'Roboto'; }}" }
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
tracing_wasm::set_as_global_default_with_config(
|
||||
tracing_wasm::WASMLayerConfigBuilder::default()
|
||||
|
||||
Reference in new issue
Block a user