Struct Ele

Source
pub struct Ele {
    pub ele: HtmlElement,
}

Fields§

§ele: HtmlElement

Implementations§

Source§

impl Ele

Source

pub fn new(target: Element) -> Self

Source

pub fn new_tag(tag: &str) -> Self

Source

pub fn new_node(node: Node) -> Self

Source

pub fn get_target(e: Event) -> Self

Source

pub fn get_current_target(e: Event) -> Self

Source

pub fn body() -> Self

Source

pub fn div() -> Self

Source

pub fn svg() -> Self

Source

pub fn input() -> Self

Source

pub fn textarea() -> Self

Source

pub fn header() -> Self

Source

pub fn strong() -> Self

Source

pub fn footer() -> Self

Source

pub fn meta() -> Self

Source

pub fn style_element() -> Self

Source

pub fn script_element() -> Self

Source

pub fn template_element() -> Self

Source

pub fn iframe() -> Self

Source

pub fn p() -> Self

Source

pub fn span() -> Self

Source

pub fn i() -> Self

Source

pub fn kbd() -> Self

Source

pub fn button() -> Self

Source

pub fn nav() -> Self

Source

pub fn section() -> Self

Source

pub fn label() -> Self

Source

pub fn form() -> Self

Source

pub fn aside() -> Self

Source

pub fn article() -> Self

Source

pub fn menu() -> Self

Source

pub fn mark() -> Self

Source

pub fn dd() -> Self

Source

pub fn dt() -> Self

Source

pub fn li() -> Self

Source

pub fn ul() -> Self

Source

pub fn ol() -> Self

Source

pub fn code() -> Self

Source

pub fn h1() -> Self

Source

pub fn h2() -> Self

Source

pub fn h3() -> Self

Source

pub fn h4() -> Self

Source

pub fn h5() -> Self

Source

pub fn h6() -> Self

Source

pub fn table() -> Self

Source

pub fn tr() -> Self

Source

pub fn th() -> Self

Source

pub fn td() -> Self

Source§

impl Ele

Source

pub fn onevent(&self, name: &str, handle: Box<dyn FnMut(Event)>) -> &Self

Source

pub fn onclick(&self, handle: Box<dyn FnMut(Event)>) -> &Self

Source

pub fn oninput(&self, handle: Box<dyn FnMut(Event)>) -> &Self

Source

pub fn onchange(&self, handle: Box<dyn FnMut(Event)>) -> &Self

Source

pub fn onscroll(&self, handle: Box<dyn FnMut(Event)>) -> &Self

Source

pub fn onwheel(&self, handle: Box<dyn FnMut(Event)>) -> &Self

Source

pub fn onblur(&self, handle: Box<dyn FnMut(Event)>) -> &Self

Source

pub fn onfocus(&self, handle: Box<dyn FnMut(Event)>) -> &Self

Source

pub fn onsubmit(&self, handle: Box<dyn FnMut(Event)>) -> &Self

Source

pub fn onselect(&self, handle: Box<dyn FnMut(Event)>) -> &Self

Source

pub fn onresize(&self, handle: Box<dyn FnMut(Event)>) -> &Self

Source

pub fn onerror(&self, handle: Box<dyn FnMut(Event)>) -> &Self

Source

pub fn ondrag(&self, handle: Box<dyn FnMut(Event)>) -> &Self

Source

pub fn ondragenter(&self, handle: Box<dyn FnMut(Event)>) -> &Self

Source

pub fn ondragexit(&self, handle: Box<dyn FnMut(Event)>) -> &Self

Source

pub fn ondragleave(&self, handle: Box<dyn FnMut(Event)>) -> &Self

Source

pub fn ondragstart(&self, handle: Box<dyn FnMut(Event)>) -> &Self

Source

pub fn onkeydown(&self, handle: Box<dyn FnMut(Event)>) -> &Self

Source

pub fn onkeypress(&self, handle: Box<dyn FnMut(Event)>) -> &Self

Source

pub fn onkeyup(&self, handle: Box<dyn FnMut(Event)>) -> &Self

