Is there any documentation that might describe some of the hierarchy or
methodology?
Thanks in advance,
-Kevin
-Kevin
If you really want to do that, I think adding capturing event listener
for 'blur' to topmost chrome window and then calling minimize()
http://mxr-test.landfill.bugzilla.org/mxr-test/seamonkey/source/dom/public/idl/base/nsIDOMChromeWindow.idl#67
should work.
I guess I need to start reading chrome documentation now -- I am not
familiar with that at all so this might pose a bit of a problem. I am
currently reading the mozilla docs on this, but if you have any
pointers that might save me some time, it would be greatly appreciated.
Thanks for the help!
-Kevin
-Kevin
function min() {
window.minimize();
}
window.addEventListener('blur', min, false);
Yarrg, just do |addEventListener('blur', minimize, false);|. The
window object is the actually the default scope, so you almost never
actually need to say window.foo to get foo. Anyway, that's just my 2
cents, I don't actually know what the real question was.
db48x
<html><head></head>
<body onLoad="window.blur()">
</body>
</html>
Or are you suggesting something different?
Thanks DigDug,
-Kevin
I suggest you post a message to the whatwg asking this. I know they
have been busy defining all kinds of properties and methods on the
Window object. I think this would be a handy addition to that.
See: http://dev.w3.org/cvsweb/~checkout~/2006/webapi/Window/publish/Window.html
for what appears to be the current document on the Window object.
Regards,
Martijn
--
Martijn Wargers
Help Mozilla!
http://weblogs.mozillazine.org/qa/
http://www.mozilla.org/contribute/
I just need some answers to understand the system better. I have
posted similar questions multiple times, and tried hanging out in
Chatzilla fishing for answers, but usually I just get a workaround that
in the end, doesn't work (I am sad to say).
It just seems so easy a problem to find a work-around for, I think is
the problem, when in reality, is going to be a difficult problem to
find a real solution for. I would love of course for someone to prove
me wrong here... (any volunteers?) :-)
-Kevin
What is the bubbling phase, at any rate?
http://www.w3.org/TR/DOM-Level-3-Events/events.html
http://www.w3.org/TR/DOM-Level-3-Events/events.html#event-blur
Thanks for that, at any rate -- it was interesting.
-Kevin
> and I managed to track down blur(), although the behaviour wasn't
> altogether clear to me what is supposed to happen when window.blur() is
> called. Take the focus away from the object, so when the window loses
> focus, it seems like minimizing would be correct, as in the case for IE
> and Netscape. Since Firefox does nothing on the existance for a single
> window, and does the funky chicken window dance when multiple windows
> exist, it would seem to me that the specification has perhaps been
> mis-interpreted, or mis-implemented.
That's not what I find in IE7, with a quick test.
In IE7, I see that the browser looses the focus, but it doesn't
minimise to the task bar.
> What is the bubbling phase, at any rate?
A quick Google search gave me this:
http://www.xulplanet.com/tutorials/xultu/events.html
"
The event is then sent to the XUL in phases. The first phase is the
capturing phase, in which the event is first sent to the window, then
to the document, followed by each ancestor of the XUL element where
the event occured downwards until it reaches that element. Then, the
event is sent to that XUL element. Finally, during the bubbling phase,
the event is sent to each element back upwards until it reaches the
window again. You can respond to an event during either the capturing
or bubbling phase. Once the event has finished propagating, any
default action will occur, which is the built in behaviour of the
element.
"
Regards,
Martijn
That's when the event bubbles upward
> http://www.w3.org/TR/DOM-Level-3-Events/events.html
> http://www.w3.org/TR/DOM-Level-3-Events/events.html#event-blur
>
> Thanks for that, at any rate -- it was interesting.
>
> -Kevin
>
> Martijn wrote:
> > On 19 Dec 2006 03:16:16 -0800, gocaveman <kevin...@bellsouth.net> wrote:
> > > I understand that there is no such thing as window.minimize(), in
> > > Javascript at any rate. It would be lovely if there was. Were such a
> > > thing possible, I could just replace the following blur() with
> > > minimize.
> >
> > I suggest you post a message to the whatwg asking this. I know they
> > have been busy defining all kinds of properties and methods on the
> > Window object. I think this would be a handy addition to that.
> > See: http://dev.w3.org/cvsweb/~checkout~/2006/webapi/Window/publish/Window.html
> > for what appears to be the current document on the Window object.
> >
> > Regards,
> > Martijn
> >
> >
> > --
> > Martijn Wargers
> > Help Mozilla!
> > http://weblogs.mozillazine.org/qa/
> > http://www.mozilla.org/contribute/
>
> _______________________________________________
> dev-apps-firefox mailing list
> dev-apps...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-apps-firefox
Browsing specs is interesting and helpful, but it doesn't do much to
solve my problem. No offense, but I am just frustrated trying to get
answers. Good to know IE7 is broken as well. Saves me the effort of
testing it.
Thanks again for the input,
Regards,
Martijn
I guess I am on my own to solve the problem. I know c++ well, but the
whole architecture and interaction of chrome and IDLs are a bit tough
to figure out who calls what, and when is what I was hoping to find
answers to. That, and where do I find help. The only IRC I have found
anyone on is #Firefox and #ExtDev.
-Kevin
Oh, this isn't a web application?
I mean, you have chrome privileges?
Well, in that case, I think this is what you want then:
http://wargers.org/mozilla/enhanced_privileges/minimize_window.htm
It works when you save the file to your computer and then let it run
(you need to allow the page to run with enhanced privileges).
Regards,
Martijn
-Kevin
Do you happen to have any experience with the Hidden Window Hack?
http://developer.mozilla.org/en/docs/Working_with_windows_in_chrome_code
Thanks again,
-Kevin
Here are the methods you can use on bwin:
http://lxr.mozilla.org/seamonkey/source/dom/public/idl/base/nsIDOMChromeWindow.idl#66
I think you need restore().
> Do you happen to have any experience with the Hidden Window Hack?
> http://developer.mozilla.org/en/docs/Working_with_windows_in_chrome_code
No, but that seems like a hack to store data.
I think Firefox2 and newer versions support the globalStorage property, see:
http://www.whatwg.org/specs/web-apps/current-work/#globalstorage
I've never used it, though.
It's only for html documents it seems, not sure what you should use
for xul documents.
Regards,
Martijn