/// Removes a child node from the DOM.
///
/// [(JavaScript docs)](https://developer.mozilla.org/en-US/docs/Web/API/Node/removeChild)
Removes a child node from the DOM.
Removes a child node from the DOM .
fn remove_child< T: INode >( &self, child: &T ) -> Result< (), NotFoundError > {
        // TODO: Return the removed node.
        let status = js! {
            try {
                @{self.as_ref()}.removeChild( @{child.as_ref()} );
                return true;
            } catch( exception ) {
                if( exception instanceof NotFoundError ) {
                    return false;
                } else {
                    throw exception;
                }
            }
        };
        if status == true {
            Ok(())
        } else {
            Err( NotFoundError( "The node to be removed is not a child of this node.".to_owned() ) )
        }
    }
fn remove_child < T : INode > ( & self , child : & T ) -> Result < ( ) , NotFoundError > { // TODO: Return the removed node. let status = js ! { try { { self as_ref ( ) } removeChild ( { child as_ref ( ) } ) return true } catch ( exception ) { if ( exception instanceof NotFoundError ) { return false } else { throw exception } } } ; if status == true { Ok ( ( ) ) } else { Err ( NotFoundError ( " " . to_owned ( ) ) ) } }
Removes a child node from the DOM.
Removes a child node from the DOM .
&self
child
&T