How to get the 'nsIDOMHTMLDocument' interface from 'ISimpleDOMDocument' interface?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How to get the 'nsIDOMHTMLDocument' interface from 'ISimpleDOMDocument' interface?

HarryMoo
Hi all,

I have gotten the ISimpleDOMDocument interface throught MSAA interfaces.
Is there any method to get the nsIDOMHTMLDocument from ISimpleDOMDocument?
I had tried call QueryInterface to ISimpleDOMDocument and QueryService to IServiceProvider of ISimpleDOMDocument, but they all failed.

Whether I missing something or it is logjam at all.
But in the document http://www.mozilla.org/access/windows/at-apis, I found text as below:
"The MSAA tree and the DOM tree are parallel structures, although the MSAA tree is a subset of the DOM tree. QueryService() can be used to switch between the interfaces (IAccessible, ISimpleDOMDocument, ISimpleDOMNode and ISimpleDOMText). If there is no MSAA node for a DOM node, or vice-versa, QueryService() will return null."

Thanks in advance!

Regards,
Harry Moo
Reply | Threaded
Open this post in threaded view
|

Re: How to get the 'nsIDOMHTMLDocument' interface from 'ISimpleDOMDocument' interface?

Aaron Leventhal-3
Harry,

You can't get to the nsI* interfaces from out-of-process. They're XPCOM,
not COM. That means they're available to Mozilla components that are
linked against each other, and to script.

Maybe tell us what you're trying to do?

- Aaron
_______________________________________________
dev-accessibility mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-accessibility
Reply | Threaded
Open this post in threaded view
|

Re: How to get the 'nsIDOMHTMLDocument' interface from 'ISimpleDOMDocument' interface?

HarryMoo
Hi Aaron,

Thanks for your information!

I want to get detail DOM interface so that I can get state of current webpage e.g. current selecting text, and I hope there isn't plugin or extension with my tool.

But it look like there isn't way to do this.
Anyway, thank you again.

Regards,
Harry

Aaron Leventhal-3 wrote
Harry,

You can't get to the nsI* interfaces from out-of-process. They're XPCOM,
not COM. That means they're available to Mozilla components that are
linked against each other, and to script.

Maybe tell us what you're trying to do?

- Aaron
_______________________________________________
dev-accessibility mailing list
dev-accessibility@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-accessibility
Reply | Threaded
Open this post in threaded view
|

Re: How to get the 'nsIDOMHTMLDocument' interface from 'ISimpleDOMDocument' interface?

Aaron Leventhal-3
In reply to this post by Aaron Leventhal-3
If you want the currently selected text, you will be able to get that in
Firefox 3 via the IAccessible2 (specifically IAccessibleText) interface
support.

However, if this is a Firefox-specific project it would be best to do it
as an extension.

- Aaron

HarryMoo wrote:

> Hi Aaron,
>
> Thanks for your information!
>
> I want to get detail DOM interface so that I can get state of current
> webpage e.g. current selecting text, and I hope there isn't plugin or
> extension with my tool.
>
> But it look like there isn't way to do this.
> Anyway, thank you again.
>
> Regards,
> Harry
>
>
> Aaron Leventhal-3 wrote:
>> Harry,
>>
>> You can't get to the nsI* interfaces from out-of-process. They're XPCOM,
>> not COM. That means they're available to Mozilla components that are
>> linked against each other, and to script.
>>
>> Maybe tell us what you're trying to do?
>>
>> - Aaron
>> _______________________________________________
>> dev-accessibility mailing list
>> [hidden email]
>> https://lists.mozilla.org/listinfo/dev-accessibility
>>
>>
>
_______________________________________________
dev-accessibility mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-accessibility