Not TestedTesting not done, may not work properly
DOM & HTML

Range API

Represent a fragment of a document that can contain nodes and parts of text nodes.

Checking support...
Advertisement

Interactive Input Workspace

Ready for input

Web API Execution Output

Result output will be displayed here after processing...

Native JavaScript Code Example (Zero Libraries)

const range = document.createRange();
range.selectNodeContents(document.body);
const text = range.toString();

About the Range API Web API

The Range interface represents a fragment of a document that can contain nodes and parts of text nodes.

Specification:W3C & WHATWG Web API Standard
Sponsored Content