How can I add commandupdater to all window in Firefox - Mozilla
This is a discussion on How can I add commandupdater to all window in Firefox - Mozilla ; I'm trying to add commandupdater to all window like ,
in Firefox.
My final opportunity is "To watch clipboard event occured in any
Firefox window".
So at first, I did the thing like below.
there.is.only.xul">
commandupdater="true"
events="clipboard"
oncommandupdate="clipboard_watcher();"/>
But this ...
-
How can I add commandupdater to all window in Firefox
I'm trying to add commandupdater to all window like ,
in Firefox.
My final opportunity is "To watch clipboard event occured in any
Firefox window".
So at first, I did the thing like below.
commandupdater="true"
events="clipboard"
oncommandupdate="clipboard_watcher();"/>
But this does not seems to work.
So, I changed the code a bit and get it works on the document which
toplevel element is
but not in the .
commandupdater="true"
events="clipboard"
oncommandupdate="clipboard_watcher();"/>
I arranged the another file which does the same thing but renamed the
"window" to "prefwindow" and in the Extensions code, did the code
below.
var windowElement;
windowElement = document.getElementsByTagName("prefwindow");
if (windowElement.length) {
document.loadOverlay('chrome://**/clipboard-watcher-
prefwindow.xul', null);
} else {
windowElement = document.getElementsByTagName("window");
if (windowElement.length) {
document.loadOverlay('chrome://**/clipboard-watcher-
window.xul', null);
}
}
But this does not seems to work.
My question is how can I add commandupdater to window, prefwindow and
make it work.
Thanks in advance.
-
Re: How can I add commandupdater to all window in Firefox
On 9月12日, 午前11:36, mo wrote:
> I'm trying to add commandupdater to all window like ,
> in Firefox.
> My final opportunity is "To watch clipboard event occured in any
> Firefox window".
> So at first, I did the thing like below.
>
>
> * *
> * * * * * * * * commandupdater="true"
> * * * * * * * * events="clipboard"
> * * * * * * * * oncommandupdate="clipboard_watcher();"/>
>
>
> But this does not seems to work.
>
> So, I changed the code a bit and get it works on the document which
> toplevel element is
> but not in the .
>
>
> * *
> * * * *
> * * * * * * * * * * commandupdater="true"
> * * * * * * * * * * events="clipboard"
> * * * * * * * * * * oncommandupdate="clipboard_watcher();"/>
> * *
>
>
> I arranged the another file which does the same thing but renamed the
> "window" to "prefwindow" and in the Extensions code, *did the code
> below.
>
> * * * * var windowElement;
> * * * * windowElement = document.getElementsByTagName("prefwindow");
> * * * * if (windowElement.length) {
> * * * * * * document.loadOverlay('chrome://**/clipboard-watcher-
> prefwindow.xul', null);
> * * * * } else {
> * * * * * * windowElement = document.getElementsByTagName("window");
> * * * * * * if (windowElement.length) {
> * * * * * * * * document.loadOverlay('chrome://**/clipboard-watcher-
> window.xul', null);
> * * * * * * }
> * * * * }
>
> But this does not seems to work.
>
> My question is how can I add commandupdater to window, prefwindow and
> make it work.
>
> Thanks in advance.
Sorry, this code seems to work in prefwindow.
commandupdater="true"
events="clipboard"
oncommandupdate="clipboard_watcher();"/>