Bug 228536 Fix JS strict warning undefined property this.onStandaloneImage r=timeless sr=bz

This commit is contained in:
neil%parkwaycc.co.uk 2006-07-29 05:41:48 +00:00
parent a8cf0737c3
commit 0b170dc7e4

View File

@ -62,6 +62,11 @@ nsContextMenu.prototype = {
},
// Initialize context menu.
initMenu : function ( popup ) {
const xulNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
if ( document.popupNode.namespaceURI == xulNS ) {
this.shouldDisplay = false;
return;
}
// Save menu.
this.menu = popup;
@ -226,11 +231,6 @@ nsContextMenu.prototype = {
},
// Set various context menu attributes based on the state of the world.
setTarget : function ( node ) {
const xulNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
if ( node.namespaceURI == xulNS ) {
this.shouldDisplay = false;
return;
}
// Initialize contextual info.
this.onImage = false;
this.onStandaloneImage = false;