nsIAccessibleHyperLink 编辑
accessible/public/nsIAccessibleHyperLink.idl
Scriptable A cross-platform interface that supports hyperlink-specific properties and methods. Inherits from: nsISupports
Last changed in Gecko 1.9 (Firefox 3)Method overview
nsIAccessible getAnchor(in long index); Note: Renamed from getObject in Gecko 1.9 |
nsIURI getURI(in long index); |
boolean isSelected(); Obsolete since Gecko 1.9 |
boolean isValid(); Obsolete since Gecko 1.9 |
Attributes
Attribute | Type | Description |
anchorCount | long | The number of anchors within this Hyperlink. Is normally 1 for anchors. This anchor is, for example, the visible output of the html:a tag. With an Image Map, reflects the actual areas within the map. Read only. Note: Renamed fromanchors in Gecko 1.9Exceptions thrown
|
endIndex | long | The end offset of the hyperlink accessible within the parent accessible. The returned value is related to the Exceptions thrown
|
selected | boolean | Determines whether the element currently has the focus, for example after returning from the destination page. Read only. Note: ARIA links can only be focused if they have the tabindex attribute set. Also, state_focused should then be set on the accessible for this link.Exceptions thrown
|
startIndex | long | The offset of the hyperlink accessible within the parent accessible. The returned value is related to the Exceptions thrown
|
valid | boolean | Determines whether the hyperlink is valid, for example points to a valid URL. Read only. Note: Currently only used with ARIA links, and the author has to specify that the link is invalid via the aria-invalid='true' attribute. In all other cases, true is returned.Exceptions thrown
|
Methods
Returns a reference to the object at the given index.
Note: ARIA hyperlinks do not have an anchor accessible to point to, since clicks are processed via JavaScript. Note: In the case of an image map there is more than one link represented by this accessible.nsIAccessible getAnchor( in long index );
Parameters
index
- The 0-based index whose object is to be returned.
Return value
The nsIAccessible
object at the desired index.
getURI()
Returns the URI at the given index.
Note: ARIA hyperlinks do not have an URI to point to, since clicks are processed via JavaScript. Therefore this property does not work on ARIA links.nsIURI getURI( in long index );
Parameters
index
- The 0-based index of the URI to be returned.
Return value
The nsIURI
object containing the specifications for the URI.
isSelected()
Obsolete since Gecko 1.9 (Firefox 3) Note: Has been replaced by the selected attribute.boolean isSelected();
Parameters
None.
Return value
true
if the element currently has the focus.
isValid()
Obsolete since Gecko 1.9 (Firefox 3) Note: Has been replaced by the valid attribute.boolean isValid();
Parameters
None.
Return value
true
if the hyperlink is valid.
Remarks
Anchors, image maps, xul:labels with class="text-link" implement this interface.
See also
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论