Skip to content

Commit 32f438c

Browse files
committed
Pale Moon 28.8+ compatibility update
1 parent 495ea11 commit 32f438c

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

modules/Status.jsm

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -145,20 +145,23 @@ S4EStatusService.prototype =
145145
this._window.XULBrowserWindow.watch(prop, XULBWPropHandler);
146146
}, this);
147147

148-
let XULBWHandler = function(prop, oldval, newval) {
149-
if(!newval)
150-
{
148+
if (this._window.watch) { // See https://github.com/JustOff/L4E/issues/1
149+
let XULBWHandler = function(prop, oldval, newval) {
150+
if(!newval)
151+
{
152+
return newval;
153+
}
154+
CU.reportError("XULBrowserWindow changed. Updating S4E bindings.");
155+
this._window.setTimeout(function(self)
156+
{
157+
self.buildBinding();
158+
}, 0, this);
151159
return newval;
152-
}
153-
CU.reportError("XULBrowserWindow changed. Updating S4E bindings.");
154-
this._window.setTimeout(function(self)
155-
{
156-
self.buildBinding();
157-
}, 0, this);
158-
return newval;
159-
};
160+
};
161+
162+
this._window.watch("XULBrowserWindow", XULBWHandler);
163+
}
160164

161-
this._window.watch("XULBrowserWindow", XULBWHandler);
162165
},
163166

164167
destroy: function()

0 commit comments

Comments
 (0)