Issues with ISimpleDOMNode->get_innerHTML
Jon <[email protected]>
| Newsgroups | gmane.comp.mozilla.accessibility |
|---|---|
| Organization | http://groups.google.com |
| Message-ID | <d153ae63-f607-4c0a-b454-67f9b39365f7@h21g2000yqa.googlegroups.com> |
I am trying to use "ISimpleDOMNode->get_innerHTML()" and it just
returns E_FAIL. The call to ISimpleDOMNode->get_nodeInfo() works as
expected, and reports a nodeType of "#document". Here is the code I am
using, any help would be much appreciated. I am running this on
Windows.
IAccessible* pAccessible;
HRESULT hr = AccessibleObjectFromWindow(hTarget, OBJID_CLIENT,
IID_IAccessible, (void**)&pAccessible);
if (SUCCEEDED(hr) && (pAccessible != NULL)) {
IServiceProvider *pService = NULL;
hr = pAccessible->QueryInterface(IID_IServiceProvider, (void**)
&pService);
if (SUCCEEDED(hr) && (pService != NULL)) {
ISimpleDOMNode *pNode = NULL;
hr = pService->QueryService(IID_ISimpleDOMNode, IID_ISimpleDOMNode,
(void**)&pNode);
if (SUCCEEDED(hr) && (pNode != NULL)) {
BSTR html;
hr = pNode->get_innerHTML(&html); //Always returns E_FAIL
}
}
}