Trait forky_web::DocumentExt
source · pub trait DocumentExt {
Show 17 methods
// Required methods
fn get() -> Document;
fn x_head() -> HtmlHeadElement;
fn x_body() -> HtmlElement;
async fn x_await_load_by_id(id: &str) -> Result<()>;
fn x_append_child(node: &Node);
fn x_clear();
fn x_query_selector<T>(selector: &str) -> Option<T>
where T: JsCast;
fn x_create_element(local_name: &str) -> HtmlElement;
fn x_create_anchor() -> HtmlAnchorElement;
fn x_create_canvas() -> HtmlCanvasElement;
fn x_create_div() -> HtmlDivElement;
fn x_create_input() -> HtmlInputElement;
fn x_create_button() -> HtmlButtonElement;
fn x_create_paragraph() -> HtmlParagraphElement;
fn add_script_src_to_head(src: &str) -> Result<HtmlScriptElement, JsValue>;
fn add_script_content_to_body(
body: &str
) -> Result<HtmlScriptElement, JsValue>;
fn add_style_src_to_head(src: &str) -> Result<HtmlLinkElement, JsValue>;
}
Required Methods§
fn get() -> Document
fn x_head() -> HtmlHeadElement
fn x_body() -> HtmlElement
async fn x_await_load_by_id(id: &str) -> Result<()>
fn x_append_child(node: &Node)
fn x_clear()
fn x_query_selector<T>(selector: &str) -> Option<T>where
T: JsCast,
fn x_create_element(local_name: &str) -> HtmlElement
fn x_create_anchor() -> HtmlAnchorElement
fn x_create_canvas() -> HtmlCanvasElement
fn x_create_div() -> HtmlDivElement
fn x_create_input() -> HtmlInputElement
fn x_create_paragraph() -> HtmlParagraphElement
fn add_script_src_to_head(src: &str) -> Result<HtmlScriptElement, JsValue>
fn add_script_content_to_body(body: &str) -> Result<HtmlScriptElement, JsValue>
fn add_style_src_to_head(src: &str) -> Result<HtmlLinkElement, JsValue>
Object Safety§
This trait is not object safe.