Re: Is there any events before loading a URL to a docshell.

2015-09-15 Thread Neil

Mike Conley wrote:


From the passed in nsIWebProgress[1], you should be able to get at the 
nsIDOMWindow, and from there, I *think* you can get to the nsIDocShell by 
QI'ing the nsIWebProgress to an nsIInterfaceRequestor and then GetInterface'ing 
nsIDocShell. I haven't tried this, but I'm reasonably certain it will work.



You could probably just QI the nsIWebProgress to nsIDocShell directly.

--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Is there any events before loading a URL to a docshell.

2015-09-14 Thread Mike Conley
Hey Yonggang,

You might find nsIWebProgressListener useful:
https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsIWebProgressListener

Specifically the onLocationChange method. This is fired once we've
determined that we're going to load a new URI for a DOM Window.

From the passed in nsIWebProgress[1], you should be able to get at the
nsIDOMWindow, and from there, I *think* you can get to the nsIDocShell
by QI'ing the nsIWebProgress to an nsIInterfaceRequestor and then
GetInterface'ing nsIDocShell. I haven't tried this, but I'm reasonably
certain it will work.

-Mike

[1]:
https://dxr.mozilla.org/mozilla-central/rev/9ed17db42e3e46f1c712e4dffd62d54e915e0fac/uriloader/base/nsIWebProgress.idl#134

On 13/09/2015 8:17 AM, 罗勇刚(Yonggang Luo)  wrote:
> So that I know what's the docshell is and the URL is.
> 
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Is there any events before loading a URL to a docshell.

2015-09-13 Thread Yonggang Luo
So that I know what's the docshell is and the URL is.

-- 
 此致
礼
罗勇刚
Yours
sincerely,
Yonggang Luo
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform