Hello, I’ve read about [xul migration][1] and create the chrome directory along with its sub folder besides the one that cfx init created. I have a xul window in chrome/content/myextension.xul that pops up when I click the toolbar but the window doesn’t centering and the favicon in xul window doesn’t showed up too. How can I resolve this?
my lib/main.js
var buttons = require('sdk/ui/button/action');
var button = buttons.ActionButton({
id: "myextension",
label: "myextension",
icon: {
"16": "./con16.png",
"24": "./icon24.png",
"32": "./icon32.png",
},
onClick: handleClick
});
function handleClick(state){
var win = require('sdk/window/utils');
win.open('chrome://myextension/content/myextension.xul', 'myextension', 'chrome,centerscreen');
//title and centering doesn't work
}
my chrome/content/myextension.xul
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<!DOCTYPE window>
<window xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" title="myextension" >
<!-- <html:link rel="icon" href="chrome://myextension/content/favicon.png" style="display:none"/> not showing -->
<iframe type="content" src="chrome://myextension/content/myextension.html" width="700" height="400" /></window>
Regards,
Bakti
[1]: https://developer.mozilla.org/en-US/Add-ons/SDK/Guides/XUL_Migration_Guide