--
You received this message because you are subscribed to the Google Groups "mozilla-labs-jetpack" group.
To post to this group, send email to mozilla-la...@googlegroups.com.
To unsubscribe from this group, send email to mozilla-labs-jet...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mozilla-labs-jetpack?hl=en.
-- Julián Ceballos Mozilla México Software
What do you think about use getter/setter methods?, good idea or bad idea?
> There are also technical reasons to keep focus method. Access to the
> wrapped
> window is encapsulated in the `BrowserWindow` instances so that no one
> else can
> have access the window object itself and there for focus it. That
> being said of
> course it's not impossible but will end up in more complex code
> without much of
> an advantage.
The advantage is a reduction in the surface area of the API to that set
of properties and methods that we actually intended to explicitly
expose, which has collateral benefits for security and API stability.
> As an alternative I can suggest converting `activeWindow` property to
> a read
> only and keep focus method.
> This is also less verbose:
>
> browserWindows[3].focus();
>
> then
>
> borwserWindows.activeWindow = browserWindows[3];
Yes, I agree that this approach is preferable, and this is the third
time this suggestion has come up in conversation this week, which I'm
sure is telling me something, if only I could figure out what. ;-)
But I would call it "activate" rather than "focus", which has a
specific, different meaning on the web and in Firefox's web-like chrome
interface (the latter of which unfortunately reuses "focused" along with
"current", and "active", "selected", and "frontmost" haphazardly and
inconsistently to expose and describe the concept of window and tab
activation).
-myk