[][src]Struct stdweb::web::Node

pub struct Node(_);

A reference to a JavaScript object which implements the INode interface.

(JavaScript docs)

Methods

impl Node[src]

pub fn from_html(html: &str) -> Result<Node, SyntaxError>[src]

Attempt to create the Node from raw html. The html string must contain exactly one root node.

Returns a SyntaxError if:

  • There is not exactly one root node.
  • The html syntax is wrong. However, on most browsers the html parsing algorighm is unbelievably forgiving and will just turn your html into text or maybe even an empty string.

It is recommended to have control over the html being given to this function as not having control is a security concern.

For more details, see information about setting innerHTML:

https://developer.mozilla.org/en-US/docs/Web/API/Element/innerHTML

Trait Implementations

impl JsSerialize for Node[src]

impl TryFrom<Node> for Document[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<EventTarget> for Node[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<Node> for Reference[src]

type Error = Void

The type returned in the event of a conversion error.

impl TryFrom<Reference> for Node[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl<'_r> TryFrom<&'_r Reference> for Node[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<Value> for Node[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl<'_r> TryFrom<&'_r Value> for Node[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<Node> for Element[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<Node> for HtmlElement[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<Node> for CanvasElement[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<Node> for ImageElement[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<Node> for InputElement[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<Node> for TextAreaElement[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<Node> for SelectElement[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<Node> for OptionElement[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<Node> for TemplateElement[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<Node> for SlotElement[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<Node> for DocumentFragment[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<Node> for TextNode[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<Node> for ShadowRoot[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl InstanceOf for Node[src]

impl ReferenceType for Node[src]

impl IEventTarget for Node[src]

impl INode for Node[src]

impl AsRef<Reference> for Node[src]

impl From<Document> for Node[src]

impl From<Node> for EventTarget[src]

impl From<Node> for Reference[src]

impl From<Element> for Node[src]

impl From<HtmlElement> for Node[src]

impl From<CanvasElement> for Node[src]

impl From<ImageElement> for Node[src]

impl From<InputElement> for Node[src]

impl From<TextAreaElement> for Node[src]

impl From<SelectElement> for Node[src]

impl From<OptionElement> for Node[src]

impl From<TemplateElement> for Node[src]

impl From<SlotElement> for Node[src]

impl From<DocumentFragment> for Node[src]

impl From<TextNode> for Node[src]

impl From<ShadowRoot> for Node[src]

impl Clone for Node[src]

impl Eq for Node[src]

impl PartialEq<Node> for Node[src]

impl Debug for Node[src]

Auto Trait Implementations

impl Send for Node

impl Sync for Node

impl Unpin for Node

impl UnwindSafe for Node

impl RefUnwindSafe for Node

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]