Closed
Bug 612761
Opened 14 years ago
Closed 14 years ago
remove erroneous reference to Window.focus() method
Categories
(Add-on SDK Graveyard :: General, defect)
Add-on SDK Graveyard
General
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: myk, Assigned: irakli)
References
Details
The Windows API documentation suggests that one can activate a window by calling its focus() method, but Window objects don't actually have a focus() method (one activates them by setting the activeWindow property). The docs should be updated to remove this erroneous reference.
Assignee | ||
Comment 1•14 years ago
|
||
Actually Window's do have focus method and activeWindow setter just calls it. 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.
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];
I guess web devs also might find themself more familiar cause dom API's do usually have focus() methods.
Assignee | ||
Updated•14 years ago
|
Assignee: nobody → rFobic
Assignee | ||
Comment 2•14 years ago
|
||
This has been discussed on mailing list: http://groups.google.com/group/mozilla-labs-jetpack/browse_thread/thread/108df8db72e9a7da#
Outcome is that we have to make activeWindow read-only and rename focus to activate.
All of this is done in 612758. Once it's inn this bug can be closed.
Assignee | ||
Updated•14 years ago
|
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•