Reputation: 12054
I am trying just to open a new popup HTML page (from )
window.open ('http://www.google.fr', 'win', 'height=240, width=640, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no');
Looks like windows does not have options to specify width, height and other options.
https://developer.mozilla.org/en-US/Add-ons/SDK/High-Level_APIs/windows
Upvotes: 0
Views: 74
Reputation: 578
You would have to use Low-Level
SDK API called 'window/utils'
and its openDialog()
function (instead of open()
), which provides more features
to set.
require('sdk/window/utils').openDialog({
url: 'http://www.google.fr',
name: 'The window I dreamt of',
features: 'height = 240,' +
'width = 640,' +
'toolbar = no,' +
'menubar = no,' +
'scrollbars = no,' +
'resizable = no,' +
'location = no,' +
'directories = no,' +
'status = no'
});
This API is described here: https://developer.mozilla.org/en-US/Add-ons/SDK/Low-Level_APIs/window_utils
And here you can find full list of supported features
for openDialog()
:
https://developer.mozilla.org/pl/docs/Web/API/Window/open
Upvotes: 1