Mozilla.com

  1. MDC
  2. Main Page
  3. DOM
  4. range.isPointInRange

« Gecko DOM Reference

Summary

Returns a boolean indicating whether the given point is in the range.

Syntax

bool = range.isPointInRange( referenceNode, offset )

Parameters

referenceNode 
The Node to compare with the Range.
offset 
The offset into Node of the point to compare with the Range.

Example

range = document.createRange();
range.selectNode(document.getElementsByTagName("div").item(0));
bool = range.isPointInRange(document.getElementsByTagName("p").item(0),1);

Notes

Returns true if the point (cursor position) at offset within ReferenceNode is within this range.

Specification

This method is not part of a specification.

Page last modified 12:41, 13 Sep 2007 by Spocke?

Files (0)