Your Search Results

    containsNode

    « DOM Reference

    Summary

    Indicates if the node is part of the selection.

    Syntax

    sel.containsNode(aNode,aPartlyContained)
    

    Parameters

    aNode
    The node that is being looked for whether it is part of the selection
    aPartlyContained
    When true , containsNode returns true when a part of the node is part of the selection.
    When false , containsNode only returns true when the entire node is part of the selection.

    Examples

     /* Check to see if anything inside the body element is selected */
     alert(window.getSelection().containsNode(document.body, true));
    
     

    Document Tags and Contributors

    Contributors to this page: teoli
    Last updated by: teoli,