nsIAccessibleHyperText 编辑

accessible/public/nsIAccessibleHyperText.idlScriptable This interface is the main interface to expose hyperlinks in a document, typically a text document, that are used to reference other documents. A typical implementation is to implement this interface on the small text object such as a paragraph of text. Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3)

Method overview

nsIAccessibleHyperLink getLink(in long linkIndex);
long getLinkIndex(in long charIndex);
long getSelectedLinkIndex(); Obsolete since Gecko 1.9

Attributes

AttributeTypeDescription
linkCountlongThe number of links contained within this hypertext object. Read only. Note: Renamed from links in Gecko 1.9

Methods

getLink()

Retrieves the nsIAccessibleHyperLink object at the given link index.

nsIAccessibleHyperLink getLink(
  in long linkIndex
);
Parameters
linkIndex

0-based index of the link that is to be retrieved. This can be retrieved via getLinkIndex().

Return value

An nsIAccessibleHyperLink object.

Exceptions thrown
NS_ERROR_FAILURE
Indicates that the accessible is unattached from the accessible tree.
NS_ERROR_INVALID_ARG
The link index is invalid.

getLinkIndex()

The link index at the given offset (character index).

long getLinkIndex(
  in long charIndex
);
Parameters
charIndex
The 0-based character index.
Return value

The index of the link if it's presented on the given character index, otherwise -1.

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

getSelectedLinkIndex()

Obsolete since Gecko 1.9 (Firefox 3)
long getSelectedLinkIndex();
Parameters

None.

Return value

Missing Description

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

See also

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:96 次

字数:4539

最后编辑:6年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文