fn node_type( &self ) -> NodeType {
        match js!(
            return @{self.as_ref()}.nodeType;
        ).try_into().unwrap() {
            1 => NodeType::Element,
            2 => NodeType::Attribute,
            3 => NodeType::Text,
            4 => NodeType::CDataSection,
            7 => NodeType::ProcessingInstruction,
            8 => NodeType::Comment,
            9 => NodeType::Document,
            10 => NodeType::DocumentType,
            11 => NodeType::DocumentFragment,
            _ => unreachable!("Unexpected nodeType")
        }
    }
/// Returns the type of the node.
///
/// [(JavaScript docs)](https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType)
// https://dom.spec.whatwg.org/#ref-for-dom-node-nodetype
Returns the type of the node.
Returns the type of the node .
fn node_type( &self ) -> NodeType {
        match js!(
            return @{self.as_ref()}.nodeType;
        ).try_into().unwrap() {
            1 => NodeType::Element,
            2 => NodeType::Attribute,
            3 => NodeType::Text,
            4 => NodeType::CDataSection,
            7 => NodeType::ProcessingInstruction,
            8 => NodeType::Comment,
            9 => NodeType::Document,
            10 => NodeType::DocumentType,
            11 => NodeType::DocumentFragment,
            _ => unreachable!("Unexpected nodeType")
        }
    }
fn node_type ( & self ) -> NodeType { match js ! ( return { self as_ref ( ) } nodeType ) . try_into ( ) . unwrap ( ) { 1 => NodeType :: Element , 2 => NodeType :: Attribute , 3 => NodeType :: Text , 4 => NodeType :: CDataSection , 7 => NodeType :: ProcessingInstruction , 8 => NodeType :: Comment , 9 => NodeType :: Document , 10 => NodeType :: DocumentType , 11 => NodeType :: DocumentFragment , _ => unreachable ! ( " " ) } }
Returns the type of the node.
Returns the type of the node .
&self
&self