Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

HTML DOM Range endContainer property

  • Last Updated : 30 Jun, 2020

The endContainer property returns the Node within which the Current Range ends. This is a read only property.


parentNode = range.endContainer;

Return Value:

  • Returns the node within which the current range ends.

Example: This example will show how to get the endContainer Node of the Current Range.


<title>HTML DOM range endContainer property</title>   
<p>This is the Range Content</p>
    let range = document.createRange();
    let referenceNode = document.getElementsByTagName('p').item(0);

Output: In console, we got the endContainer Node for our range.

Supported Browsers:

  • Google Chrome
  • Edge
  • Firefox
  • Safari
  • Opera
  • Internet Explorer
My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!