Hello,
I am completely new for Add-on development.
I am trying to open the Popup window using button click event.
But I am not able to achieve it.
Below is the code I am trying.
var buttons = require('sdk/ui/button/action');
var button = buttons.ActionButton({
id: "mozilla-link",
label: "Visit Mozilla",
icon: {
"16": "./16x16.png"
},
onClick: handleClick
});
function handleClick(state) {
var { openDialog } = require('sdk/window/utils');
var window = openDialog({url:'http://www.google.com/'}, {
name: 'jetpack window',
features: Object.keys({
width: 200,
height: 200,
resizable: true,
scrollbars: true
}).join()
});
}
I am getting following message in Command window
JPM [info] Creating a new profile
[GFX1-]: Invalid size in UpdateRenderTarget Size(0,0)
Could you please help me with this issue?
Also let me know any suggestion about opening Popup window with specific size.
Regards
Ashish