mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Merge inbound to m-c. a=merge
This commit is contained in:
commit
a056b599fd
@ -73,20 +73,20 @@
|
||||
gTextboxElm = getNode("textbox");
|
||||
gTooltipElm = getNode("tooltip");
|
||||
|
||||
gButtonElm.addEventListener("focus", gFocusHandler, false);
|
||||
gButtonElm.addEventListener("blur", gBlurHandler, false);
|
||||
gTextboxElm.addEventListener("focus", gFocusHandler, false);
|
||||
gTextboxElm.addEventListener("blur", gBlurHandler, false);
|
||||
gButtonElm.addEventListener("focus", gFocusHandler);
|
||||
gButtonElm.addEventListener("blur", gBlurHandler);
|
||||
gTextboxElm.addEventListener("focus", gFocusHandler);
|
||||
gTextboxElm.addEventListener("blur", gBlurHandler);
|
||||
|
||||
// The aria-describedby is changed on DOM focus. Accessible description
|
||||
// should be updated when a11y focus is fired.
|
||||
gQueue = new eventQueue(nsIAccessibleEvent.EVENT_FOCUS);
|
||||
gQueue.onFinish = function()
|
||||
{
|
||||
gButtonElm.removeEventListener("focus", gFocusHandler, false);
|
||||
gButtonElm.removeEventListener("blur", gBlurHandler, false);
|
||||
gTextboxElm.removeEventListener("focus", gFocusHandler, false);
|
||||
gTextboxElm.removeEventListener("blur", gBlurHandler, false);
|
||||
gButtonElm.removeEventListener("focus", gFocusHandler);
|
||||
gButtonElm.removeEventListener("blur", gBlurHandler);
|
||||
gTextboxElm.removeEventListener("focus", gFocusHandler);
|
||||
gTextboxElm.removeEventListener("blur", gBlurHandler);
|
||||
}
|
||||
|
||||
var descr = "It's a tooltip";
|
||||
|
@ -64,8 +64,8 @@ function grid(aTableIdentifier)
|
||||
|
||||
this.initGrid = function initGrid()
|
||||
{
|
||||
this.table.addEventListener("keypress", this, false);
|
||||
this.table.addEventListener("click", this, false);
|
||||
this.table.addEventListener("keypress", this);
|
||||
this.table.addEventListener("click", this);
|
||||
}
|
||||
|
||||
this.handleEvent = function handleEvent(aEvent)
|
||||
|
@ -46,7 +46,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=420863
|
||||
{
|
||||
}
|
||||
};
|
||||
td3Node.addEventListener("click", gClickHandler, false);
|
||||
td3Node.addEventListener("click", gClickHandler);
|
||||
|
||||
// check actions
|
||||
var actionsArray = [
|
||||
@ -64,7 +64,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=420863
|
||||
checkOnClickEvent: function check(aEvent)
|
||||
{
|
||||
// unregister click event handler
|
||||
this.ID.removeEventListener("click", gClickHandler, false);
|
||||
this.ID.removeEventListener("click", gClickHandler);
|
||||
|
||||
// check actions
|
||||
is(getAccessible(this.ID).actionCount, 0,
|
||||
|
@ -74,7 +74,7 @@ var frames = new Set();
|
||||
this.registerContentFrame = contentFrame => {
|
||||
contentFrame.addEventListener("unload", () => {
|
||||
unregisterContentFrame(contentFrame);
|
||||
}, false);
|
||||
});
|
||||
|
||||
frames.add(contentFrame);
|
||||
|
||||
|
@ -52,9 +52,9 @@ window.location = "data:application/vnd.mozilla.xul+xml;charset=utf-8,<window/>"
|
||||
// used by add-on runner to defer add-on loading until window is ready.
|
||||
var { promise, resolve } = defer();
|
||||
eventTarget.addEventListener("DOMContentLoaded", function handler(event) {
|
||||
eventTarget.removeEventListener("DOMContentLoaded", handler, false);
|
||||
eventTarget.removeEventListener("DOMContentLoaded", handler);
|
||||
resolve();
|
||||
}, false);
|
||||
});
|
||||
|
||||
exports.ready = promise;
|
||||
exports.window = window;
|
||||
|
@ -70,8 +70,7 @@ exports.translateElement = translateElement;
|
||||
|
||||
function onDocumentReady2Translate(event) {
|
||||
let document = event.target;
|
||||
document.removeEventListener("DOMContentLoaded", onDocumentReady2Translate,
|
||||
false);
|
||||
document.removeEventListener("DOMContentLoaded", onDocumentReady2Translate);
|
||||
|
||||
translateElement(document);
|
||||
|
||||
@ -108,8 +107,7 @@ function onContentWindow(document) {
|
||||
console.exception(e);
|
||||
}
|
||||
// Wait for DOM tree to be built before applying localization
|
||||
document.addEventListener("DOMContentLoaded", onDocumentReady2Translate,
|
||||
false);
|
||||
document.addEventListener("DOMContentLoaded", onDocumentReady2Translate);
|
||||
}
|
||||
|
||||
// Listen to creation of content documents in order to translate them as soon
|
||||
|
@ -708,11 +708,11 @@ var MenuWrapper = Class({
|
||||
this._updateItemVisibilities = this.updateItemVisibilities.bind(this);
|
||||
this.contextMenu.addEventListener("popupshowing", this._updateItemVisibilities, true);
|
||||
this._updateOverflowState = this.updateOverflowState.bind(this);
|
||||
this.contextMenu.addEventListener("popupshowing", this._updateOverflowState, false);
|
||||
this.contextMenu.addEventListener("popupshowing", this._updateOverflowState);
|
||||
},
|
||||
|
||||
destroy: function destroy() {
|
||||
this.contextMenu.removeEventListener("popupshowing", this._updateOverflowState, false);
|
||||
this.contextMenu.removeEventListener("popupshowing", this._updateOverflowState);
|
||||
this.contextMenu.removeEventListener("popupshowing", this._updateItemVisibilities, true);
|
||||
|
||||
if (!this.populated)
|
||||
@ -882,7 +882,7 @@ var MenuWrapper = Class({
|
||||
return;
|
||||
|
||||
itemActivated(item, xulNode);
|
||||
}, false);
|
||||
});
|
||||
}
|
||||
|
||||
this.insertIntoXUL(item, xulNode, after);
|
||||
|
@ -318,9 +318,9 @@ TestRunner.prototype = {
|
||||
}
|
||||
else {
|
||||
win.addEventListener("DOMContentLoaded", function onLoad() {
|
||||
win.removeEventListener("DOMContentLoaded", onLoad, false);
|
||||
win.removeEventListener("DOMContentLoaded", onLoad);
|
||||
resolve();
|
||||
}, false);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -31,10 +31,10 @@ function contentLoaded(target) {
|
||||
// "DOMContentLoaded" events from nested frames propagate up to target,
|
||||
// ignore events unless it's DOMContentLoaded for the given target.
|
||||
if (event.target === target || event.target === target.contentDocument) {
|
||||
target.removeEventListener("DOMContentLoaded", DOMContentLoaded, false);
|
||||
target.removeEventListener("DOMContentLoaded", DOMContentLoaded);
|
||||
deferred.resolve(target);
|
||||
}
|
||||
}, false);
|
||||
});
|
||||
return deferred.promise;
|
||||
}
|
||||
|
||||
|
@ -147,7 +147,7 @@ var SinglePanelManager = {
|
||||
// Can't pass an arrow function as the event handler because we need to be
|
||||
// able to call |removeEventListener| later.
|
||||
view.addEventListener("popuphidden", SinglePanelManager.onVisiblePanelHidden, true);
|
||||
view.addEventListener("popupshown", SinglePanelManager.onVisiblePanelShown, false);
|
||||
view.addEventListener("popupshown", SinglePanelManager.onVisiblePanelShown);
|
||||
SinglePanelManager.enqueuedPanel = null;
|
||||
SinglePanelManager.enqueuedPanelCallback = null;
|
||||
SinglePanelManager.visiblePanel = Cu.getWeakReference(panel);
|
||||
@ -170,7 +170,7 @@ var SinglePanelManager = {
|
||||
}
|
||||
SinglePanelManager.visiblePanel = null;
|
||||
view.removeEventListener("popuphidden", SinglePanelManager.onVisiblePanelHidden, true);
|
||||
view.removeEventListener("popupshown", SinglePanelManager.onVisiblePanelShown, false);
|
||||
view.removeEventListener("popupshown", SinglePanelManager.onVisiblePanelShown);
|
||||
let nextPanel = getPanelFromWeakRef(SinglePanelManager.enqueuedPanel);
|
||||
let nextPanelCallback = SinglePanelManager.enqueuedPanelCallback;
|
||||
if (nextPanel) {
|
||||
|
@ -331,7 +331,7 @@ function make(document, options) {
|
||||
for (let event of ["popupshowing", "popuphiding", "popupshown", "popuphidden"])
|
||||
panel.addEventListener(event, onPanelStateChange);
|
||||
|
||||
panel.addEventListener("click", onPanelClick, false);
|
||||
panel.addEventListener("click", onPanelClick);
|
||||
|
||||
// Panel content document can be either in panel `viewFrame` or in
|
||||
// a `backgroundFrame` depending on panel state. Listeners are set
|
||||
|
@ -36,11 +36,11 @@ const Tab = Class({
|
||||
|
||||
// TabReady
|
||||
let onReady = tabInternals.onReady = onTabReady.bind(this);
|
||||
tab.browser.addEventListener(EVENTS.ready.dom, onReady, false);
|
||||
tab.browser.addEventListener(EVENTS.ready.dom, onReady);
|
||||
|
||||
// TabPageShow
|
||||
let onPageShow = tabInternals.onPageShow = onTabPageShow.bind(this);
|
||||
tab.browser.addEventListener(EVENTS.pageshow.dom, onPageShow, false);
|
||||
tab.browser.addEventListener(EVENTS.pageshow.dom, onPageShow);
|
||||
|
||||
// TabLoad
|
||||
let onLoad = tabInternals.onLoad = onTabLoad.bind(this);
|
||||
@ -48,7 +48,7 @@ const Tab = Class({
|
||||
|
||||
// TabClose
|
||||
let onClose = tabInternals.onClose = onTabClose.bind(this);
|
||||
window.BrowserApp.deck.addEventListener(EVENTS.close.dom, onClose, false);
|
||||
window.BrowserApp.deck.addEventListener(EVENTS.close.dom, onClose);
|
||||
|
||||
unload(cleanupTab.bind(null, this));
|
||||
},
|
||||
@ -191,14 +191,14 @@ function cleanupTab(tab) {
|
||||
return;
|
||||
|
||||
if (tabInternals.tab.browser) {
|
||||
tabInternals.tab.browser.removeEventListener(EVENTS.ready.dom, tabInternals.onReady, false);
|
||||
tabInternals.tab.browser.removeEventListener(EVENTS.pageshow.dom, tabInternals.onPageShow, false);
|
||||
tabInternals.tab.browser.removeEventListener(EVENTS.ready.dom, tabInternals.onReady);
|
||||
tabInternals.tab.browser.removeEventListener(EVENTS.pageshow.dom, tabInternals.onPageShow);
|
||||
tabInternals.tab.browser.removeEventListener(EVENTS.load.dom, tabInternals.onLoad, true);
|
||||
}
|
||||
tabInternals.onReady = null;
|
||||
tabInternals.onPageShow = null;
|
||||
tabInternals.onLoad = null;
|
||||
tabInternals.window.BrowserApp.deck.removeEventListener(EVENTS.close.dom, tabInternals.onClose, false);
|
||||
tabInternals.window.BrowserApp.deck.removeEventListener(EVENTS.close.dom, tabInternals.onClose);
|
||||
tabInternals.onClose = null;
|
||||
rawTabNS(tabInternals.tab).tab = null;
|
||||
tabInternals.tab = null;
|
||||
|
@ -92,7 +92,7 @@ const Sidebar = Class({
|
||||
}
|
||||
|
||||
showSidebar(window, self);
|
||||
}, false);
|
||||
});
|
||||
|
||||
function onSidebarLoad() {
|
||||
// check if the sidebar is ready
|
||||
@ -136,13 +136,13 @@ const Sidebar = Class({
|
||||
bar.setAttribute('checked', 'true');
|
||||
|
||||
function onWebPanelSidebarReady() {
|
||||
panelBrowser.contentWindow.removeEventListener('DOMContentLoaded', onWebPanelSidebarReady, false);
|
||||
panelBrowser.contentWindow.removeEventListener('DOMContentLoaded', onWebPanelSidebarReady);
|
||||
windowNS(window).onWebPanelSidebarReady = null;
|
||||
|
||||
emit(self, 'ready', worker);
|
||||
}
|
||||
windowNS(window).onWebPanelSidebarReady = onWebPanelSidebarReady;
|
||||
panelBrowser.contentWindow.addEventListener('DOMContentLoaded', onWebPanelSidebarReady, false);
|
||||
panelBrowser.contentWindow.addEventListener('DOMContentLoaded', onWebPanelSidebarReady);
|
||||
|
||||
function onWebPanelSidebarLoad() {
|
||||
panelBrowser.contentWindow.removeEventListener('load', onWebPanelSidebarLoad, true);
|
||||
@ -192,7 +192,7 @@ const Sidebar = Class({
|
||||
}
|
||||
|
||||
if (windowNS(window).onWebPanelSidebarReady) {
|
||||
panelBrowser && panelBrowser.contentWindow.removeEventListener('DOMContentLoaded', windowNS(window).onWebPanelSidebarReady, false);
|
||||
panelBrowser && panelBrowser.contentWindow.removeEventListener('DOMContentLoaded', windowNS(window).onWebPanelSidebarReady);
|
||||
windowNS(window).onWebPanelSidebarReady = null;
|
||||
}
|
||||
|
||||
|
@ -39,10 +39,10 @@ const Tabs = Class({
|
||||
List.prototype.initialize.apply(this, getTabs(window).map(Tab));
|
||||
|
||||
// TabOpen event
|
||||
window.BrowserApp.deck.addEventListener(EVENTS.open.dom, onTabOpen, false);
|
||||
window.BrowserApp.deck.addEventListener(EVENTS.open.dom, onTabOpen);
|
||||
|
||||
// TabSelect
|
||||
window.BrowserApp.deck.addEventListener(EVENTS.activate.dom, onTabSelect, false);
|
||||
window.BrowserApp.deck.addEventListener(EVENTS.activate.dom, onTabSelect);
|
||||
},
|
||||
get activeTab() {
|
||||
return getTabForRawTab(getSelectedTab(tabsNS(this).window));
|
||||
@ -96,8 +96,8 @@ function tabsUnloader(event, window) {
|
||||
window = window || (event && event.target);
|
||||
if (!(window && window.BrowserApp))
|
||||
return;
|
||||
window.BrowserApp.deck.removeEventListener(EVENTS.open.dom, onTabOpen, false);
|
||||
window.BrowserApp.deck.removeEventListener(EVENTS.activate.dom, onTabSelect, false);
|
||||
window.BrowserApp.deck.removeEventListener(EVENTS.open.dom, onTabOpen);
|
||||
window.BrowserApp.deck.removeEventListener(EVENTS.activate.dom, onTabSelect);
|
||||
}
|
||||
|
||||
// unload handler
|
||||
|
@ -22,9 +22,9 @@ exports.testCrossDomainIframe = function(assert, done) {
|
||||
self.on("message", function (url) {
|
||||
let iframe = document.createElement("iframe");
|
||||
iframe.addEventListener("load", function onload() {
|
||||
iframe.removeEventListener("load", onload, false);
|
||||
iframe.removeEventListener("load", onload);
|
||||
self.postMessage(iframe.contentWindow.document.body.innerHTML);
|
||||
}, false);
|
||||
});
|
||||
iframe.setAttribute("src", url);
|
||||
document.documentElement.appendChild(iframe);
|
||||
});
|
||||
|
@ -28,7 +28,7 @@ function createProxyTest(html, callback) {
|
||||
uri: testURI
|
||||
});
|
||||
|
||||
element.addEventListener("DOMContentLoaded", onDOMReady, false);
|
||||
element.addEventListener("DOMContentLoaded", onDOMReady);
|
||||
|
||||
function onDOMReady() {
|
||||
// Reload frame after getting principal from `testURI`
|
||||
@ -39,8 +39,7 @@ function createProxyTest(html, callback) {
|
||||
}
|
||||
|
||||
assert.equal(element.getAttribute("src"), url, "correct URL loaded");
|
||||
element.removeEventListener("DOMContentLoaded", onDOMReady,
|
||||
false);
|
||||
element.removeEventListener("DOMContentLoaded", onDOMReady);
|
||||
let xrayWindow = element.contentWindow;
|
||||
let rawWindow = xrayWindow.wrappedJSObject;
|
||||
|
||||
@ -175,7 +174,7 @@ exports["test postMessage"] = createProxyTest(html, function (helper, assert) {
|
||||
// Listen without proxies, to check that it will work in regular case
|
||||
// simulate listening from a web document.
|
||||
ifWindow.addEventListener("message", function listener(event) {
|
||||
ifWindow.removeEventListener("message", listener, false);
|
||||
ifWindow.removeEventListener("message", listener);
|
||||
// As we are in system principal, event is an XrayWrapper
|
||||
// xrays use current compartments when calling postMessage method.
|
||||
// Whereas js proxies was using postMessage method compartment,
|
||||
@ -188,7 +187,7 @@ exports["test postMessage"] = createProxyTest(html, function (helper, assert) {
|
||||
"message data is correct");
|
||||
|
||||
helper.done();
|
||||
}, false);
|
||||
});
|
||||
|
||||
helper.createWorker(
|
||||
'new ' + function ContentScriptScope() {
|
||||
|
@ -768,7 +768,7 @@ exports["test:check worker API with page history"] = WorkerTest(
|
||||
|
||||
// Wait for the document to be hidden
|
||||
browser.addEventListener("pagehide", function onpagehide() {
|
||||
browser.removeEventListener("pagehide", onpagehide, false);
|
||||
browser.removeEventListener("pagehide", onpagehide);
|
||||
// Now any event sent to this worker should be cached
|
||||
|
||||
worker.postMessage("message");
|
||||
@ -808,7 +808,7 @@ exports["test:check worker API with page history"] = WorkerTest(
|
||||
browser.goForward();
|
||||
}, 500);
|
||||
|
||||
}, false);
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ exports.testMembranelessMode = function(assert, done) {
|
||||
uri: url
|
||||
});
|
||||
|
||||
element.addEventListener("DOMContentLoaded", onDOMReady, false);
|
||||
element.addEventListener("DOMContentLoaded", onDOMReady);
|
||||
|
||||
function onDOMReady() {
|
||||
let worker = Worker({
|
||||
|
@ -25,7 +25,7 @@
|
||||
result: window.extras === undefined
|
||||
}, '*');
|
||||
}
|
||||
}, false);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -28,7 +28,7 @@ function createProxyTest(html, callback) {
|
||||
uri: testURI
|
||||
});
|
||||
|
||||
element.addEventListener("DOMContentLoaded", onDOMReady, false);
|
||||
element.addEventListener("DOMContentLoaded", onDOMReady);
|
||||
|
||||
function onDOMReady() {
|
||||
// Reload frame after getting principal from `testURI`
|
||||
@ -39,8 +39,7 @@ function createProxyTest(html, callback) {
|
||||
}
|
||||
|
||||
assert.equal(element.getAttribute("src"), url, "correct URL loaded");
|
||||
element.removeEventListener("DOMContentLoaded", onDOMReady,
|
||||
false);
|
||||
element.removeEventListener("DOMContentLoaded", onDOMReady);
|
||||
let xrayWindow = element.contentWindow;
|
||||
let rawWindow = xrayWindow.wrappedJSObject;
|
||||
|
||||
@ -175,7 +174,7 @@ exports["test postMessage"] = createProxyTest(html, function (helper, assert) {
|
||||
// Listen without proxies, to check that it will work in regular case
|
||||
// simulate listening from a web document.
|
||||
ifWindow.addEventListener("message", function listener(event) {
|
||||
ifWindow.removeEventListener("message", listener, false);
|
||||
ifWindow.removeEventListener("message", listener);
|
||||
// As we are in system principal, event is an XrayWrapper
|
||||
// xrays use current compartments when calling postMessage method.
|
||||
// Whereas js proxies was using postMessage method compartment,
|
||||
@ -188,7 +187,7 @@ exports["test postMessage"] = createProxyTest(html, function (helper, assert) {
|
||||
"message data is correct");
|
||||
|
||||
helper.done();
|
||||
}, false);
|
||||
});
|
||||
|
||||
helper.createWorker(
|
||||
'new ' + function ContentScriptScope() {
|
||||
|
@ -752,7 +752,7 @@ exports["test:check worker API with page history"] = WorkerTest(
|
||||
|
||||
// Wait for the document to be hidden
|
||||
browser.addEventListener("pagehide", function onpagehide() {
|
||||
browser.removeEventListener("pagehide", onpagehide, false);
|
||||
browser.removeEventListener("pagehide", onpagehide);
|
||||
// Now any event sent to this worker should throw
|
||||
|
||||
assert.throws(
|
||||
@ -781,7 +781,7 @@ exports["test:check worker API with page history"] = WorkerTest(
|
||||
browser.goForward();
|
||||
}, 500);
|
||||
|
||||
}, false);
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
@ -769,7 +769,7 @@ exports["test:check worker API with page history"] = WorkerTest(
|
||||
|
||||
// Wait for the document to be hidden
|
||||
browser.addEventListener("pagehide", function onpagehide() {
|
||||
browser.removeEventListener("pagehide", onpagehide, false);
|
||||
browser.removeEventListener("pagehide", onpagehide);
|
||||
// Now any event sent to this worker should be cached
|
||||
|
||||
worker.postMessage("message");
|
||||
@ -809,7 +809,7 @@ exports["test:check worker API with page history"] = WorkerTest(
|
||||
browser.goForward();
|
||||
}, 500);
|
||||
|
||||
}, false);
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
@ -308,7 +308,7 @@ exports.testSelectionContextInNewTab = function (assert, done) {
|
||||
link.click();
|
||||
|
||||
let tablistener = event => {
|
||||
this.tabBrowser.tabContainer.removeEventListener("TabOpen", tablistener, false);
|
||||
this.tabBrowser.tabContainer.removeEventListener("TabOpen", tablistener);
|
||||
let tab = event.target;
|
||||
let browser = tab.linkedBrowser;
|
||||
this.loadFrameScript(browser);
|
||||
@ -331,7 +331,7 @@ exports.testSelectionContextInNewTab = function (assert, done) {
|
||||
});
|
||||
}, true);
|
||||
};
|
||||
this.tabBrowser.tabContainer.addEventListener("TabOpen", tablistener, false);
|
||||
this.tabBrowser.tabContainer.addEventListener("TabOpen", tablistener);
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -30,12 +30,12 @@ exports['test fram has js disabled by default'] = function(assert, done) {
|
||||
'= "J" + "S"</script>',
|
||||
});
|
||||
frame.contentWindow.addEventListener('DOMContentLoaded', function ready() {
|
||||
frame.contentWindow.removeEventListener('DOMContentLoaded', ready, false);
|
||||
frame.contentWindow.removeEventListener('DOMContentLoaded', ready);
|
||||
assert.ok(!~frame.contentDocument.documentElement.innerHTML.indexOf('JS'),
|
||||
'JS was executed');
|
||||
|
||||
close(window).then(done);
|
||||
}, false);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
@ -47,12 +47,12 @@ exports['test frame with js enabled'] = function(assert, done) {
|
||||
allowJavascript: true
|
||||
});
|
||||
frame.contentWindow.addEventListener('DOMContentLoaded', function ready() {
|
||||
frame.contentWindow.removeEventListener('DOMContentLoaded', ready, false);
|
||||
frame.contentWindow.removeEventListener('DOMContentLoaded', ready);
|
||||
assert.ok(~frame.contentDocument.documentElement.innerHTML.indexOf('JS'),
|
||||
'JS was executed');
|
||||
|
||||
close(window).then(done);
|
||||
}, false);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -16,14 +16,13 @@ exports["test Frame"] = function(assert, done) {
|
||||
"HiddenFrame loads about:blank by default.");
|
||||
|
||||
function onDOMReady() {
|
||||
hiddenFrame.element.removeEventListener("DOMContentLoaded", onDOMReady,
|
||||
false);
|
||||
hiddenFrame.element.removeEventListener("DOMContentLoaded", onDOMReady);
|
||||
assert.equal(hiddenFrame.element.contentWindow.location, url,
|
||||
"HiddenFrame loads the specified content.");
|
||||
done();
|
||||
}
|
||||
|
||||
this.element.addEventListener("DOMContentLoaded", onDOMReady, false);
|
||||
this.element.addEventListener("DOMContentLoaded", onDOMReady);
|
||||
this.element.setAttribute("src", url);
|
||||
}
|
||||
}));
|
||||
|
@ -422,7 +422,7 @@ exports.testCommunication2 = function*(assert) {
|
||||
msg: 'onload',
|
||||
AUQLUE: document.documentElement.getAttribute('AUQLUE')
|
||||
});
|
||||
}, false);
|
||||
});
|
||||
|
||||
self.on("message", function(msg) {
|
||||
if (msg == "get window.test") {
|
||||
@ -1028,7 +1028,7 @@ exports.testAttachToTabsOnly = function(assert, done) {
|
||||
onReady: function () {
|
||||
let element = this.element;
|
||||
element.addEventListener('DOMContentLoaded', function onload() {
|
||||
element.removeEventListener('DOMContentLoaded', onload, false);
|
||||
element.removeEventListener('DOMContentLoaded', onload);
|
||||
hiddenFrames.remove(hiddenFrame);
|
||||
|
||||
if (!xulApp.is("Fennec")) {
|
||||
@ -1037,7 +1037,7 @@ exports.testAttachToTabsOnly = function(assert, done) {
|
||||
else {
|
||||
openBrowserIframe();
|
||||
}
|
||||
}, false);
|
||||
});
|
||||
element.setAttribute('src', 'data:text/html;charset=utf-8,foo');
|
||||
}
|
||||
}));
|
||||
@ -1047,10 +1047,10 @@ exports.testAttachToTabsOnly = function(assert, done) {
|
||||
assert.pass('Open toplevel window');
|
||||
let win = open('data:text/html;charset=utf-8,bar');
|
||||
win.addEventListener('DOMContentLoaded', function onload() {
|
||||
win.removeEventListener('DOMContentLoaded', onload, false);
|
||||
win.removeEventListener('DOMContentLoaded', onload);
|
||||
win.close();
|
||||
openBrowserIframe();
|
||||
}, false);
|
||||
});
|
||||
}
|
||||
|
||||
function openBrowserIframe() {
|
||||
@ -1061,10 +1061,10 @@ exports.testAttachToTabsOnly = function(assert, done) {
|
||||
iframe.setAttribute('type', 'content');
|
||||
iframe.setAttribute('src', 'data:text/html;charset=utf-8,foobar');
|
||||
iframe.addEventListener('DOMContentLoaded', function onload() {
|
||||
iframe.removeEventListener('DOMContentLoaded', onload, false);
|
||||
iframe.removeEventListener('DOMContentLoaded', onload);
|
||||
iframe.parentNode.removeChild(iframe);
|
||||
openTabWithIframes();
|
||||
}, false);
|
||||
});
|
||||
document.documentElement.appendChild(iframe);
|
||||
}
|
||||
|
||||
@ -1586,7 +1586,7 @@ exports.testEvents = function*(assert) {
|
||||
let content = "<script>\n new " + function DocumentScope() {
|
||||
window.addEventListener("ContentScriptEvent", function () {
|
||||
window.document.body.setAttribute("receivedEvent", "ok");
|
||||
}, false);
|
||||
});
|
||||
} + "\n</script>";
|
||||
let url = "data:text/html;charset=utf-8," + encodeURIComponent(content);
|
||||
|
||||
|
@ -176,10 +176,10 @@ exports.testSideBarIsShowingInNewWindows = function*(assert) {
|
||||
end();
|
||||
}
|
||||
else {
|
||||
sb.addEventListener('DOMWindowCreated', end, false);
|
||||
sb.addEventListener('DOMWindowCreated', end);
|
||||
}
|
||||
function end () {
|
||||
sb.removeEventListener('DOMWindowCreated', end, false);
|
||||
sb.removeEventListener('DOMWindowCreated', end);
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
@ -1096,9 +1096,9 @@ exports.testSidebarLeakCheckDestroyAfterAttach = function*(assert) {
|
||||
yield new Promise(resolve => {
|
||||
let panelBrowser = window.document.getElementById('sidebar').contentDocument.getElementById('web-panels-browser');
|
||||
panelBrowser.contentWindow.addEventListener('unload', function onUnload() {
|
||||
panelBrowser.contentWindow.removeEventListener('unload', onUnload, false);
|
||||
panelBrowser.contentWindow.removeEventListener('unload', onUnload);
|
||||
resolve();
|
||||
}, false);
|
||||
});
|
||||
sidebar.destroy();
|
||||
});
|
||||
|
||||
@ -1138,9 +1138,9 @@ exports.testSidebarLeakCheckUnloadAfterAttach = function*(assert) {
|
||||
let panelBrowser = window.document.getElementById('sidebar').contentDocument.getElementById('web-panels-browser');
|
||||
yield new Promise(resolve => {
|
||||
panelBrowser.contentWindow.addEventListener('unload', function onUnload() {
|
||||
panelBrowser.contentWindow.removeEventListener('unload', onUnload, false);
|
||||
panelBrowser.contentWindow.removeEventListener('unload', onUnload);
|
||||
resolve();
|
||||
}, false);
|
||||
});
|
||||
loader.unload();
|
||||
});
|
||||
|
||||
|
@ -42,7 +42,7 @@ exports.testWindowTracker = function(assert, done) {
|
||||
assert.pass('window was created');
|
||||
|
||||
myWindow.addEventListener("load", function onload() {
|
||||
myWindow.removeEventListener("load", onload, false);
|
||||
myWindow.removeEventListener("load", onload);
|
||||
assert.pass("test window has opened");
|
||||
|
||||
// test bug 638007 (new is optional), using new
|
||||
@ -61,7 +61,7 @@ exports.testWindowTracker = function(assert, done) {
|
||||
}
|
||||
}
|
||||
});
|
||||
}, false);
|
||||
});
|
||||
};
|
||||
|
||||
exports['test window watcher untracker'] = function(assert, done) {
|
||||
@ -148,10 +148,10 @@ exports['test window watcher unregs 4 loading wins'] = function(assert, done) {
|
||||
myWindow.addEventListener("unload", function() {
|
||||
// once the window unloads test is done
|
||||
done();
|
||||
}, false);
|
||||
});
|
||||
myWindow.close();
|
||||
}, 0);
|
||||
}, false);
|
||||
});
|
||||
}
|
||||
|
||||
exports['test window watcher without untracker'] = function(assert, done) {
|
||||
@ -229,13 +229,13 @@ exports.testWindowIterator = function(assert, done) {
|
||||
|
||||
// Then it should be in windowIterator()
|
||||
window.addEventListener("load", function onload() {
|
||||
window.addEventListener("load", onload, false);
|
||||
window.addEventListener("load", onload);
|
||||
assert.ok(toArray(windowUtils.windowIterator()).indexOf(window) !== -1,
|
||||
"window is now in windowIterator()");
|
||||
|
||||
// Wait for the window unload before ending test
|
||||
close(window).then(done);
|
||||
}, false);
|
||||
});
|
||||
};
|
||||
|
||||
exports.testIgnoreClosingWindow = function(assert, done) {
|
||||
@ -247,7 +247,7 @@ exports.testIgnoreClosingWindow = function(assert, done) {
|
||||
assert.equal(windows().length, 2, "Two windows open");
|
||||
|
||||
window.addEventListener("load", function onload() {
|
||||
window.addEventListener("load", onload, false);
|
||||
window.addEventListener("load", onload);
|
||||
|
||||
assert.equal(windows().length, 2, "Two windows open");
|
||||
|
||||
@ -260,7 +260,7 @@ exports.testIgnoreClosingWindow = function(assert, done) {
|
||||
|
||||
assert.equal(windows().length, 1, "Only one window open");
|
||||
checked = true;
|
||||
}, false);
|
||||
});
|
||||
};
|
||||
|
||||
require("sdk/test").run(exports);
|
||||
|
@ -76,9 +76,9 @@ const once = event => {
|
||||
let target = shell.contentBrowser;
|
||||
return new Promise((resolve, reject) => {
|
||||
target.addEventListener(event, function gotEvent(evt) {
|
||||
target.removeEventListener(event, gotEvent, false);
|
||||
target.removeEventListener(event, gotEvent);
|
||||
resolve(evt);
|
||||
}, false);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@ -793,7 +793,7 @@ var CustomEventManager = {
|
||||
window.addEventListener("ContentStart", (function(evt) {
|
||||
let content = shell.contentBrowser.contentWindow;
|
||||
content.addEventListener("mozContentEvent", this, false, true);
|
||||
}).bind(this), false);
|
||||
}).bind(this));
|
||||
},
|
||||
|
||||
handleEvent: function custevt_handleEvent(evt) {
|
||||
|
@ -28,7 +28,7 @@ window.addEventListener('message', function(event) {
|
||||
localStream = null;
|
||||
break;
|
||||
}
|
||||
}, false);
|
||||
});
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
|
@ -31,7 +31,7 @@ function test() {
|
||||
if (event.data === 'start-finished') {
|
||||
resolve();
|
||||
}
|
||||
}, false);
|
||||
});
|
||||
|
||||
gumIframe.onload = function() {
|
||||
info('start audio stream in iframe');
|
||||
|
@ -152,8 +152,8 @@ var LogShake = {
|
||||
// Reset excitement to clear residual motion
|
||||
this.excitement = 0;
|
||||
|
||||
SystemAppProxy.addEventListener(CAPTURE_LOGS_CONTENT_EVENT, this, false);
|
||||
SystemAppProxy.addEventListener(SCREEN_CHANGE_EVENT, this, false);
|
||||
SystemAppProxy.addEventListener(CAPTURE_LOGS_CONTENT_EVENT, this);
|
||||
SystemAppProxy.addEventListener(SCREEN_CHANGE_EVENT, this);
|
||||
|
||||
Services.obs.addObserver(this, "xpcom-shutdown", false);
|
||||
},
|
||||
@ -213,13 +213,13 @@ var LogShake = {
|
||||
if (!this.deviceMotionEnabled &&
|
||||
this.listenToDeviceMotion &&
|
||||
this.screenEnabled) {
|
||||
SystemAppProxy.addEventListener(DEVICE_MOTION_EVENT, this, false);
|
||||
SystemAppProxy.addEventListener(DEVICE_MOTION_EVENT, this);
|
||||
this.deviceMotionEnabled = true;
|
||||
}
|
||||
},
|
||||
|
||||
stopDeviceMotionListener: function() {
|
||||
SystemAppProxy.removeEventListener(DEVICE_MOTION_EVENT, this, false);
|
||||
SystemAppProxy.removeEventListener(DEVICE_MOTION_EVENT, this);
|
||||
this.deviceMotionEnabled = false;
|
||||
},
|
||||
|
||||
@ -389,7 +389,7 @@ var LogShake = {
|
||||
*/
|
||||
uninit: function() {
|
||||
this.stopDeviceMotionListener();
|
||||
SystemAppProxy.removeEventListener(SCREEN_CHANGE_EVENT, this, false);
|
||||
SystemAppProxy.removeEventListener(SCREEN_CHANGE_EVENT, this);
|
||||
Services.obs.removeObserver(this, "xpcom-shutdown");
|
||||
}
|
||||
};
|
||||
|
@ -141,7 +141,7 @@
|
||||
if (allowOverride) {
|
||||
document.getElementById("overrideWeakCryptoPanel").style.display = "flex";
|
||||
var overrideLink = document.getElementById("overrideWeakCrypto");
|
||||
overrideLink.addEventListener("click", () => doOverride(overrideLink), false);
|
||||
overrideLink.addEventListener("click", () => doOverride(overrideLink));
|
||||
}
|
||||
|
||||
if (!gIsCertError) {
|
||||
@ -291,7 +291,7 @@
|
||||
{bubbles: true,
|
||||
detail: changeEvt.target.checked});
|
||||
document.dispatchEvent(event);
|
||||
}, false);
|
||||
});
|
||||
}
|
||||
const hasPrefStyleError = [
|
||||
"interrupted", // This happens with subresources that are above the max tls
|
||||
@ -441,7 +441,7 @@
|
||||
let debugInfo = document.getElementById("certificateErrorDebugInformation");
|
||||
debugInfo.style.display = "block";
|
||||
debugInfo.scrollIntoView({block: "start", behavior: "smooth"});
|
||||
}, false);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@ const PREF_REPORTING_URL = "datareporting.healthreport.about.reportUrl";
|
||||
var healthReportWrapper = {
|
||||
init() {
|
||||
let iframe = document.getElementById("remote-report");
|
||||
iframe.addEventListener("load", healthReportWrapper.initRemotePage, false);
|
||||
iframe.addEventListener("load", healthReportWrapper.initRemotePage);
|
||||
iframe.src = this._getReportURI().spec;
|
||||
prefs.observe("uploadEnabled", this.updatePrefState, healthReportWrapper);
|
||||
},
|
||||
@ -149,8 +149,7 @@ var healthReportWrapper = {
|
||||
initRemotePage() {
|
||||
let iframe = document.getElementById("remote-report").contentDocument;
|
||||
iframe.addEventListener("RemoteHealthReportCommand",
|
||||
function onCommand(e) { healthReportWrapper.handleRemoteCommand(e); },
|
||||
false);
|
||||
function onCommand(e) { healthReportWrapper.handleRemoteCommand(e); });
|
||||
healthReportWrapper.updatePrefState();
|
||||
},
|
||||
|
||||
|
@ -666,14 +666,14 @@ var LightWeightThemeWebInstaller = {
|
||||
return;
|
||||
|
||||
this._resetPreview();
|
||||
gBrowser.tabContainer.addEventListener("TabSelect", this, false);
|
||||
gBrowser.tabContainer.addEventListener("TabSelect", this);
|
||||
this._manager.previewTheme(data);
|
||||
},
|
||||
|
||||
_resetPreview(baseURI) {
|
||||
if (baseURI && !this._isAllowed(baseURI))
|
||||
return;
|
||||
gBrowser.tabContainer.removeEventListener("TabSelect", this, false);
|
||||
gBrowser.tabContainer.removeEventListener("TabSelect", this);
|
||||
this._manager.resetPreview();
|
||||
},
|
||||
|
||||
|
@ -11,8 +11,8 @@ var tabPreviews = {
|
||||
return;
|
||||
this._selectedTab = gBrowser.selectedTab;
|
||||
|
||||
gBrowser.tabContainer.addEventListener("TabSelect", this, false);
|
||||
gBrowser.tabContainer.addEventListener("SSTabRestored", this, false);
|
||||
gBrowser.tabContainer.addEventListener("TabSelect", this);
|
||||
gBrowser.tabContainer.addEventListener("SSTabRestored", this);
|
||||
|
||||
let screenManager = Cc["@mozilla.org/gfx/screenmanager;1"]
|
||||
.getService(Ci.nsIScreenManager);
|
||||
@ -100,8 +100,8 @@ var tabPreviewPanelHelper = {
|
||||
host.panel.hidden = false;
|
||||
|
||||
var handler = this._generateHandler(host);
|
||||
host.panel.addEventListener("popupshown", handler, false);
|
||||
host.panel.addEventListener("popuphiding", handler, false);
|
||||
host.panel.addEventListener("popupshown", handler);
|
||||
host.panel.addEventListener("popuphiding", handler);
|
||||
|
||||
host._prevFocus = document.commandDispatcher.focusedElement;
|
||||
},
|
||||
@ -109,7 +109,7 @@ var tabPreviewPanelHelper = {
|
||||
var self = this;
|
||||
return function(event) {
|
||||
if (event.target == host.panel) {
|
||||
host.panel.removeEventListener(event.type, arguments.callee, false);
|
||||
host.panel.removeEventListener(event.type, arguments.callee);
|
||||
self["_" + event.type](host);
|
||||
}
|
||||
};
|
||||
|
@ -32,7 +32,7 @@ var gDataNotificationInfoBar = {
|
||||
for (let o of this._OBSERVERS) {
|
||||
Services.obs.removeObserver(this, o);
|
||||
}
|
||||
}, false);
|
||||
});
|
||||
|
||||
for (let o of this._OBSERVERS) {
|
||||
Services.obs.addObserver(this, o, true);
|
||||
|
@ -294,8 +294,8 @@ var FullScreen = {
|
||||
|
||||
if (!this._fullScrToggler) {
|
||||
this._fullScrToggler = document.getElementById("fullscr-toggler");
|
||||
this._fullScrToggler.addEventListener("mouseover", this._expandCallback, false);
|
||||
this._fullScrToggler.addEventListener("dragenter", this._expandCallback, false);
|
||||
this._fullScrToggler.addEventListener("mouseover", this._expandCallback);
|
||||
this._fullScrToggler.addEventListener("dragenter", this._expandCallback);
|
||||
}
|
||||
|
||||
if (enterFS) {
|
||||
@ -313,9 +313,9 @@ var FullScreen = {
|
||||
this._updateToolbars(enterFS);
|
||||
|
||||
if (enterFS) {
|
||||
document.addEventListener("keypress", this._keyToggleCallback, false);
|
||||
document.addEventListener("popupshown", this._setPopupOpen, false);
|
||||
document.addEventListener("popuphidden", this._setPopupOpen, false);
|
||||
document.addEventListener("keypress", this._keyToggleCallback);
|
||||
document.addEventListener("popupshown", this._setPopupOpen);
|
||||
document.addEventListener("popuphidden", this._setPopupOpen);
|
||||
// In DOM fullscreen mode, we hide toolbars with CSS
|
||||
if (!document.fullscreenElement)
|
||||
this.hideNavToolbox(true);
|
||||
@ -455,9 +455,9 @@ var FullScreen = {
|
||||
cleanup() {
|
||||
if (!window.fullScreen) {
|
||||
MousePosTracker.removeListener(this);
|
||||
document.removeEventListener("keypress", this._keyToggleCallback, false);
|
||||
document.removeEventListener("popupshown", this._setPopupOpen, false);
|
||||
document.removeEventListener("popuphidden", this._setPopupOpen, false);
|
||||
document.removeEventListener("keypress", this._keyToggleCallback);
|
||||
document.removeEventListener("popupshown", this._setPopupOpen);
|
||||
document.removeEventListener("popuphidden", this._setPopupOpen);
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -598,11 +598,11 @@ var gHistorySwipeAnimation = {
|
||||
// If we don't store any, we handle horizontal swipes without animations.
|
||||
if (this._maxSnapshots > 0) {
|
||||
this.active = true;
|
||||
gBrowser.addEventListener("pagehide", this, false);
|
||||
gBrowser.addEventListener("pageshow", this, false);
|
||||
gBrowser.addEventListener("popstate", this, false);
|
||||
gBrowser.addEventListener("DOMModalDialogClosed", this, false);
|
||||
gBrowser.tabContainer.addEventListener("TabClose", this, false);
|
||||
gBrowser.addEventListener("pagehide", this);
|
||||
gBrowser.addEventListener("pageshow", this);
|
||||
gBrowser.addEventListener("popstate", this);
|
||||
gBrowser.addEventListener("DOMModalDialogClosed", this);
|
||||
gBrowser.tabContainer.addEventListener("TabClose", this);
|
||||
}
|
||||
},
|
||||
|
||||
@ -610,11 +610,11 @@ var gHistorySwipeAnimation = {
|
||||
* Uninitializes the support for history swipe animations.
|
||||
*/
|
||||
uninit: function HSA_uninit() {
|
||||
gBrowser.removeEventListener("pagehide", this, false);
|
||||
gBrowser.removeEventListener("pageshow", this, false);
|
||||
gBrowser.removeEventListener("popstate", this, false);
|
||||
gBrowser.removeEventListener("DOMModalDialogClosed", this, false);
|
||||
gBrowser.tabContainer.removeEventListener("TabClose", this, false);
|
||||
gBrowser.removeEventListener("pagehide", this);
|
||||
gBrowser.removeEventListener("pageshow", this);
|
||||
gBrowser.removeEventListener("popstate", this);
|
||||
gBrowser.removeEventListener("DOMModalDialogClosed", this);
|
||||
gBrowser.tabContainer.removeEventListener("TabClose", this);
|
||||
|
||||
this.active = false;
|
||||
this.isLTR = false;
|
||||
|
@ -347,4 +347,4 @@ window.getGroupMessageManager("browsers").addMessageListener("EMEVideo:ContentMe
|
||||
window.addEventListener("unload", function() {
|
||||
window.getGroupMessageManager("browsers").removeMessageListener("EMEVideo:ContentMediaKeysRequest", gEMEHandler);
|
||||
window.getGroupMessageManager("browsers").removeMessageListener("DecoderDoctor:Notification", gDecoderDoctorHandler);
|
||||
}, false);
|
||||
});
|
||||
|
@ -20,11 +20,11 @@ var StarUI = {
|
||||
// initially the panel is hidden
|
||||
// to avoid impacting startup / new window performance
|
||||
element.hidden = false;
|
||||
element.addEventListener("keypress", this, false);
|
||||
element.addEventListener("mouseout", this, false);
|
||||
element.addEventListener("mousemove", this, false);
|
||||
element.addEventListener("popuphidden", this, false);
|
||||
element.addEventListener("popupshown", this, false);
|
||||
element.addEventListener("keypress", this);
|
||||
element.addEventListener("mouseout", this);
|
||||
element.addEventListener("mousemove", this);
|
||||
element.addEventListener("popuphidden", this);
|
||||
element.addEventListener("popupshown", this);
|
||||
return this.panel = element;
|
||||
},
|
||||
|
||||
|
@ -62,7 +62,7 @@ var gSyncUI = {
|
||||
// was triggered.
|
||||
window.addEventListener("unload", function onUnload() {
|
||||
gSyncUI._unloaded = true;
|
||||
window.removeEventListener("unload", onUnload, false);
|
||||
window.removeEventListener("unload", onUnload);
|
||||
Services.obs.removeObserver(gSyncUI, "weave:service:ready");
|
||||
Services.obs.removeObserver(gSyncUI, "quit-application");
|
||||
|
||||
@ -71,7 +71,7 @@ var gSyncUI = {
|
||||
Services.obs.removeObserver(gSyncUI, topic);
|
||||
});
|
||||
}
|
||||
}, false);
|
||||
});
|
||||
},
|
||||
|
||||
initUI: function SUI_initUI() {
|
||||
|
@ -37,7 +37,7 @@ var gBrowserThumbnails = {
|
||||
Services.prefs.getBoolPref(this.PREF_DISK_CACHE_SSL);
|
||||
|
||||
this._tabEvents.forEach(function(aEvent) {
|
||||
gBrowser.tabContainer.addEventListener(aEvent, this, false);
|
||||
gBrowser.tabContainer.addEventListener(aEvent, this);
|
||||
}, this);
|
||||
|
||||
this._timeouts = new WeakMap();
|
||||
@ -49,7 +49,7 @@ var gBrowserThumbnails = {
|
||||
Services.prefs.removeObserver(this.PREF_DISK_CACHE_SSL, this);
|
||||
|
||||
this._tabEvents.forEach(function(aEvent) {
|
||||
gBrowser.tabContainer.removeEventListener(aEvent, this, false);
|
||||
gBrowser.tabContainer.removeEventListener(aEvent, this);
|
||||
}, this);
|
||||
},
|
||||
|
||||
@ -134,7 +134,7 @@ var gBrowserThumbnails = {
|
||||
|
||||
_clearTimeout: function Thumbnails_clearTimeout(aBrowser) {
|
||||
if (this._timeouts.has(aBrowser)) {
|
||||
aBrowser.removeEventListener("scroll", this, false);
|
||||
aBrowser.removeEventListener("scroll", this);
|
||||
clearTimeout(this._timeouts.get(aBrowser));
|
||||
this._timeouts.delete(aBrowser);
|
||||
}
|
||||
|
@ -323,8 +323,8 @@ const gClickAndHoldListenersOnElement = {
|
||||
// Prevent the menupopup from opening immediately
|
||||
aEvent.currentTarget.firstChild.hidden = true;
|
||||
|
||||
aEvent.currentTarget.addEventListener("mouseout", this, false);
|
||||
aEvent.currentTarget.addEventListener("mouseup", this, false);
|
||||
aEvent.currentTarget.addEventListener("mouseout", this);
|
||||
aEvent.currentTarget.addEventListener("mouseup", this);
|
||||
this._timers.set(aEvent.currentTarget, setTimeout((b) => this._openMenu(b), 500, aEvent.currentTarget));
|
||||
},
|
||||
|
||||
@ -368,8 +368,8 @@ const gClickAndHoldListenersOnElement = {
|
||||
|
||||
_cancelHold(aButton) {
|
||||
clearTimeout(this._timers.get(aButton));
|
||||
aButton.removeEventListener("mouseout", this, false);
|
||||
aButton.removeEventListener("mouseup", this, false);
|
||||
aButton.removeEventListener("mouseout", this);
|
||||
aButton.removeEventListener("mouseup", this);
|
||||
},
|
||||
|
||||
handleEvent(e) {
|
||||
@ -983,7 +983,7 @@ var gBrowserInit = {
|
||||
delayedStartupFinished: false,
|
||||
|
||||
onLoad() {
|
||||
gBrowser.addEventListener("DOMUpdatePageReport", gPopupBlockerObserver, false);
|
||||
gBrowser.addEventListener("DOMUpdatePageReport", gPopupBlockerObserver);
|
||||
|
||||
Services.obs.addObserver(gPluginHandler.NPAPIPluginCrashed, "plugin-crashed", false);
|
||||
|
||||
@ -1341,8 +1341,8 @@ var gBrowserInit = {
|
||||
if (AppConstants.platform != "macosx") {
|
||||
updateEditUIVisibility();
|
||||
let placesContext = document.getElementById("placesContext");
|
||||
placesContext.addEventListener("popupshowing", updateEditUIVisibility, false);
|
||||
placesContext.addEventListener("popuphiding", updateEditUIVisibility, false);
|
||||
placesContext.addEventListener("popupshowing", updateEditUIVisibility);
|
||||
placesContext.addEventListener("popuphiding", updateEditUIVisibility);
|
||||
}
|
||||
|
||||
LightWeightThemeWebInstaller.init();
|
||||
@ -1366,8 +1366,8 @@ var gBrowserInit = {
|
||||
|
||||
gMenuButtonUpdateBadge.init();
|
||||
|
||||
window.addEventListener("mousemove", MousePosTracker, false);
|
||||
window.addEventListener("dragover", MousePosTracker, false);
|
||||
window.addEventListener("mousemove", MousePosTracker);
|
||||
window.addEventListener("dragover", MousePosTracker);
|
||||
|
||||
gNavToolbox.addEventListener("customizationstarting", CustomizationHandler);
|
||||
gNavToolbox.addEventListener("customizationchange", CustomizationHandler);
|
||||
@ -2546,9 +2546,9 @@ function SetPageProxyState(aState, aOptions = {}) {
|
||||
// gets called when we switch tabs.
|
||||
if (aState == "valid") {
|
||||
gLastValidURLStr = gURLBar.value;
|
||||
gURLBar.addEventListener("input", UpdatePageProxyState, false);
|
||||
gURLBar.addEventListener("input", UpdatePageProxyState);
|
||||
} else if (aState == "invalid") {
|
||||
gURLBar.removeEventListener("input", UpdatePageProxyState, false);
|
||||
gURLBar.removeEventListener("input", UpdatePageProxyState);
|
||||
}
|
||||
|
||||
// Only need to call anchorVisibilityChange if the PopupNotifications object
|
||||
@ -3875,10 +3875,10 @@ function FillHistoryMenu(aParent) {
|
||||
// Only the current page should have the checked attribute, so skip it
|
||||
if (!aEvent.target.hasAttribute("checked"))
|
||||
XULBrowserWindow.setOverLink(aEvent.target.getAttribute("uri"));
|
||||
}, false);
|
||||
});
|
||||
aParent.addEventListener("DOMMenuItemInactive", function() {
|
||||
XULBrowserWindow.setOverLink("");
|
||||
}, false);
|
||||
});
|
||||
|
||||
aParent.hasStatusListener = true;
|
||||
}
|
||||
@ -4779,7 +4779,7 @@ var CombinedStopReload = {
|
||||
this._initialized = true;
|
||||
if (XULBrowserWindow.stopCommand.getAttribute("disabled") != "true")
|
||||
reload.setAttribute("displaystop", "true");
|
||||
stop.addEventListener("click", this, false);
|
||||
stop.addEventListener("click", this);
|
||||
this.reload = reload;
|
||||
this.stop = stop;
|
||||
},
|
||||
@ -4790,7 +4790,7 @@ var CombinedStopReload = {
|
||||
|
||||
this._cancelTransition();
|
||||
this._initialized = false;
|
||||
this.stop.removeEventListener("click", this, false);
|
||||
this.stop.removeEventListener("click", this);
|
||||
this.reload = null;
|
||||
this.stop = null;
|
||||
},
|
||||
@ -5148,7 +5148,7 @@ function onViewToolbarsPopupShowing(aEvent, aInsertPoint) {
|
||||
|
||||
popup.insertBefore(menuItem, firstMenuItem);
|
||||
|
||||
menuItem.addEventListener("command", onViewToolbarCommand, false);
|
||||
menuItem.addEventListener("command", onViewToolbarCommand);
|
||||
}
|
||||
|
||||
|
||||
@ -7863,8 +7863,8 @@ var TabContextMenu = {
|
||||
this.contextTab.toggleMuteMenuItem = toggleMute;
|
||||
this._updateToggleMuteMenuItem(this.contextTab);
|
||||
|
||||
this.contextTab.addEventListener("TabAttrModified", this, false);
|
||||
aPopupMenu.addEventListener("popuphiding", this, false);
|
||||
this.contextTab.addEventListener("TabAttrModified", this);
|
||||
aPopupMenu.addEventListener("popuphiding", this);
|
||||
|
||||
gFxAccounts.updateTabContextMenu(aPopupMenu);
|
||||
},
|
||||
|
@ -16,7 +16,7 @@ function Cell(aGrid, aNode) {
|
||||
|
||||
// Register drag-and-drop event handlers.
|
||||
["dragenter", "dragover", "dragexit", "drop"].forEach(function (aType) {
|
||||
this._node.addEventListener(aType, this, false);
|
||||
this._node.addEventListener(aType, this);
|
||||
}, this);
|
||||
}
|
||||
|
||||
|
@ -140,8 +140,8 @@ var gPage = {
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
// Workaround to prevent a delay on MacOSX due to a slow drop animation.
|
||||
document.addEventListener("dragover", this, false);
|
||||
document.addEventListener("drop", this, false);
|
||||
document.addEventListener("dragover", this);
|
||||
document.addEventListener("drop", this);
|
||||
#endif
|
||||
},
|
||||
|
||||
|
@ -292,9 +292,9 @@ Site.prototype = {
|
||||
*/
|
||||
_addEventHandlers: function Site_addEventHandlers() {
|
||||
// Register drag-and-drop event handlers.
|
||||
this._node.addEventListener("dragstart", this, false);
|
||||
this._node.addEventListener("dragend", this, false);
|
||||
this._node.addEventListener("mouseover", this, false);
|
||||
this._node.addEventListener("dragstart", this);
|
||||
this._node.addEventListener("dragend", this);
|
||||
this._node.addEventListener("mouseover", this);
|
||||
|
||||
// Specially treat the sponsored icon & suggested explanation
|
||||
// text to prevent regular hover effects
|
||||
@ -425,7 +425,7 @@ Site.prototype = {
|
||||
handleEvent: function Site_handleEvent(aEvent) {
|
||||
switch (aEvent.type) {
|
||||
case "mouseover":
|
||||
this._node.removeEventListener("mouseover", this, false);
|
||||
this._node.removeEventListener("mouseover", this);
|
||||
this._speculativeConnect();
|
||||
break;
|
||||
case "dragstart":
|
||||
|
@ -24,7 +24,7 @@ var gUndoDialog = {
|
||||
*/
|
||||
init: function UndoDialog_init() {
|
||||
this._undoContainer = document.getElementById("newtab-undo-container");
|
||||
this._undoContainer.addEventListener("click", this, false);
|
||||
this._undoContainer.addEventListener("click", this);
|
||||
this._undoButton = document.getElementById("newtab-undo-button");
|
||||
this._undoCloseButton = document.getElementById("newtab-undo-close-button");
|
||||
this._undoRestoreButton = document.getElementById("newtab-undo-restore-button");
|
||||
|
@ -81,7 +81,7 @@ var gSyncSetup = {
|
||||
});
|
||||
};
|
||||
addRem(true);
|
||||
window.addEventListener("unload", () => addRem(false), false);
|
||||
window.addEventListener("unload", () => addRem(false));
|
||||
|
||||
window.setTimeout(function() {
|
||||
// Force Service to be loaded so that engines are registered.
|
||||
|
@ -111,7 +111,7 @@ var gSyncUtils = {
|
||||
iframe.collapsed = true;
|
||||
document.documentElement.appendChild(iframe);
|
||||
iframe.contentWindow.addEventListener("load", function() {
|
||||
iframe.contentWindow.removeEventListener("load", arguments.callee, false);
|
||||
iframe.contentWindow.removeEventListener("load", arguments.callee);
|
||||
|
||||
// Insert the Sync Key into the page.
|
||||
let el = iframe.contentDocument.getElementById("synckey");
|
||||
@ -129,7 +129,7 @@ var gSyncUtils = {
|
||||
el.firstChild.nodeValue = privacyURL;
|
||||
|
||||
callback(iframe);
|
||||
}, false);
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -4945,7 +4945,7 @@
|
||||
if (this.AppConstants.platform == "macosx") {
|
||||
els.addSystemEventListener(document, "keypress", this, false);
|
||||
}
|
||||
window.addEventListener("sizemodechange", this, false);
|
||||
window.addEventListener("sizemodechange", this);
|
||||
|
||||
var uniqueId = this._generateUniquePanelID();
|
||||
this.mPanelContainer.childNodes[0].id = uniqueId;
|
||||
@ -5065,7 +5065,7 @@
|
||||
if (this.AppConstants.platform == "macosx") {
|
||||
els.removeSystemEventListener(document, "keypress", this, false);
|
||||
}
|
||||
window.removeEventListener("sizemodechange", this, false);
|
||||
window.removeEventListener("sizemodechange", this);
|
||||
|
||||
if (gMultiProcessBrowser) {
|
||||
let messageManager = window.getGroupMessageManager("browsers");
|
||||
@ -5471,8 +5471,8 @@
|
||||
tab.label = this.tabbrowser.mStringBundle.getString("tabs.emptyTabTitle");
|
||||
tab.setAttribute("onerror", "this.removeAttribute('image');");
|
||||
|
||||
window.addEventListener("resize", this, false);
|
||||
window.addEventListener("load", this, false);
|
||||
window.addEventListener("resize", this);
|
||||
window.addEventListener("load", this);
|
||||
|
||||
try {
|
||||
this._tabAnimationLoggingEnabled = Services.prefs.getBoolPref("browser.tabs.animationLogging.enabled");
|
||||
@ -5810,8 +5810,8 @@
|
||||
}
|
||||
}
|
||||
this._hasTabTempMaxWidth = true;
|
||||
this.tabbrowser.addEventListener("mousemove", this, false);
|
||||
window.addEventListener("mouseout", this, false);
|
||||
this.tabbrowser.addEventListener("mousemove", this);
|
||||
window.addEventListener("mouseout", this);
|
||||
}
|
||||
]]></body>
|
||||
</method>
|
||||
@ -5822,15 +5822,15 @@
|
||||
let spacer = this._closingTabsSpacer;
|
||||
spacer.style.width = parseFloat(spacer.style.width) + pixels + "px";
|
||||
this.setAttribute("using-closing-tabs-spacer", "true");
|
||||
this.tabbrowser.addEventListener("mousemove", this, false);
|
||||
window.addEventListener("mouseout", this, false);
|
||||
this.tabbrowser.addEventListener("mousemove", this);
|
||||
window.addEventListener("mouseout", this);
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<method name="_unlockTabSizing">
|
||||
<body><![CDATA[
|
||||
this.tabbrowser.removeEventListener("mousemove", this, false);
|
||||
window.removeEventListener("mouseout", this, false);
|
||||
this.tabbrowser.removeEventListener("mousemove", this);
|
||||
window.removeEventListener("mouseout", this);
|
||||
|
||||
if (this._hasTabTempMaxWidth) {
|
||||
this._hasTabTempMaxWidth = false;
|
||||
@ -7339,9 +7339,9 @@
|
||||
var tabcontainer = gBrowser.tabContainer;
|
||||
|
||||
// Listen for changes in the tab bar.
|
||||
tabcontainer.addEventListener("TabAttrModified", this, false);
|
||||
tabcontainer.addEventListener("TabClose", this, false);
|
||||
tabcontainer.mTabstrip.addEventListener("scroll", this, false);
|
||||
tabcontainer.addEventListener("TabAttrModified", this);
|
||||
tabcontainer.addEventListener("TabClose", this);
|
||||
tabcontainer.mTabstrip.addEventListener("scroll", this);
|
||||
|
||||
let tabs = gBrowser.visibleTabs;
|
||||
for (var i = 0; i < tabs.length; i++) {
|
||||
@ -7370,9 +7370,9 @@
|
||||
}
|
||||
}
|
||||
var tabcontainer = gBrowser.tabContainer;
|
||||
tabcontainer.mTabstrip.removeEventListener("scroll", this, false);
|
||||
tabcontainer.removeEventListener("TabAttrModified", this, false);
|
||||
tabcontainer.removeEventListener("TabClose", this, false);
|
||||
tabcontainer.mTabstrip.removeEventListener("scroll", this);
|
||||
tabcontainer.removeEventListener("TabAttrModified", this);
|
||||
tabcontainer.removeEventListener("TabClose", this);
|
||||
]]></handler>
|
||||
|
||||
<handler event="DOMMenuItemActive">
|
||||
@ -7413,11 +7413,11 @@
|
||||
|
||||
<implementation implements="nsIDOMEventListener">
|
||||
<constructor><![CDATA[
|
||||
window.addEventListener("resize", this, false);
|
||||
window.addEventListener("resize", this);
|
||||
]]></constructor>
|
||||
|
||||
<destructor><![CDATA[
|
||||
window.removeEventListener("resize", this, false);
|
||||
window.removeEventListener("resize", this);
|
||||
MousePosTracker.removeListener(this);
|
||||
]]></destructor>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<script type="text/javascript;version=1.8">
|
||||
|
||||
function init() {
|
||||
window.addEventListener("message", function process(e) {doTest(e)}, false);
|
||||
window.addEventListener("message", function process(e) {doTest(e)});
|
||||
// unless we relinquish the eventloop,
|
||||
// tests will run before the chrome event handlers are ready
|
||||
setTimeout(doTest, 0);
|
||||
|
@ -126,9 +126,9 @@ function promiseNewTabLoadEvent(aUrl, aEventType = "load") {
|
||||
e.target != iframe) {
|
||||
return;
|
||||
}
|
||||
iframe.removeEventListener("load", frameLoad, false);
|
||||
iframe.removeEventListener("load", frameLoad);
|
||||
deferred.resolve(iframe);
|
||||
}, false);
|
||||
});
|
||||
}, true);
|
||||
return deferred.promise;
|
||||
}
|
||||
|
@ -13,9 +13,9 @@ add_task(function* () {
|
||||
// While in the child process, add a listener for the popstate event here. This
|
||||
// event will fire when the mouse click happens.
|
||||
content.addEventListener("popstate", function onPopState() {
|
||||
content.removeEventListener("popstate", onPopState, false);
|
||||
content.removeEventListener("popstate", onPopState);
|
||||
sendAsyncMessage("Test:PopStateOccurred", { location: content.document.location.href });
|
||||
}, false);
|
||||
});
|
||||
});
|
||||
|
||||
window.maximize();
|
||||
|
@ -50,7 +50,7 @@ function test_paste(aCurrentTest) {
|
||||
var inputListener = {
|
||||
test: aCurrentTest,
|
||||
handleEvent(event) {
|
||||
element.removeEventListener(event.type, this, false);
|
||||
element.removeEventListener(event.type, this);
|
||||
|
||||
is(element.value, this.test.expected, this.test.desc);
|
||||
|
||||
@ -59,7 +59,7 @@ function test_paste(aCurrentTest) {
|
||||
setTimeout(next_test, 0);
|
||||
}
|
||||
}
|
||||
element.addEventListener("input", inputListener, false);
|
||||
element.addEventListener("input", inputListener);
|
||||
|
||||
// Focus the window.
|
||||
window.focus();
|
||||
@ -68,13 +68,13 @@ function test_paste(aCurrentTest) {
|
||||
// Focus the element and wait for focus event.
|
||||
info("About to focus " + element.id);
|
||||
element.addEventListener("focus", function() {
|
||||
element.removeEventListener("focus", arguments.callee, false);
|
||||
element.removeEventListener("focus", arguments.callee);
|
||||
executeSoon(function() {
|
||||
// Pasting is async because the Accel+V codepath ends up going through
|
||||
// nsDocumentViewer::FireClipboardEvent.
|
||||
info("Pasting into " + element.id);
|
||||
EventUtils.synthesizeKey("v", { accelKey: true });
|
||||
});
|
||||
}, false);
|
||||
});
|
||||
element.focus();
|
||||
}
|
||||
|
@ -40,22 +40,22 @@ function runTest(event) {
|
||||
ok(div && div.textContent == "Content!", "Sidebar content loaded");
|
||||
|
||||
var link = browser && browser.contentDocument.getElementById("link");
|
||||
sidebar.contentDocument.addEventListener("popupshown", contextMenuOpened, false);
|
||||
sidebar.contentDocument.addEventListener("popupshown", contextMenuOpened);
|
||||
|
||||
EventUtils.synthesizeMouseAtCenter(link, { type: "contextmenu", button: 2 }, browser.contentWindow);
|
||||
}
|
||||
|
||||
function contextMenuOpened() {
|
||||
var sidebar = document.getElementById("sidebar");
|
||||
sidebar.contentDocument.removeEventListener("popupshown", contextMenuOpened, false);
|
||||
sidebar.contentDocument.removeEventListener("popupshown", contextMenuOpened);
|
||||
|
||||
var copyLinkCommand = sidebar.contentDocument.getElementById("context-copylink");
|
||||
copyLinkCommand.addEventListener("command", copyLinkCommandExecuted, false);
|
||||
copyLinkCommand.addEventListener("command", copyLinkCommandExecuted);
|
||||
copyLinkCommand.doCommand();
|
||||
}
|
||||
|
||||
function copyLinkCommandExecuted(event) {
|
||||
event.target.removeEventListener("command", copyLinkCommandExecuted, false);
|
||||
event.target.removeEventListener("command", copyLinkCommandExecuted);
|
||||
|
||||
var sidebar = document.getElementById("sidebar");
|
||||
var browser = sidebar.contentDocument.getElementById("web-panels-browser");
|
||||
@ -64,13 +64,13 @@ function copyLinkCommandExecuted(event) {
|
||||
document.commandDispatcher.getControllerForCommand("cmd_paste").doCommand("cmd_paste");
|
||||
is(textbox.value, "http://www.example.com/ctest", "copy link command");
|
||||
|
||||
sidebar.contentDocument.addEventListener("popuphidden", contextMenuClosed, false);
|
||||
sidebar.contentDocument.addEventListener("popuphidden", contextMenuClosed);
|
||||
event.target.parentNode.hidePopup();
|
||||
}
|
||||
|
||||
function contextMenuClosed() {
|
||||
var sidebar = document.getElementById("sidebar");
|
||||
sidebar.contentDocument.removeEventListener("popuphidden", contextMenuClosed, false);
|
||||
sidebar.contentDocument.removeEventListener("popuphidden", contextMenuClosed);
|
||||
|
||||
SidebarUI.hide();
|
||||
|
||||
|
@ -73,8 +73,8 @@ function test2Setup() {
|
||||
|
||||
gBrowser.tabContainer.addEventListener("TabOpen", function(event) {
|
||||
test2tab = event.target;
|
||||
gBrowser.tabContainer.removeEventListener("TabOpen", arguments.callee, false);
|
||||
}, false);
|
||||
gBrowser.tabContainer.removeEventListener("TabOpen", arguments.callee);
|
||||
});
|
||||
contextMenu.openFrameInTab();
|
||||
ok(test2tab, "openFrameInTab() opened a tab");
|
||||
|
||||
|
@ -84,13 +84,13 @@ var removeElement = document.getElementById("editBookmarkPanelRemoveButton");
|
||||
function checkBookmarksPanel(invoker, phase) {
|
||||
let onPopupShown = function(aEvent) {
|
||||
if (aEvent.originalTarget == popupElement) {
|
||||
popupElement.removeEventListener("popupshown", arguments.callee, false);
|
||||
popupElement.removeEventListener("popupshown", arguments.callee);
|
||||
checkBookmarksPanel(invoker, phase + 1);
|
||||
}
|
||||
};
|
||||
let onPopupHidden = function(aEvent) {
|
||||
if (aEvent.originalTarget == popupElement) {
|
||||
popupElement.removeEventListener("popuphidden", arguments.callee, false);
|
||||
popupElement.removeEventListener("popuphidden", arguments.callee);
|
||||
if (phase < 4) {
|
||||
checkBookmarksPanel(invoker, phase + 1);
|
||||
} else {
|
||||
@ -109,15 +109,15 @@ function checkBookmarksPanel(invoker, phase) {
|
||||
switch (phase) {
|
||||
case 1:
|
||||
case 3:
|
||||
popupElement.addEventListener("popupshown", onPopupShown, false);
|
||||
popupElement.addEventListener("popupshown", onPopupShown);
|
||||
break;
|
||||
case 2:
|
||||
popupElement.addEventListener("popuphidden", onPopupHidden, false);
|
||||
popupElement.addEventListener("popuphidden", onPopupHidden);
|
||||
initialValue = titleElement.value;
|
||||
initialRemoveHidden = removeElement.hidden;
|
||||
break;
|
||||
case 4:
|
||||
popupElement.addEventListener("popuphidden", onPopupHidden, false);
|
||||
popupElement.addEventListener("popuphidden", onPopupHidden);
|
||||
is(titleElement.value, initialValue, "The bookmark panel's title should be the same");
|
||||
is(removeElement.hidden, initialRemoveHidden, "The bookmark panel's visibility should not change");
|
||||
break;
|
||||
|
@ -7,13 +7,13 @@ function test() {
|
||||
ok(false, "shouldn't have gotten the TabClose event for the last tab");
|
||||
}
|
||||
var tab = win.gBrowser.selectedTab;
|
||||
tab.addEventListener("TabClose", onTabClose, false);
|
||||
tab.addEventListener("TabClose", onTabClose);
|
||||
|
||||
EventUtils.synthesizeKey("w", { accelKey: true }, win);
|
||||
|
||||
ok(win.closed, "accel+w closed the window immediately");
|
||||
|
||||
tab.removeEventListener("TabClose", onTabClose, false);
|
||||
tab.removeEventListener("TabClose", onTabClose);
|
||||
|
||||
finish();
|
||||
}, win);
|
||||
|
@ -7,7 +7,7 @@ function test() {
|
||||
waitForExplicitFinish();
|
||||
tabIndex = gBrowser.tabs.length;
|
||||
gBrowser.addTabsProgressListener(progressListener);
|
||||
gBrowser.tabContainer.addEventListener("TabOpen", TabOpen, false);
|
||||
gBrowser.tabContainer.addEventListener("TabOpen", TabOpen);
|
||||
gBrowser.addTab("data:text/html,<html><head><link href='about:logo' rel='shortcut icon'>");
|
||||
}
|
||||
|
||||
@ -22,7 +22,7 @@ function record(aName) {
|
||||
executeSoon(function(tab) {
|
||||
gBrowser.removeTab(tab);
|
||||
gBrowser.removeTabsProgressListener(progressListener);
|
||||
gBrowser.tabContainer.removeEventListener("TabOpen", TabOpen, false);
|
||||
gBrowser.tabContainer.removeEventListener("TabOpen", TabOpen);
|
||||
finish();
|
||||
}.bind(null, tab));
|
||||
}
|
||||
|
@ -135,9 +135,9 @@ function waitForNotificationClose() {
|
||||
return new Promise(resolve => {
|
||||
info("Waiting for notification to close");
|
||||
PopupNotifications.panel.addEventListener("popuphidden", function listener() {
|
||||
PopupNotifications.panel.removeEventListener("popuphidden", listener, false);
|
||||
PopupNotifications.panel.removeEventListener("popuphidden", listener);
|
||||
resolve();
|
||||
}, false);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@ -783,12 +783,12 @@ function test_reload() {
|
||||
function testFail() {
|
||||
ok(false, "Reloading should not have hidden the notification");
|
||||
}
|
||||
PopupNotifications.panel.addEventListener("popuphiding", testFail, false);
|
||||
PopupNotifications.panel.addEventListener("popuphiding", testFail);
|
||||
let requestedUrl = TESTROOT2 + "enabled.html";
|
||||
let loadedPromise = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser, false, requestedUrl);
|
||||
gBrowser.loadURI(TESTROOT2 + "enabled.html");
|
||||
yield loadedPromise;
|
||||
PopupNotifications.panel.removeEventListener("popuphiding", testFail, false);
|
||||
PopupNotifications.panel.removeEventListener("popuphiding", testFail);
|
||||
|
||||
let installs = yield getInstalls();
|
||||
is(installs.length, 1, "Should be one pending install");
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
// Functions for TabClose and TabSelect
|
||||
function onTabClose(aEvent) {
|
||||
gBrowser.tabContainer.removeEventListener("TabClose", onTabClose, false);
|
||||
gBrowser.tabContainer.removeEventListener("TabClose", onTabClose);
|
||||
// Make sure we get the TabClose event for testTab
|
||||
is(aEvent.originalTarget, testTab, "Got the TabClose event for the right tab");
|
||||
// Confirm that we did select the tab
|
||||
@ -36,7 +36,7 @@
|
||||
finish();
|
||||
}
|
||||
function onTabSelect(aEvent) {
|
||||
gBrowser.tabContainer.removeEventListener("TabSelect", onTabSelect, false);
|
||||
gBrowser.tabContainer.removeEventListener("TabSelect", onTabSelect);
|
||||
// Make sure we got the TabSelect event for baseTab
|
||||
is(aEvent.originalTarget, baseTab, "Got the TabSelect event for the right tab");
|
||||
// Confirm that the selected tab is in fact base tab
|
||||
@ -45,8 +45,8 @@
|
||||
}
|
||||
|
||||
// Add the TabClose, TabSelect event listeners before we press enter
|
||||
gBrowser.tabContainer.addEventListener("TabClose", onTabClose, false);
|
||||
gBrowser.tabContainer.addEventListener("TabSelect", onTabSelect, false);
|
||||
gBrowser.tabContainer.addEventListener("TabClose", onTabClose);
|
||||
gBrowser.tabContainer.addEventListener("TabSelect", onTabSelect);
|
||||
|
||||
// Press enter!
|
||||
EventUtils.synthesizeKey("VK_RETURN", {});
|
||||
|
@ -53,18 +53,18 @@ function onStarred() {
|
||||
let tagTxn = new PlacesTagURITransaction(uri, [testTag]);
|
||||
PlacesUtils.transactionManager.doTransaction(tagTxn);
|
||||
|
||||
StarUI.panel.addEventListener("popupshown", onPanelShown, false);
|
||||
StarUI.panel.addEventListener("popupshown", onPanelShown);
|
||||
BookmarkingUI.star.click();
|
||||
}
|
||||
|
||||
function onPanelShown(aEvent) {
|
||||
if (aEvent.target == StarUI.panel) {
|
||||
StarUI.panel.removeEventListener("popupshown", arguments.callee, false);
|
||||
StarUI.panel.removeEventListener("popupshown", arguments.callee);
|
||||
let tagsField = document.getElementById("editBMPanel_tagsField");
|
||||
ok(tagsField.value == testTag, "tags field value was set");
|
||||
tagsField.focus();
|
||||
|
||||
StarUI.panel.addEventListener("popuphidden", onPanelHidden, false);
|
||||
StarUI.panel.addEventListener("popuphidden", onPanelHidden);
|
||||
let removeButton = document.getElementById("editBookmarkPanelRemoveButton");
|
||||
removeButton.click();
|
||||
}
|
||||
@ -72,7 +72,7 @@ function onPanelShown(aEvent) {
|
||||
|
||||
function onPanelHidden(aEvent) {
|
||||
if (aEvent.target == StarUI.panel) {
|
||||
StarUI.panel.removeEventListener("popuphidden", arguments.callee, false);
|
||||
StarUI.panel.removeEventListener("popuphidden", arguments.callee);
|
||||
|
||||
executeSoon(function() {
|
||||
ok(!PlacesUtils.bookmarks.isBookmarked(makeURI(testURL)),
|
||||
|
@ -25,11 +25,11 @@ function checkAnimationState() {
|
||||
info("waiting for the tab to close asynchronously");
|
||||
tab.addEventListener("transitionend", function(event) {
|
||||
if (event.propertyName == "max-width") {
|
||||
tab.removeEventListener("transitionend", arguments.callee, false);
|
||||
tab.removeEventListener("transitionend", arguments.callee);
|
||||
executeSoon(function() {
|
||||
ok(!tab.parentNode, "tab removed asynchronously");
|
||||
finish();
|
||||
});
|
||||
}
|
||||
}, false);
|
||||
});
|
||||
}
|
||||
|
@ -10,9 +10,9 @@ var LightweightThemeManager = tempScope.LightweightThemeManager;
|
||||
|
||||
function wait_for_notification(aCallback) {
|
||||
PopupNotifications.panel.addEventListener("popupshown", function() {
|
||||
PopupNotifications.panel.removeEventListener("popupshown", arguments.callee, false);
|
||||
PopupNotifications.panel.removeEventListener("popupshown", arguments.callee);
|
||||
aCallback(PopupNotifications.panel);
|
||||
}, false);
|
||||
});
|
||||
}
|
||||
|
||||
var TESTS = [
|
||||
@ -27,7 +27,7 @@ function test_install_http() {
|
||||
if (gBrowser.contentDocument.location.href == "about:blank")
|
||||
return;
|
||||
|
||||
gBrowser.selectedBrowser.removeEventListener("pageshow", arguments.callee, false);
|
||||
gBrowser.selectedBrowser.removeEventListener("pageshow", arguments.callee);
|
||||
|
||||
executeSoon(function() {
|
||||
BrowserTestUtils.synthesizeMouse("#theme-install", 2, 2, {}, gBrowser.selectedBrowser);
|
||||
@ -40,7 +40,7 @@ function test_install_http() {
|
||||
|
||||
runNextTest();
|
||||
});
|
||||
}, false);
|
||||
});
|
||||
},
|
||||
|
||||
function test_install_lwtheme() {
|
||||
@ -54,7 +54,7 @@ function test_install_lwtheme() {
|
||||
if (gBrowser.contentDocument.location.href == "about:blank")
|
||||
return;
|
||||
|
||||
gBrowser.selectedBrowser.removeEventListener("pageshow", arguments.callee, false);
|
||||
gBrowser.selectedBrowser.removeEventListener("pageshow", arguments.callee);
|
||||
|
||||
BrowserTestUtils.synthesizeMouse("#theme-install", 2, 2, {}, gBrowser.selectedBrowser);
|
||||
let notificationBox = gBrowser.getNotificationBox(gBrowser.selectedBrowser);
|
||||
@ -70,7 +70,7 @@ function test_install_lwtheme() {
|
||||
runNextTest();
|
||||
}
|
||||
);
|
||||
}, false);
|
||||
});
|
||||
},
|
||||
|
||||
function test_lwtheme_switch_theme() {
|
||||
@ -89,7 +89,7 @@ function test_lwtheme_switch_theme() {
|
||||
if (gBrowser.contentDocument.location.href == "about:blank")
|
||||
return;
|
||||
|
||||
gBrowser.selectedBrowser.removeEventListener("pageshow", arguments.callee, false);
|
||||
gBrowser.selectedBrowser.removeEventListener("pageshow", arguments.callee);
|
||||
|
||||
executeSoon(function() {
|
||||
wait_for_notification(function(aPanel) {
|
||||
@ -111,7 +111,7 @@ function test_lwtheme_switch_theme() {
|
||||
});
|
||||
BrowserTestUtils.synthesizeMouse("#theme-install", 2, 2, {}, gBrowser.selectedBrowser);
|
||||
});
|
||||
}, false);
|
||||
});
|
||||
});
|
||||
}
|
||||
];
|
||||
|
@ -6,20 +6,20 @@ add_task(function* test() {
|
||||
|
||||
function onTabClose() {
|
||||
gotTabClose = true;
|
||||
tab.addEventListener("TabAttrModified", onTabAttrModified, false);
|
||||
tab.addEventListener("TabAttrModified", onTabAttrModified);
|
||||
}
|
||||
|
||||
function onTabAttrModified() {
|
||||
gotTabAttrModified = true;
|
||||
}
|
||||
|
||||
tab.addEventListener("TabClose", onTabClose, false);
|
||||
tab.addEventListener("TabClose", onTabClose);
|
||||
|
||||
yield BrowserTestUtils.removeTab(tab);
|
||||
|
||||
ok(gotTabClose, "should have got the TabClose event");
|
||||
ok(!gotTabAttrModified, "shouldn't have got the TabAttrModified event after TabClose");
|
||||
|
||||
tab.removeEventListener("TabClose", onTabClose, false);
|
||||
tab.removeEventListener("TabAttrModified", onTabAttrModified, false);
|
||||
tab.removeEventListener("TabClose", onTabClose);
|
||||
tab.removeEventListener("TabAttrModified", onTabAttrModified);
|
||||
});
|
||||
|
@ -31,10 +31,10 @@ function duplicate(delta, msg, cb) {
|
||||
let tab = gBrowser.selectedTab;
|
||||
|
||||
tab.addEventListener("SSTabRestored", function tabRestoredListener() {
|
||||
tab.removeEventListener("SSTabRestored", tabRestoredListener, false);
|
||||
tab.removeEventListener("SSTabRestored", tabRestoredListener);
|
||||
is(gBrowser.sessionHistory.index, start + delta, msg);
|
||||
executeSoon(cb);
|
||||
}, false);
|
||||
});
|
||||
}
|
||||
|
||||
function loadAndWait(url, cb) {
|
||||
|
@ -4,7 +4,7 @@ function test() {
|
||||
var tab = gBrowser.addTab();
|
||||
|
||||
tab.addEventListener("TabClose", function() {
|
||||
tab.removeEventListener("TabClose", arguments.callee, false);
|
||||
tab.removeEventListener("TabClose", arguments.callee);
|
||||
|
||||
ok(tab.linkedBrowser, "linkedBrowser should still exist during the TabClose event");
|
||||
|
||||
@ -13,7 +13,7 @@ function test() {
|
||||
|
||||
finish();
|
||||
});
|
||||
}, false);
|
||||
});
|
||||
|
||||
gBrowser.removeTab(tab);
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ function TabOpenListener(url, opencallback, closecallback) {
|
||||
this.opencallback = opencallback;
|
||||
this.closecallback = closecallback;
|
||||
|
||||
gBrowser.tabContainer.addEventListener("TabOpen", this, false);
|
||||
gBrowser.tabContainer.addEventListener("TabOpen", this);
|
||||
}
|
||||
|
||||
TabOpenListener.prototype = {
|
||||
@ -100,11 +100,11 @@ TabOpenListener.prototype = {
|
||||
|
||||
handleEvent(event) {
|
||||
if (event.type == "TabOpen") {
|
||||
gBrowser.tabContainer.removeEventListener("TabOpen", this, false);
|
||||
gBrowser.tabContainer.removeEventListener("TabOpen", this);
|
||||
this.tab = event.originalTarget;
|
||||
this.browser = this.tab.linkedBrowser;
|
||||
BrowserTestUtils.browserLoaded(this.browser, false, this.url).then(() => {
|
||||
this.tab.addEventListener("TabClose", this, false);
|
||||
this.tab.addEventListener("TabClose", this);
|
||||
var url = this.browser.currentURI.spec;
|
||||
is(url, this.url, "Should have opened the correct tab");
|
||||
this.opencallback();
|
||||
@ -112,7 +112,7 @@ TabOpenListener.prototype = {
|
||||
} else if (event.type == "TabClose") {
|
||||
if (event.originalTarget != this.tab)
|
||||
return;
|
||||
this.tab.removeEventListener("TabClose", this, false);
|
||||
this.tab.removeEventListener("TabClose", this);
|
||||
this.opencallback = null;
|
||||
this.tab = null;
|
||||
this.browser = null;
|
||||
|
@ -40,12 +40,12 @@ function continueTest() {
|
||||
|
||||
let doc = gBrowser.contentDocument;
|
||||
doc.styleSheetChangeEventsEnabled = true;
|
||||
doc.addEventListener("StyleSheetAdded", unexpectedContentEvent, false);
|
||||
doc.addEventListener("StyleSheetRemoved", unexpectedContentEvent, false);
|
||||
doc.addEventListener("StyleSheetApplicableStateChanged", unexpectedContentEvent, false);
|
||||
doc.defaultView.addEventListener("StyleSheetAdded", unexpectedContentEvent, false);
|
||||
doc.defaultView.addEventListener("StyleSheetRemoved", unexpectedContentEvent, false);
|
||||
doc.defaultView.addEventListener("StyleSheetApplicableStateChanged", unexpectedContentEvent, false);
|
||||
doc.addEventListener("StyleSheetAdded", unexpectedContentEvent);
|
||||
doc.addEventListener("StyleSheetRemoved", unexpectedContentEvent);
|
||||
doc.addEventListener("StyleSheetApplicableStateChanged", unexpectedContentEvent);
|
||||
doc.defaultView.addEventListener("StyleSheetAdded", unexpectedContentEvent);
|
||||
doc.defaultView.addEventListener("StyleSheetRemoved", unexpectedContentEvent);
|
||||
doc.defaultView.addEventListener("StyleSheetApplicableStateChanged", unexpectedContentEvent);
|
||||
let link = doc.createElement('link');
|
||||
link.setAttribute('rel', 'stylesheet');
|
||||
link.setAttribute('type', 'text/css');
|
||||
@ -146,12 +146,12 @@ function styleRuleRemoved(evt) {
|
||||
|
||||
function concludeTest() {
|
||||
let doc = gBrowser.contentDocument;
|
||||
doc.removeEventListener("StyleSheetAdded", unexpectedContentEvent, false);
|
||||
doc.removeEventListener("StyleSheetRemoved", unexpectedContentEvent, false);
|
||||
doc.removeEventListener("StyleSheetApplicableStateChanged", unexpectedContentEvent, false);
|
||||
doc.defaultView.removeEventListener("StyleSheetAdded", unexpectedContentEvent, false);
|
||||
doc.defaultView.removeEventListener("StyleSheetRemoved", unexpectedContentEvent, false);
|
||||
doc.defaultView.removeEventListener("StyleSheetApplicableStateChanged", unexpectedContentEvent, false);
|
||||
doc.removeEventListener("StyleSheetAdded", unexpectedContentEvent);
|
||||
doc.removeEventListener("StyleSheetRemoved", unexpectedContentEvent);
|
||||
doc.removeEventListener("StyleSheetApplicableStateChanged", unexpectedContentEvent);
|
||||
doc.defaultView.removeEventListener("StyleSheetAdded", unexpectedContentEvent);
|
||||
doc.defaultView.removeEventListener("StyleSheetRemoved", unexpectedContentEvent);
|
||||
doc.defaultView.removeEventListener("StyleSheetApplicableStateChanged", unexpectedContentEvent);
|
||||
gBrowser.removeCurrentTab();
|
||||
gLinkElement = null;
|
||||
gTab = null;
|
||||
|
@ -88,9 +88,9 @@ add_task(function* () {
|
||||
let detectKeyEvent = function(event) {
|
||||
eventConsumed = event.defaultPrevented;
|
||||
};
|
||||
document.addEventListener("keypress", detectKeyEvent, false);
|
||||
document.addEventListener("keypress", detectKeyEvent);
|
||||
yield pressCtrlTab();
|
||||
document.removeEventListener("keypress", detectKeyEvent, false);
|
||||
document.removeEventListener("keypress", detectKeyEvent);
|
||||
ok(eventConsumed, "Ctrl+Tab consumed by the tabbed browser if one tab is open");
|
||||
is(focusedWindow, document.commandDispatcher.focusedWindow,
|
||||
"Ctrl+Tab doesn't change focus if one tab is open");
|
||||
|
@ -6,9 +6,9 @@ function doc() {
|
||||
|
||||
function setHandlerFunc(aResultFunc) {
|
||||
gBrowser.addEventListener("DOMLinkAdded", function(event) {
|
||||
gBrowser.removeEventListener("DOMLinkAdded", arguments.callee, false);
|
||||
gBrowser.removeEventListener("DOMLinkAdded", arguments.callee);
|
||||
executeSoon(aResultFunc);
|
||||
}, false);
|
||||
});
|
||||
}
|
||||
|
||||
function test() {
|
||||
|
@ -295,13 +295,13 @@ var gTests = [
|
||||
function waitForTab(aCallback) {
|
||||
let container = gBrowser.tabContainer;
|
||||
container.addEventListener("TabOpen", function tabOpener(event) {
|
||||
container.removeEventListener("TabOpen", tabOpener, false);
|
||||
container.removeEventListener("TabOpen", tabOpener);
|
||||
gBrowser.addEventListener("load", function listener() {
|
||||
gBrowser.removeEventListener("load", listener, true);
|
||||
let tab = event.target;
|
||||
aCallback(tab);
|
||||
}, true);
|
||||
}, false);
|
||||
});
|
||||
}
|
||||
|
||||
function test() {
|
||||
|
@ -74,6 +74,6 @@ function test() {
|
||||
BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser).then(() => {
|
||||
let window = gBrowser.selectedBrowser.contentWindow;
|
||||
|
||||
window.addEventListener("message", handleMessageEvents, false);
|
||||
window.addEventListener("message", handleMessageEvents);
|
||||
});
|
||||
}
|
||||
|
@ -14,13 +14,13 @@ function test() {
|
||||
|
||||
let numVisBeforeHide, numVisAfterHide;
|
||||
gBrowser.tabContainer.addEventListener("TabSelect", function() {
|
||||
gBrowser.tabContainer.removeEventListener("TabSelect", arguments.callee, false);
|
||||
gBrowser.tabContainer.removeEventListener("TabSelect", arguments.callee);
|
||||
|
||||
// While the next tab is being selected, hide the removing tab
|
||||
numVisBeforeHide = gBrowser.visibleTabs.length;
|
||||
gBrowser.hideTab(testTab);
|
||||
numVisAfterHide = gBrowser.visibleTabs.length;
|
||||
}, false);
|
||||
});
|
||||
gBrowser.removeTab(testTab, {animate: true});
|
||||
|
||||
// Make sure the tab gets removed at the end of the animation by polling
|
||||
|
@ -25,9 +25,9 @@ function test() {
|
||||
ok(false, "Alert window opened");
|
||||
let win = aSubject.QueryInterface(Ci.nsIDOMEventTarget);
|
||||
win.addEventListener("load", function() {
|
||||
win.removeEventListener("load", arguments.callee, false);
|
||||
win.removeEventListener("load", arguments.callee);
|
||||
win.close();
|
||||
}, false);
|
||||
});
|
||||
executeSoon(finish);
|
||||
}
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ function doTest() {
|
||||
gBrowser.addTab("about:blank", {skipAnimation: true});
|
||||
gBrowser.pinTab(tabs[0]);
|
||||
|
||||
tabstrip.addEventListener("overflow", runOverflowTests, false);
|
||||
tabstrip.addEventListener("overflow", runOverflowTests);
|
||||
}
|
||||
|
||||
function runOverflowTests(aEvent) {
|
||||
@ -41,7 +41,7 @@ function runOverflowTests(aEvent) {
|
||||
aEvent.target != tabstrip)
|
||||
return;
|
||||
|
||||
tabstrip.removeEventListener("overflow", runOverflowTests, false);
|
||||
tabstrip.removeEventListener("overflow", runOverflowTests);
|
||||
|
||||
var upButton = tabstrip._scrollButtonUp;
|
||||
var downButton = tabstrip._scrollButtonDown;
|
||||
|
@ -786,7 +786,7 @@ WindowHelper.prototype = {
|
||||
let win = aSubject.QueryInterface(Ci.nsIDOMWindow);
|
||||
|
||||
win.addEventListener("load", function onload(event) {
|
||||
win.removeEventListener("load", onload, false);
|
||||
win.removeEventListener("load", onload);
|
||||
|
||||
if (win.name !== "SanitizeDialog")
|
||||
return;
|
||||
@ -794,11 +794,11 @@ WindowHelper.prototype = {
|
||||
wh.win = win;
|
||||
loaded = true;
|
||||
executeSoon(() => wh.onload());
|
||||
}, false);
|
||||
});
|
||||
|
||||
win.addEventListener("unload", function onunload(event) {
|
||||
if (win.name !== "SanitizeDialog") {
|
||||
win.removeEventListener("unload", onunload, false);
|
||||
win.removeEventListener("unload", onunload);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -806,7 +806,7 @@ WindowHelper.prototype = {
|
||||
if (!loaded)
|
||||
return;
|
||||
|
||||
win.removeEventListener("unload", onunload, false);
|
||||
win.removeEventListener("unload", onunload);
|
||||
wh.win = win;
|
||||
|
||||
// Some exceptions that reach here don't reach the test harness, but
|
||||
@ -818,7 +818,7 @@ WindowHelper.prototype = {
|
||||
yield PlacesTestUtils.promiseAsyncUpdates();
|
||||
wh._resolveClosed();
|
||||
});
|
||||
}, false);
|
||||
});
|
||||
}
|
||||
Services.ww.registerNotification(windowObserver);
|
||||
Services.ww.openWindow(null,
|
||||
|
@ -19,7 +19,7 @@ function triggerSave(aWindow, aCallback) {
|
||||
.then(() => {
|
||||
waitForFocus(function() {
|
||||
info("register to handle popupshown");
|
||||
aWindow.document.addEventListener("popupshown", contextMenuOpened, false);
|
||||
aWindow.document.addEventListener("popupshown", contextMenuOpened);
|
||||
|
||||
BrowserTestUtils.synthesizeMouseAtCenter("#fff", {type: "contextmenu", button: 2}, testBrowser);
|
||||
info("right clicked!");
|
||||
|
@ -105,7 +105,7 @@ var windowObserver = {
|
||||
let win = aSubject.QueryInterface(Ci.nsIDOMEventTarget);
|
||||
|
||||
win.addEventListener("load", function onLoad(event) {
|
||||
win.removeEventListener("load", onLoad, false);
|
||||
win.removeEventListener("load", onLoad);
|
||||
|
||||
if (win.location == UCT_URI) {
|
||||
SimpleTest.executeSoon(function() {
|
||||
@ -117,7 +117,7 @@ var windowObserver = {
|
||||
}
|
||||
});
|
||||
}
|
||||
}, false);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -138,7 +138,7 @@ function childFunction() {
|
||||
|
||||
content.addEventListener("focus", function() {
|
||||
sendAsyncMessage("Test:FocusReceived", { });
|
||||
}, false);
|
||||
});
|
||||
|
||||
var windowGotActivate = false;
|
||||
var windowGotDeactivate = false;
|
||||
|
@ -236,9 +236,9 @@ function resetBlocklist() {
|
||||
function whenNewWindowLoaded(aOptions, aCallback) {
|
||||
let win = OpenBrowserWindow(aOptions);
|
||||
win.addEventListener("load", function onLoad() {
|
||||
win.removeEventListener("load", onLoad, false);
|
||||
win.removeEventListener("load", onLoad);
|
||||
aCallback(win);
|
||||
}, false);
|
||||
});
|
||||
}
|
||||
|
||||
function promiseWindowWillBeClosed(win) {
|
||||
|
@ -7,7 +7,7 @@
|
||||
<script type="application/javascript;version=1.7">
|
||||
|
||||
function init() {
|
||||
window.addEventListener("message", doTest, false);
|
||||
window.addEventListener("message", doTest);
|
||||
doTest();
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ window.addEventListener("message", function(event) {
|
||||
|
||||
SimpleTest.finish();
|
||||
}
|
||||
}, false);
|
||||
});
|
||||
|
||||
var count = 0;
|
||||
var expectedEvent = "";
|
||||
|
@ -366,7 +366,7 @@ function waitForNotificationShown(notification, callback) {
|
||||
PopupNotifications.panel.addEventListener("popupshown", function onShown(e) {
|
||||
PopupNotifications.panel.removeEventListener("popupshown", onShown);
|
||||
callback();
|
||||
}, false);
|
||||
});
|
||||
notification.reshow();
|
||||
}
|
||||
|
||||
|
@ -237,7 +237,7 @@ XPCOMUtils.defineLazyGetter(this, "gActiveListeners", () => {
|
||||
let listeners = new Map();
|
||||
registerCleanupFunction(() => {
|
||||
for (let [listener, eventName] of listeners) {
|
||||
PopupNotifications.panel.removeEventListener(eventName, listener, false);
|
||||
PopupNotifications.panel.removeEventListener(eventName, listener);
|
||||
}
|
||||
});
|
||||
return listeners;
|
||||
@ -248,12 +248,12 @@ function onPopupEvent(eventName, callback, condition) {
|
||||
if (event.target != PopupNotifications.panel ||
|
||||
(condition && !condition()))
|
||||
return;
|
||||
PopupNotifications.panel.removeEventListener(eventName, listener, false);
|
||||
PopupNotifications.panel.removeEventListener(eventName, listener);
|
||||
gActiveListeners.delete(listener);
|
||||
executeSoon(() => callback.call(PopupNotifications.panel));
|
||||
}
|
||||
gActiveListeners.set(listener, eventName);
|
||||
PopupNotifications.panel.addEventListener(eventName, listener, false);
|
||||
PopupNotifications.panel.addEventListener(eventName, listener);
|
||||
}
|
||||
|
||||
function waitForNotificationPanel() {
|
||||
@ -287,7 +287,7 @@ function triggerSecondaryCommand(popup, index) {
|
||||
notification.secondaryButton.nextSibling.nextSibling.focus();
|
||||
|
||||
popup.addEventListener("popupshown", function handle() {
|
||||
popup.removeEventListener("popupshown", handle, false);
|
||||
popup.removeEventListener("popupshown", handle);
|
||||
info("Command popup open for notification " + notification.id);
|
||||
// Press down until the desired command is selected. Decrease index by one
|
||||
// since the secondary action was handled above.
|
||||
@ -296,7 +296,7 @@ function triggerSecondaryCommand(popup, index) {
|
||||
}
|
||||
// Activate
|
||||
EventUtils.synthesizeKey("VK_RETURN", {});
|
||||
}, false);
|
||||
});
|
||||
|
||||
// One down event to open the popup
|
||||
info("Open the popup to trigger secondary command for notification " + notification.id);
|
||||
|
@ -158,14 +158,14 @@ var tests = {
|
||||
.getInterface(Ci.nsIDOMWindow);
|
||||
|
||||
domwindow.addEventListener("load", function _load() {
|
||||
domwindow.removeEventListener("load", _load, false);
|
||||
domwindow.removeEventListener("load", _load);
|
||||
|
||||
domwindow.addEventListener("unload", function _unload() {
|
||||
domwindow.removeEventListener("unload", _unload, false);
|
||||
domwindow.removeEventListener("unload", _unload);
|
||||
info("blocklist window was closed");
|
||||
Services.wm.removeListener(listener);
|
||||
next();
|
||||
}, false);
|
||||
});
|
||||
|
||||
is(domwindow.document.location.href, URI_EXTENSION_BLOCKLIST_DIALOG, "dialog opened and focused");
|
||||
// wait until after load to cancel so the dialog has initalized. we
|
||||
@ -175,7 +175,7 @@ var tests = {
|
||||
info("***** hit the cancel button\n");
|
||||
cancelButton.doCommand();
|
||||
});
|
||||
}, false);
|
||||
});
|
||||
},
|
||||
onCloseWindow(aXULWindow) { },
|
||||
onWindowTitleChange(aXULWindow, aNewTitle) { }
|
||||
|
@ -5,6 +5,6 @@ document.addEventListener("visibilitychange", () => {
|
||||
if (document.hidden) {
|
||||
alert("You hid my page!");
|
||||
}
|
||||
}, false);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
@ -44,9 +44,9 @@ add_task(function* test_switchtab_override() {
|
||||
let onTabSelect = event => {
|
||||
deferred.reject(new Error("Should have overridden switch to tab"));
|
||||
};
|
||||
gBrowser.tabContainer.addEventListener("TabSelect", onTabSelect, false);
|
||||
gBrowser.tabContainer.addEventListener("TabSelect", onTabSelect);
|
||||
registerCleanupFunction(() => {
|
||||
gBrowser.tabContainer.removeEventListener("TabSelect", onTabSelect, false);
|
||||
gBrowser.tabContainer.removeEventListener("TabSelect", onTabSelect);
|
||||
});
|
||||
// Otherwise it would load the page.
|
||||
BrowserTestUtils.browserLoaded(secondTab.linkedBrowser).then(deferred.resolve);
|
||||
|
@ -17,10 +17,10 @@ add_task(function* test_switchtab_decodeuri() {
|
||||
yield new Promise((resolve, reject) => {
|
||||
// In case of success it should switch tab.
|
||||
gBrowser.tabContainer.addEventListener("TabSelect", function select() {
|
||||
gBrowser.tabContainer.removeEventListener("TabSelect", select, false);
|
||||
gBrowser.tabContainer.removeEventListener("TabSelect", select);
|
||||
is(gBrowser.selectedTab, tab, "Should have switched to the right tab");
|
||||
resolve();
|
||||
}, false);
|
||||
});
|
||||
EventUtils.synthesizeKey("VK_RETURN", { });
|
||||
});
|
||||
|
||||
|
@ -45,9 +45,9 @@ add_task(function* () {
|
||||
return new Promise((resolve, reject) => {
|
||||
gBrowser.selectedBrowser.focus();
|
||||
gURLBar.addEventListener("input", function() {
|
||||
gURLBar.removeEventListener("input", arguments.callee, false);
|
||||
gURLBar.removeEventListener("input", arguments.callee);
|
||||
resolve();
|
||||
}, false);
|
||||
});
|
||||
gURLBar.focus();
|
||||
EventUtils.synthesizeKey("VK_BACK_SPACE", {});
|
||||
});
|
||||
|
@ -126,7 +126,7 @@ function* assertWebRTCIndicatorStatus(expected) {
|
||||
win.removeEventListener("unload", listener);
|
||||
resolve();
|
||||
}
|
||||
}, false);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -75,12 +75,12 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
this._mayTrimURLs = this._prefs.getBoolPref("trimURLs");
|
||||
this._cacheUserMadeSearchSuggestionsChoice();
|
||||
this.inputField.controllers.insertControllerAt(0, this._copyCutController);
|
||||
this.inputField.addEventListener("paste", this, false);
|
||||
this.inputField.addEventListener("mousedown", this, false);
|
||||
this.inputField.addEventListener("mousemove", this, false);
|
||||
this.inputField.addEventListener("mouseout", this, false);
|
||||
this.inputField.addEventListener("overflow", this, false);
|
||||
this.inputField.addEventListener("underflow", this, false);
|
||||
this.inputField.addEventListener("paste", this);
|
||||
this.inputField.addEventListener("mousedown", this);
|
||||
this.inputField.addEventListener("mousemove", this);
|
||||
this.inputField.addEventListener("mouseout", this);
|
||||
this.inputField.addEventListener("overflow", this);
|
||||
this.inputField.addEventListener("underflow", this);
|
||||
|
||||
var textBox = document.getAnonymousElementByAttribute(this,
|
||||
"anonid", "textbox-input-box");
|
||||
@ -96,7 +96,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
pasteAndGo.removeAttribute("disabled");
|
||||
else
|
||||
pasteAndGo.setAttribute("disabled", "true");
|
||||
}, false);
|
||||
});
|
||||
|
||||
var insertLocation = cxmenu.firstChild;
|
||||
while (insertLocation.nextSibling &&
|
||||
@ -120,12 +120,12 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
this._prefs.removeObserver("", this);
|
||||
this._prefs = null;
|
||||
this.inputField.controllers.removeController(this._copyCutController);
|
||||
this.inputField.removeEventListener("paste", this, false);
|
||||
this.inputField.removeEventListener("mousedown", this, false);
|
||||
this.inputField.removeEventListener("mousemove", this, false);
|
||||
this.inputField.removeEventListener("mouseout", this, false);
|
||||
this.inputField.removeEventListener("overflow", this, false);
|
||||
this.inputField.removeEventListener("underflow", this, false);
|
||||
this.inputField.removeEventListener("paste", this);
|
||||
this.inputField.removeEventListener("mousedown", this);
|
||||
this.inputField.removeEventListener("mousemove", this);
|
||||
this.inputField.removeEventListener("mouseout", this);
|
||||
this.inputField.removeEventListener("overflow", this);
|
||||
this.inputField.removeEventListener("underflow", this);
|
||||
]]></destructor>
|
||||
|
||||
<field name="_value">""</field>
|
||||
@ -2211,7 +2211,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
link.href = url;
|
||||
}
|
||||
if (linkHandler) {
|
||||
link.addEventListener("click", linkHandler, false);
|
||||
link.addEventListener("click", linkHandler);
|
||||
}
|
||||
} else {
|
||||
link.hidden = true;
|
||||
|
@ -1369,9 +1369,9 @@ var CustomizableUIInternal = {
|
||||
node.setAttribute("class", "toolbarbutton-1 chromeclass-toolbar-additional");
|
||||
|
||||
let commandHandler = this.handleWidgetCommand.bind(this, aWidget, node);
|
||||
node.addEventListener("command", commandHandler, false);
|
||||
node.addEventListener("command", commandHandler);
|
||||
let clickHandler = this.handleWidgetClick.bind(this, aWidget, node);
|
||||
node.addEventListener("click", clickHandler, false);
|
||||
node.addEventListener("click", clickHandler);
|
||||
|
||||
// If the widget has a view, and has view showing / hiding listeners,
|
||||
// hook those up to this widget.
|
||||
@ -1387,7 +1387,7 @@ var CustomizableUIInternal = {
|
||||
for (let eventName of kSubviewEvents) {
|
||||
let handler = "on" + eventName;
|
||||
if (typeof aWidget[handler] == "function") {
|
||||
viewNode.addEventListener(eventName, aWidget[handler], false);
|
||||
viewNode.addEventListener(eventName, aWidget[handler]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2455,7 +2455,7 @@ var CustomizableUIInternal = {
|
||||
for (let eventName of kSubviewEvents) {
|
||||
let handler = "on" + eventName;
|
||||
if (typeof widget[handler] == "function") {
|
||||
viewNode.removeEventListener(eventName, widget[handler], false);
|
||||
viewNode.removeEventListener(eventName, widget[handler]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -942,7 +942,7 @@ const CustomizableWidgets = [
|
||||
populateList(aDocument, aContainerId, aSection) {
|
||||
let containerElem = aDocument.getElementById(aContainerId);
|
||||
|
||||
containerElem.addEventListener("command", this.onCommand, false);
|
||||
containerElem.addEventListener("command", this.onCommand);
|
||||
|
||||
let list = this.charsetInfo[aSection];
|
||||
|
||||
|
@ -68,7 +68,7 @@ const PanelUI = {
|
||||
this.panel.addEventListener(event, this);
|
||||
}
|
||||
|
||||
this.helpView.addEventListener("ViewShowing", this._onHelpViewShow, false);
|
||||
this.helpView.addEventListener("ViewShowing", this._onHelpViewShow);
|
||||
this._eventListenersAdded = true;
|
||||
},
|
||||
|
||||
|
@ -33,9 +33,9 @@
|
||||
document.addEventListener("readystatechange", function onReadyStateChange() {
|
||||
if (document.readyState != "complete")
|
||||
return;
|
||||
document.removeEventListener("readystatechange", onReadyStateChange, false);
|
||||
document.removeEventListener("readystatechange", onReadyStateChange);
|
||||
self._init();
|
||||
}, false);
|
||||
});
|
||||
}
|
||||
]]></constructor>
|
||||
|
||||
@ -309,21 +309,21 @@
|
||||
if (!this.contextMenu)
|
||||
return;
|
||||
|
||||
this.contextMenu.addEventListener("popupshown", this, false);
|
||||
this.contextMenu.addEventListener("popuphiding", this, false);
|
||||
this.toolbar.addEventListener("mousemove", this, false);
|
||||
this.contextMenu.addEventListener("popupshown", this);
|
||||
this.contextMenu.addEventListener("popuphiding", this);
|
||||
this.toolbar.addEventListener("mousemove", this);
|
||||
},
|
||||
handleEvent(event) {
|
||||
switch (event.type) {
|
||||
case "popupshown":
|
||||
this.toolbar.removeEventListener("mousemove", this, false);
|
||||
this.toolbar.removeEventListener("mousemove", this);
|
||||
break;
|
||||
case "popuphiding":
|
||||
case "mousemove":
|
||||
this.toolbar._setInactiveAsync();
|
||||
this.toolbar.removeEventListener("mousemove", this, false);
|
||||
this.contextMenu.removeEventListener("popuphiding", this, false);
|
||||
this.contextMenu.removeEventListener("popupshown", this, false);
|
||||
this.toolbar.removeEventListener("mousemove", this);
|
||||
this.contextMenu.removeEventListener("popuphiding", this);
|
||||
this.contextMenu.removeEventListener("popupshown", this);
|
||||
this.contextMenu = null;
|
||||
break;
|
||||
}
|
||||
@ -407,9 +407,9 @@
|
||||
document.addEventListener("readystatechange", function onReadyStateChange() {
|
||||
if (document.readyState != "complete")
|
||||
return;
|
||||
document.removeEventListener("readystatechange", onReadyStateChange, false);
|
||||
document.removeEventListener("readystatechange", onReadyStateChange);
|
||||
self._init();
|
||||
}, false);
|
||||
});
|
||||
}
|
||||
]]></constructor>
|
||||
|
||||
|
@ -18,12 +18,12 @@ add_task(function*() {
|
||||
if (aTopic == "domwindowopened") {
|
||||
privateWindow = aSubject.QueryInterface(Components.interfaces.nsIDOMWindow);
|
||||
privateWindow.addEventListener("load", function newWindowHandler() {
|
||||
privateWindow.removeEventListener("load", newWindowHandler, false);
|
||||
privateWindow.removeEventListener("load", newWindowHandler);
|
||||
is(privateWindow.location.href, "chrome://browser/content/browser.xul",
|
||||
"A new browser window was opened");
|
||||
ok(PrivateBrowsingUtils.isWindowPrivate(privateWindow), "Window is private");
|
||||
windowWasHandled = true;
|
||||
}, false);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -17,12 +17,12 @@ add_task(function*() {
|
||||
if (aTopic == "domwindowopened") {
|
||||
newWindow = aSubject.QueryInterface(Components.interfaces.nsIDOMWindow);
|
||||
newWindow.addEventListener("load", function newWindowHandler() {
|
||||
newWindow.removeEventListener("load", newWindowHandler, false);
|
||||
newWindow.removeEventListener("load", newWindowHandler);
|
||||
is(newWindow.location.href, "chrome://browser/content/browser.xul",
|
||||
"A new browser window was opened");
|
||||
ok(!PrivateBrowsingUtils.isWindowPrivate(newWindow), "Window is not private");
|
||||
windowWasHandled = true;
|
||||
}, false);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -147,7 +147,7 @@ this.DownloadsTaskbar = {
|
||||
// again on the next browser window that is opened.
|
||||
this._taskbarProgress = null;
|
||||
}
|
||||
}, false);
|
||||
});
|
||||
},
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user