<binding id="boltWindowShadowBox">
<resources>
<stylesheet src="chrome://messenger/content/BoltWindowShadow.css"/>
</resources>
<content>
<xul:tooltip default="true" />
<xul:vbox anonid="shadow" flex="1">
<children />
</xul:vbox>
</content>
<implementation>
<constructor><![CDATA[
document.documentElement.setAttribute("hidechrome", true);
document.documentElement.setAttribute("chromehidden", true);
document.documentElement.setAttribute("chromemargin", "0,0,0,0");
document.documentElement.setAttribute("drawintitlebar", false);
document.documentElement.setAttribute("disablechrome", true);
Components.utils.import("resource://gre/modules/Services.jsm");
Services.scriptloader.loadSubScript("chrome://messenger/content/BoltUtils.js",
window);
Services.scriptloader.loadSubScript("chrome://messenger/content/BoltWindow.js",
window);
window.changeBoltWindowStyle.call(window);
let injectStyle = this.getAttribute("injectStyle");
let injectStyleStr = injectStyle ? (injectStyle + "") : "no style" ;
dump("boltWindowShadowBox for:" + document.baseURI + " with
style:" + injectStyleStr + "\n");
var script = document.createElement("script");
var windowContent = document.getElementById("windowContentBox");
windowContent.insertBefore(script, windowContent.firstChild);
script.setAttribute('type', "application/javascript");
script.src = "chrome://messenger/content/BoltWindow.js"
script = document.createElement("script");
windowContent.insertBefore(script, windowContent.firstChild);
script.setAttribute('type', "application/javascript");
script.src = "chrome://messenger/content/BoltUtils.js";
window.addEventListener('DOMContentLoaded', function(event) {
window.removeEventListener('DOMContentLoaded',
arguments.callee, false);
window.loadBoltWindowStyle.call(window);
injectStyle && window.injectStyleSheetURL(window,
injectStyle, "author");
}, false);
]]></constructor>
<destructor><![CDATA[
]]></destructor>
</implementation>
</binding>
I was trying to do it in XBL constructor, but non of these works.
looking for solutions.
--
此致
礼
罗勇刚
Yours
sincerely,
Yonggang Luo
_______________________________________________
dev-platform mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-platform