Visit Mozilla.org

DOM:Selection:selectAllChildren

From MDC

« Gecko DOM Reference

Contents

[edit] Summary

Adds all the children of the specified node to the selection. Previous selection is lost.

[edit] Syntax

sel.selectAllChildren(parentNode)

[edit] Parameters

parentNode
All children of parentNode will be selected. parentNode itself is not part of the selection.

[edit] Examples

footer = document.getElementById("footer");
window.getSelection().selectAllChildren(footer);
/* Everything inside the footer is now selected */