[−][src]Struct stdweb::web::Node
A reference to a JavaScript object which implements the INode interface.
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.
fn try_from(value: Node) -> Result<Self, Self::Error>
[src]
impl TryFrom<EventTarget> for Node
[src]
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(value: EventTarget) -> Result<Self, Self::Error>
[src]
impl TryFrom<Node> for Reference
[src]
type Error = Void
The type returned in the event of a conversion error.
fn try_from(value: Node) -> Result<Self, Self::Error>
[src]
impl TryFrom<Reference> for Node
[src]
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(reference: Reference) -> Result<Self, Self::Error>
[src]
impl<'_r> TryFrom<&'_r Reference> for Node
[src]
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(reference: &Reference) -> Result<Self, Self::Error>
[src]
impl TryFrom<Value> for Node
[src]
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(value: Value) -> Result<Self, Self::Error>
[src]
impl<'_r> TryFrom<&'_r Value> for Node
[src]
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(value: &Value) -> Result<Self, Self::Error>
[src]
impl TryFrom<Node> for Element
[src]
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(value: Node) -> Result<Self, Self::Error>
[src]
impl TryFrom<Node> for HtmlElement
[src]
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(value: Node) -> Result<Self, Self::Error>
[src]
impl TryFrom<Node> for CanvasElement
[src]
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(value: Node) -> Result<Self, Self::Error>
[src]
impl TryFrom<Node> for ImageElement
[src]
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(value: Node) -> Result<Self, Self::Error>
[src]
impl TryFrom<Node> for InputElement
[src]
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(value: Node) -> Result<Self, Self::Error>
[src]
impl TryFrom<Node> for TextAreaElement
[src]
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(value: Node) -> Result<Self, Self::Error>
[src]
impl TryFrom<Node> for SelectElement
[src]
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(value: Node) -> Result<Self, Self::Error>
[src]
impl TryFrom<Node> for OptionElement
[src]
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(value: Node) -> Result<Self, Self::Error>
[src]
impl TryFrom<Node> for TemplateElement
[src]
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(value: Node) -> Result<Self, Self::Error>
[src]
impl TryFrom<Node> for SlotElement
[src]
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(value: Node) -> Result<Self, Self::Error>
[src]
impl TryFrom<Node> for DocumentFragment
[src]
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(value: Node) -> Result<Self, Self::Error>
[src]
impl TryFrom<Node> for TextNode
[src]
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(value: Node) -> Result<Self, Self::Error>
[src]
impl TryFrom<Node> for ShadowRoot
[src]
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(value: Node) -> Result<Self, Self::Error>
[src]
impl InstanceOf for Node
[src]
fn instance_of(reference: &Reference) -> bool
[src]
impl ReferenceType for Node
[src]
unsafe fn from_reference_unchecked(reference: Reference) -> Self
[src]
impl IEventTarget for Node
[src]
fn add_event_listener<T, F>(&self, listener: F) -> EventListenerHandle where
T: ConcreteEvent,
F: FnMut(T) + 'static,
[src]
T: ConcreteEvent,
F: FnMut(T) + 'static,
fn dispatch_event<T: IEvent>(&self, event: &T) -> Result<bool, TODO>
[src]
impl INode for Node
[src]
fn as_node(&self) -> &Node
[src]
fn append_child<T: INode>(&self, child: &T)
[src]
fn remove_child<T: INode>(&self, child: &T) -> Result<Node, NotFoundError>
[src]
fn clone_node(&self, kind: CloneKind) -> Result<Self, TODO>
[src]
fn contains<T: INode>(&self, node: &T) -> bool
[src]
fn insert_before<T: INode, U: INode>(
&self,
new_node: &T,
reference_node: &U
) -> Result<Node, InsertNodeError>
[src]
&self,
new_node: &T,
reference_node: &U
) -> Result<Node, InsertNodeError>
fn replace_child<T: INode, U: INode>(
&self,
new_child: &T,
old_child: &U
) -> Result<Node, InsertNodeError>
[src]
&self,
new_child: &T,
old_child: &U
) -> Result<Node, InsertNodeError>
fn parent_node(&self) -> Option<Node>
[src]
fn first_child(&self) -> Option<Node>
[src]
fn last_child(&self) -> Option<Node>
[src]
fn next_sibling(&self) -> Option<Node>
[src]
fn node_name(&self) -> String
[src]
fn node_type(&self) -> NodeType
[src]
fn node_value(&self) -> Option<String>
[src]
fn set_node_value(&self, value: Option<&str>)
[src]
fn owner_document(&self) -> Option<Document>
[src]
fn parent_element(&self) -> Option<Element>
[src]
fn previous_sibling(&self) -> Option<Node>
[src]
fn text_content(&self) -> Option<String>
[src]
fn set_text_content(&self, text: &str)
[src]
fn child_nodes(&self) -> NodeList
[src]
fn base_uri(&self) -> String
[src]
fn has_child_nodes(&self) -> bool
[src]
fn is_default_namespace(&self, namespace: &str) -> bool
[src]
fn is_equal_node<T: INode>(&self, node: &T) -> bool
[src]
fn is_same_node<T: INode>(&self, node: &T) -> bool
[src]
fn lookup_prefix(&self, namespace: &str) -> Option<String>
[src]
fn lookup_namespace_uri(&self, prefix: &str) -> Option<String>
[src]
fn normalize(&self)
[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]
fn from(value: HtmlElement) -> Self
[src]
impl From<CanvasElement> for Node
[src]
fn from(value: CanvasElement) -> Self
[src]
impl From<ImageElement> for Node
[src]
fn from(value: ImageElement) -> Self
[src]
impl From<InputElement> for Node
[src]
fn from(value: InputElement) -> Self
[src]
impl From<TextAreaElement> for Node
[src]
fn from(value: TextAreaElement) -> Self
[src]
impl From<SelectElement> for Node
[src]
fn from(value: SelectElement) -> Self
[src]
impl From<OptionElement> for Node
[src]
fn from(value: OptionElement) -> Self
[src]
impl From<TemplateElement> for Node
[src]
fn from(value: TemplateElement) -> Self
[src]
impl From<SlotElement> for Node
[src]
fn from(value: SlotElement) -> Self
[src]
impl From<DocumentFragment> for Node
[src]
fn from(value: DocumentFragment) -> Self
[src]
impl From<TextNode> for Node
[src]
impl From<ShadowRoot> for Node
[src]
fn from(value: ShadowRoot) -> Self
[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]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,