Trait dioxus_html::document::Document

source ·
pub trait Document {
    // Required methods
    fn new_evaluator(&self, js: String) -> GenerationalBox<Box<dyn Evaluator>>;
    fn as_any(&self) -> &dyn Any;

    // Provided methods
    fn set_title(&self, title: String) { ... }
    fn create_meta(&self, props: MetaProps) { ... }
    fn create_script(&self, props: ScriptProps) { ... }
    fn create_style(&self, props: StyleProps) { ... }
    fn create_link(&self, props: LinkProps) { ... }
}
Expand description

A provider for document-related functionality. By default most methods are driven through [eval].

Required Methods§

source

fn new_evaluator(&self, js: String) -> GenerationalBox<Box<dyn Evaluator>>

Create a new evaluator for the document that evaluates JavaScript and facilitates communication between JavaScript and Rust.

source

fn as_any(&self) -> &dyn Any

Get a reference to the document as dyn Any

Provided Methods§

source

fn set_title(&self, title: String)

Set the title of the document

source

fn create_meta(&self, props: MetaProps)

Create a new meta tag

source

fn create_script(&self, props: ScriptProps)

Create a new script tag

source

fn create_style(&self, props: StyleProps)

Create a new style tag

Create a new link tag

Implementors§