Closed
Bug 685932
Opened 13 years ago
Closed 7 years ago
windows module should provide height/width properties
Categories
(Add-on SDK Graveyard :: General, enhancement, P3)
Add-on SDK Graveyard
General
Tracking
(Not tracked)
RESOLVED
INCOMPLETE
People
(Reporter: dietrich, Unassigned)
References
Details
currently there is no way to get this information without punching through into chrome, or using a page-mod to window outer dimensions.
using a page-mod works in some cases, but is anti-ergonomic, requiring a bunch of message passing infrastructure and event listeners to get two very basic properties.
a situation where the page-mod hack does not work is when you have a panel that you want to size as a proportion of the window size. well, i guess you could write code to do shit like find an open browser window and attach a page-mod to it's active tab's content and etc, but the infrastructure required becomes absurd.
at first glance, 3 additions to the current api would help:
window.height // outer height
window.width // outer width
a 'resize' event
Updated•13 years ago
|
Severity: normal → enhancement
OS: Mac OS X → All
Priority: -- → P3
Hardware: x86 → All
Comment 1•10 years ago
|
||
I think we should leave this to a 3rd party module, Irakli do you agree?
Blocks: sdk/windows
Flags: needinfo?(rFobic)
Reporter | ||
Comment 2•10 years ago
|
||
Can you explain why you think that?
Comment 3•10 years ago
|
||
I think adding window.height / width and resize event is quite reasonable and in fact is far better solution than encouraging ppl to use page-mod for that. So I'm +1 on adding those to the window object.
Dietrich btw now there is a better workaround as you can get chrome object for any sdk object via require("sdk/view/core").viewFor(window), so you could implement simple getWidth getHeight as getWidth = window => require("sdk/view/core").viewFor(window).outerWidth
Flags: needinfo?(rFobic)
Updated•10 years ago
|
Summary: addon-kit windows module should provide height/width properties → windows module should provide height/width properties
Updated•10 years ago
|
Whiteboard: [good first bug]
Comment 4•8 years ago
|
||
Because of the difficulty finding mentors and the expected life span of the SDK, we are removing [good first bug] from remaining SDK bugs.
Updated•8 years ago
|
Whiteboard: [good first bug]
Comment 5•7 years ago
|
||
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•