Looks like great. Tonight i will try this code:)
But the nsIDOMXULElement NOT FROZEN interface. How can we solve this
problem?

Regargs, Dmitry


"Neil" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Boris Zbarsky wrote:
>
> > Dmitriy B. wrote:
> >
> >> I have a small XUL document which look like this:
> >> <window>
> >> <button id="MyButton"></button>
> >> <browser id="MyBrowser"></browser>
> >> </window>
> >>
> >> In my C++ code i try get access to the interface nsIWebNavigation for
> >> the element "MyBrowser".
> >
> > The problem is that all the goodies like the webNavigation property
> > that are exposed by a <browser> are only defined in XBL and there is
> > no interface to QI to to get those properties.
>
> Actually the goodies are quite easily available from C++ but my nsCOMPtr
> foo may leave something to be desired:
> nsCOMPtr<nsIBoxObject> boxObject;
> browserXULElement->GetBoxObject(getter_AddRefs(boxObject));
> nsCOMPtr<nsIDocShell> docShell;
> boxObject->GetDocShell(getter_AddRefs(docShell));
> nsCOMPtr<nsIWebNavigation> webNav = do_QueryInterface(docShell);
>
> --
> Warning: May contain traces of nuts.
>


_______________________________________________
mozilla-embedding mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-embedding

Reply via email to