I am writing a Mozilla extension to calculate the Y Screen off-set by using this "window.content.mozInnerScreenY" API. After upgrading firefox to 33.1 version I am not able to view Mozilla in a maximized window, though selecting to view in Maximized window it gets back to smaller window size. Just to double check i commented this line of code in extension's logic ,then window sizing works good.
Why the above value is not working for me. kindly help me to troubleshoot this issue. code is as bellow:
**var appcontent = document.getElementById("appcontent");
var myExtension = {
init: function() {
// The event can be DOMContentLoaded, pageshow, pagehide, load or unload.
if(appcontent)
{
appcontent.addEventListener("resize", this.onmyPageResize, false);
}
},
onmyPageResize: function(aEvent) {
screenY= window.content.mozInnerScreenY;
//Process screenY
}
}
window.addEventListener("load", function load(event){
window.removeEventListener("load", load, false); //remove listener, no longer needed
myExtension.init();
},false);**
This change worked for me. i made a very minor change in the above code :
const screenY = window.content.mozInnerScreenY.
i just changed screenY as const type since window.content.mozInnerScreenY is a read-only value.
This change fix the issue.