accessible/public/nsIAccessNode.idlScriptable
An interface used by in-process accessibility clients to get style, window, markup and other information about a DOM node. When accessibility is active in Gecko, every DOM node can have one nsIAccessNode.
Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)

The nsIAccessNode implementations are instantiated lazily. The nsIAccessNode tree for a given DOM window has a one to one relationship to the DOM tree. If the DOM node for this access node is "accessible", then a QueryInterface to nsIAccessible will succeed.

Method overview

nsIAccessNode getChildNodeAt(in long childNum); Obsolete since Gecko 2.0
nsIDOMCSSPrimitiveValue getComputedStyleCSSValue(in DOMString pseudoElt, in DOMString propertyName);
DOMString getComputedStyleValue(in DOMString pseudoElt, in DOMString propertyName);
void scrollTo(in unsigned long aScrollType);
void scrollToPoint(in unsigned long aCoordinateType, in long aX, in long aY);

Attributes

Note: Attempting to access the attributes of a node that is unattached from the accessible tree will result in an exception - NS_ERROR_FAILURE.

Attribute Type Description
document nsIAccessibleDocument The document accessible that this access node resides in. Read only.
Note: Renamed from accessibleDocument in Gecko 2.0
DOMNode Node The DOM node this nsIAccessNode is associated with. Read only.
firstChildNode nsIAccessNode The first nsIAccessNode child. Read only. Obsolete since Gecko 2.0
innerHTML DOMString The innerHTML for the DOM node This is a text string of all the markup inside the DOM node, not including the start and end tag for the node. Read only.
language DOMString The language for the current DOM node, for example en, de, and so on. Read only.
lastChildNode nsIAccessNode The last nsIAccessNode child. Read only. Obsolete since Gecko 2.0
nextSiblingNode nsIAccessNode The next nsIAccessNode sibling. Read only. Obsolete since Gecko 2.0
numChildren long The number of DOM children for the DOM node, which matches the number of nsIAccessNode children for this nsIAccessNode. Read only. Obsolete since Gecko 2.0
ownerWindow voidPtr The OS window handle for the window this node is being displayed in. Read only. Native code only! Obsolete since Gecko 8.0
parentNode nsIAccessNode The parent nsIAccessNode. Read only. Obsolete since Gecko 2.0
previousSiblingNode nsIAccessNode The previous nsIAccessNode sibling. Read only. Obsolete since Gecko 2.0
rootDocument nsIAccessibleDocument The root document accessible that this access node resides in. Read only.
uniqueID voidPtr A unique ID calculated for this DOM node, for the purposes of caching and referencing this object. Read only. Native code only!

Methods

getChildNodeAt()

Obsolete since Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)

Get the nth child of this node.

nsIAccessNode getChildNodeAt(
  in long childNum
);
Parameters
childNum
Zero-based child index.
Return value

The nth nsIAccessNode child.

Exceptions thrown
NS_ERROR_FAILURE
Indicates that the access node is unattached from the accessible tree.

getComputedStyleCSSValue()

Retrieve the computed style value as nsIDOMCSSPrimitiveValue for the DOM node this access node is associated with.

Note: The meanings of width, height and other size measurements depend on the version of CSS being used. Therefore, for bounds information, it is better to use nsIAccessible.getBounds().

nsIDOMCSSPrimitiveValue getComputedStyleCSSValue(
  in DOMString pseudoElt,
  in DOMString propertyName
);
Parameters
pseudoElt
The pseudo element to retrieve style for, or empty string for general computed style information for the node.
propertyName
Retrieve the computed style value for this property name.
Return value

The nsIDOMCSSPrimitiveValue computed style value.

Exceptions thrown
NS_ERROR_FAILURE
Indicates that the access node is unattached from the accessible tree.

getComputedStyleValue()

Retrieve the computed style value for this DOM node, if it is a DOM element.

Note: The meanings of width, height and other size measurements depend on the version of CSS being used. Therefore, for bounds information, it is better to use nsIAccessible.getBounds().

DOMString getComputedStyleValue(
  in DOMString pseudoElt,
  in DOMString propertyName
);
Parameters
pseudoElt
The pseudo element to retrieve style for, or null for general computed style information for this node.
propertyName
Retrieve the computed style value for this property name, for example "border-bottom".
Return value

The computed style value.

Exceptions thrown
NS_ERROR_FAILURE
Indicates that the access node is unattached from the accessible tree.

scrollTo()

Makes an object visible on screen.

void scrollTo(
  in unsigned long aScrollType
);
Parameters
aScrollType
Defines where the object should be placed on the screen (see nsIAccessibleScrollType.Constants for available constants).
Exceptions thrown
NS_ERROR_FAILURE
Indicates that the access node is unattached from the accessible tree.

scrollToPoint()

Moves the top left of an object to a specified location.

void scrollToPoint(
  in unsigned long aCoordinateType,
  in long aX,
  in long aY
);
Parameters
aCoordinateType
Specifies whether the coordinates are relative to the screen or the parent object (for available constants refer to nsIAccessibleCoordinateType.Constants.
aX
Defines the x coordinate.
aY
Defines the y coordinate.
Exceptions thrown
NS_ERROR_FAILURE
Indicates that the access node is unattached from the accessible tree.

Remarks

The main application of access node tree is it's used by ISimpleDOM* interfaces on Windows.