Re: Issues with ISimpleDOMNode->get_innerHTML

Alexander Surkov <[email protected]>
Newsgroups gmane.comp.mozilla.accessibility
Organization http://groups.google.com
Message-ID <24329253-0d09-4870-aade-8b1f9848d13d@e27g2000yqm.googlegroups.com>
On Aug 27, 3:18 am, Jon <[email protected]> wrote:
> 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
>                         }
>                 }
>         }

Hi. Because get_innerHTML is not supported on HTML documents. I agree
it would be more correct to return S_FALSE in this case because it's
not an error obviously. As well it should return S_FALSE for non HTML
elements and non HTML documents. However on another hand get_innerHTML
can make sense for HTML documents in contrast to non HTML documents
and elements where get_innerHTML isn't applicable at all. But this
feature was never requested by AT vendors. Which option do you expect?

Alex.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.