Accessibility/WebAccessibilityAPI: Difference between revisions

Line 539: Line 539:
   readonly attribute AccessibleElement? anchor;
   readonly attribute AccessibleElement? anchor;
   readonly attribute Offset offset;
   readonly attribute Offset offset;
 
   DOMRangeBound toDOM();
   long compare(AccessiblePos pos);
 
};
};


Line 893: Line 891:


<code>
<code>
AccessiblePos .''root''
::Returns the accessible element the position movement is restricted to.
AccessiblePos .''anchor''
AccessiblePos .''anchor''
::Returns the accessible element the position is contained by. If the position is at element then element itself.
::Returns the accessible element the position is at or contained by.
 
AccessiblePos .''offset''
::Return an offset of the accessible position, either numeric or text.
 
AccessiblePos .''toDOM''
::Returns DOMRangeBound object which is a pair of DOM node and content offset relative it.
</code>
</code>


<code>
<pre>
AccessiblePos .''compare''
dictionary DOMRangeBound {
::Returns -1 if the given position is before in accessible tree than this position, 0 if they are the same, 1 if the given position is after.
  DOMNode node;
</code>
  long offset;
};
</pre>


===Questions/concerns===
===Questions/concerns===
Confirmed users
1,396

edits