Dodo
DOm DOcument implementation
Loading...
Searching...
No Matches
Wikimedia\Dodo\Internal\BoundaryPoint Class Reference

A boundary point is a concept defined in the DOM spec but never given a formal WebIDL interface. More...

Public Member Functions

 __construct (Node $node, int $offset)
 Create a new BoundaryPoint from a Node and a non-negative offset.
 
Node getNode ()
 
int getOffset ()
 
bool equals (BoundaryPoint $bp)
 
int compare (BoundaryPoint $bp)
 

Detailed Description

A boundary point is a concept defined in the DOM spec but never given a formal WebIDL interface.

It is a combination of a node and an offset.

See also
https://dom.spec.whatwg.org/#concept-range-bp

Constructor & Destructor Documentation

◆ __construct()

Wikimedia\Dodo\Internal\BoundaryPoint::__construct ( Node $node,
int $offset )

Create a new BoundaryPoint from a Node and a non-negative offset.

Parameters
Node$node
int$offseta non-negative offset

Member Function Documentation

◆ compare()

int Wikimedia\Dodo\Internal\BoundaryPoint::compare ( BoundaryPoint $bp)
See also
https://dom.spec.whatwg.org/#concept-range-bp-position
Parameters
BoundaryPoint$bp
Returns
int -1 if $this is before $bp, 0 if they are equal, or 1 if this is after $bp.

◆ equals()

bool Wikimedia\Dodo\Internal\BoundaryPoint::equals ( BoundaryPoint $bp)
Parameters
BoundaryPoint$bp
Returns
bool true iff $this is the same boundary point as $bp

◆ getNode()

Node Wikimedia\Dodo\Internal\BoundaryPoint::getNode ( )
Returns
Node this boundary point's node.

◆ getOffset()

int Wikimedia\Dodo\Internal\BoundaryPoint::getOffset ( )
Returns
int this boundary point's offset.

The documentation for this class was generated from the following file: