nsIAccessibleDocument 编辑
accessible/public/nsIAccessibleDocument.idl
Scriptable 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
Attribute | Type | Description |
caretAccessible |
| Read only. Obsolete since Gecko 1.9 |
docType | AString | The doc type of the document , as specified in the document . Read only. |
DOMDocument |
| The nsIDOMDocument interface associated with this document . Read only. Note: Renamed from document in Gecko 2.0 |
isEditable | boolean | True 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 |
mimeType | AString | The mime type of the document . Read only. |
title | AString | The title of the document , as specified in the document . Read only. |
URL | AString | The URL of the document Read only. |
window |
| The nsIDOMWindow that the document resides in. Read only. |
windowHandle | voidPtr | The 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.
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论