nsIAccessibleDocument 编辑

accessible/public/nsIAccessibleDocument.idlScriptable An interface for in-process accessibility clients that wish to retrieve information about a document. When accessibility is turned on in Gecko, there is an nsIAccessibleDocument for each document whether it is XUL, HTML or whatever. Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)

You can QueryInterface to nsIAccessibleDocument from the nsIAccessible or nsIAccessNode for the root node of a document. You can also get one from nsIAccessNode.GetAccessibleDocument() or nsIAccessibleEvent.GetAccessibleDocument()

Method overview

nsIAccessible getAccessibleInParentChain(in nsIDOMNode aDOMNode, in boolean aCanCreate); Obsolete since Gecko 2.0
nsIAccessNode getCachedAccessNode(in voidPtr aUniqueID); Native code only! Obsolete since Gecko 2.0
AString getNameSpaceURIForID(in short nameSpaceID);

Attributes

AttributeTypeDescription
caretAccessiblensIAccessibleRead only. Obsolete since Gecko 1.9
docTypeAStringThe doc type of the document, as specified in the document. Read only.
DOMDocumentnsIDOMDocumentThe nsIDOMDocument interface associated with this document. Read only. Note: Renamed from document in Gecko 2.0
isEditablebooleanTrue if the document is live in an editor. False if the document is being displayed but not edited. If a <div> is contentEditable, then it has its own document, with isEditable == true. Read only. Obsolete since Gecko 1.9
mimeTypeAStringThe mime type of the document. Read only.
titleAStringThe title of the document, as specified in the document. Read only.
URLAStringThe URL of the document Read only.
windownsIDOMWindowThe nsIDOMWindow that the document resides in. Read only.
windowHandlevoidPtrThe window handle for the OS window the document is being displayed in. For example, in Windows you can static cast it to an HWND. Read only. Native code only!

Methods

getAccessibleInParentChain()

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

Returns the first accessible parent of a DOM node. Guaranteed not to return null if the DOM node is in a document.

nsIAccessible getAccessibleInParentChain(
  in nsIDOMNode aDOMNode,
  in boolean aCanCreate
);
Parameters
aDOMNode
The DOM node we need an accessible for.
aCanCreate
If true, this method can create a new accessible. Otherwise, it will return the first cached accessible in the parent chain.
Return value

The first nsIAccessible found by crawling up the DOM node to the document root.

Native code only!

getCachedAccessNode

Obsolete since Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.

Returns the access node cached by this document.

nsIAccessNode getCachedAccessNode(
  in voidPtr aUniqueID
);
Parameters
aUniqueID
The unique ID used to cache the node. This matches up with the uniqueID attribute on nsIAccessNode.
Return value

The nsIAccessNode cached for this particular unique ID.

getNameSpaceURIForID()

The namespace for each ID that is handed back.

AString getNameSpaceURIForID(
  in short nameSpaceID
);
Parameters
nameSpaceID
The ID of the name space.
Return value

The name space for given ID.

See also

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

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

发布评论

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

词条统计

浏览:40 次

字数:8319

最后编辑:6 年前

编辑次数:0 次

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