Visit Mozilla.org

DOM:range.deleteContents

From MDC

« Gecko DOM Reference

Contents

[edit] Summary

Removes the contents of a Range from the document.

[edit] Syntax

range.deleteContents()

[edit] Example

range = document.createRange();
range.selectNode(document.getElementsByTagName("div").item(0));
range.deleteContents();

[edit] Notes

Unlike extractContents, this method does not return a documentFragment containing the deleted content.

[edit] Specification

deleteContents