Source

pub fn onmousedown(&self, handle: Box<dyn FnMut(Event)>) -> &Self

Source

pub fn onmouseenter(&self, handle: Box<dyn FnMut(Event)>) -> &Self

Source

pub fn onmouseleave(&self, handle: Box<dyn FnMut(Event)>) -> &Self

Source

pub fn onmousemove(&self, handle: Box<dyn FnMut(Event)>) -> &Self

Source

pub fn onmouseout(&self, handle: Box<dyn FnMut(Event)>) -> &Self

Source

pub fn onmouseup(&self, handle: Box<dyn FnMut(Event)>) -> &Self

Source

pub fn onmouseover(&self, handle: Box<dyn FnMut(Event)>) -> &Self

Source

pub fn ontouchstart(&self, handle: Box<dyn FnMut(Event)>) -> &Self

Source

pub fn ontouchcancel(&self, handle: Box<dyn FnMut(Event)>) -> &Self

Source

pub fn ontouchmove(&self, handle: Box<dyn FnMut(Event)>) -> &Self

Source

pub fn ontouchend(&self, handle: Box<dyn FnMut(Event)>) -> &Self

Source§

impl Ele

Source

pub fn set_inner_html(&self, text: &str) -> &Self

Source

pub fn inner_html(&self) -> String

Source

pub fn set_id(&self, id: &str) -> &Self

Source

pub fn id(&self) -> String

Source

pub fn set_text(&self, text: &str) -> &Self

Source

pub fn set_text_i32(&self, text: i32) -> &Self

Source

pub fn set_text_f64(&self, text: f64) -> &Self

Source

pub fn text(&self) -> String

Source

pub fn set_style_text(&self, style: &str) -> &Self

Source

pub fn style_text(&self) -> String

Source

pub fn set_class(&self, style: &str) -> &Self

Source

pub fn class(&self) -> String

Source

pub fn add_class(&self, class: &str) -> &Self

Source

pub fn remove_class(&self, class: &str) -> &Self

Source

pub fn contains_class(&self, class: &str) -> bool

Source

pub fn set_attr(&self, name: &str, value: &str) -> &Self

Source

pub fn attr(&self, name: &str) -> String

Source

pub fn has_attr(&self, name: &str) -> bool

Source

pub fn clone_node(&self) -> Self

Source

pub fn set_value(&self, value: &str) -> &Self

Source

pub fn value(&self) -> String

Source

pub fn set(&self, name: &str, value: &JsValue)

Source

pub fn set_str(&self, name: &str, value: &str)

Source

pub fn get(&self, name: &str) -> JsValue

Source

pub fn get_string(&self, name: &str) -> String

Source

pub fn delete(&self, name: &str)

Source

pub fn placeholder(&self, value: &str) -> &Self

Source§

impl Ele

Source

pub fn query(&self, selector: &str) -> Option<Ele>

Source

pub fn query_all(&self, selector: &str) -> Vec<Ele>

Source§

impl Ele

Source

pub fn document_query(selector: &str) -> Option<Ele>

Source

pub fn document_query_all(&self, selector: &str) -> Vec<Ele>

Source

pub fn body_query(selector: &str) -> Option<Ele>

Source

pub fn body_query_all(&self, selector: &str) -> Vec<Ele>

Source

pub fn get_element_by_id(id: &str) -> Option<Ele>

Source§

impl Ele

Source

pub fn remove(&self)

Source

pub fn append(&self, list: Vec<&Ele>) -> &Self

Source

pub fn append_child(&self, target: &Ele) -> &Self

Source

pub fn children(&self, list: Vec<&Ele>) -> &Self

Trait Implementations§

Source§

impl Clone for Ele

Source§

fn clone(&self) -> Ele

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Ele

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<Ele> for JsValue

Source§

fn from(s: Ele) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl Freeze for Ele

§

impl RefUnwindSafe for Ele

§

impl !Send for Ele

§

impl !Sync for Ele

§

impl Unpin for Ele

§

impl UnwindSafe for Ele

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.