--- a/chat/protocols/matrix/matrix-sdk/sync.js
+++ b/chat/protocols/matrix/matrix-sdk/sync.js
@@ -365,17 +365,17 @@ SyncApi.prototype.sync = function() {
var client = this.client;
var self = this;
this._running = true;
if (global.document) {
this._onOnlineBound = this._onOnline.bind(this);
- global.document.addEventListener("online", this._onOnlineBound, false);
+ global.document.addEventListener("online", this._onOnlineBound);
}
// We need to do one-off checks before we can begin the /sync loop.
// These are:
// 1) We need to get push rules so we can check if events should bing as we get
// them from /sync.
// 2) We need to get/create a filter which we can use for /sync.
@@ -429,17 +429,17 @@ SyncApi.prototype.sync = function() {
};
/**
* Stops the sync object from syncing.
*/
SyncApi.prototype.stop = function() {
debuglog("SyncApi.stop");
if (global.document) {
- global.document.removeEventListener("online", this._onOnlineBound, false);
+ global.document.removeEventListener("online", this._onOnlineBound);
this._onOnlineBound = undefined;
}
this._running = false;
if (this._currentSyncRequest) { this._currentSyncRequest.abort(); }
if (this._keepAliveTimer) {
clearTimeout(this._keepAliveTimer);
this._keepAliveTimer = null;
}
--- a/editor/ui/composer/content/ComposerCommands.js
+++ b/editor/ui/composer/content/ComposerCommands.js
@@ -2388,17 +2388,17 @@ var nsValidateCommand =
// nsIFile throws an exception if it's not a file url
} catch (e) { ifile = null; }
if (ifile)
{
URL2Validate = ifile.path;
var vwin = window.open("http://validator.w3.org/file-upload.html",
"EditorValidate");
// Window loads asynchronously, so pass control to the load listener:
- vwin.addEventListener("load", this.validateFilePageLoaded, false);
+ vwin.addEventListener("load", this.validateFilePageLoaded);
}
else
{
var vwin2 = window.open("http://validator.w3.org/check?uri="
+ URL2Validate
+ "&doctype=Inline",
"EditorValidate");
// This does the validation, no need to wait for page loaded.
--- a/editor/ui/composer/content/StructBarContextMenu.js
+++ b/editor/ui/composer/content/StructBarContextMenu.js
@@ -111,17 +111,17 @@ function StructChangeTag()
{
var textbox = document.createElementNS(XUL_NS, "textbox");
textbox.setAttribute("value", gContextMenuNode.getAttribute("value"));
textbox.setAttribute("width", gContextMenuNode.boxObject.width);
textbox.className = "struct-textbox";
gContextMenuNode.parentNode.replaceChild(textbox, gContextMenuNode);
- textbox.addEventListener("keypress", OnKeyPress, false);
+ textbox.addEventListener("keypress", OnKeyPress);
textbox.addEventListener("blur", ResetStructToolbar, true);
textbox.select();
}
function StructSelectTag()
{
SelectFocusNodeAncestor(gContextMenuFiringDocumentElement);
--- a/editor/ui/composer/content/editor.js
+++ b/editor/ui/composer/content/editor.js
@@ -3037,19 +3037,19 @@ function UpdateStructToolbar()
button = document.createElementNS(XUL_NS, "toolbarbutton");
button.setAttribute("label", "<" + tag + ">");
button.setAttribute("value", tag);
button.setAttribute("context", "structToolbarContext");
button.className = "struct-button";
toolbar.insertBefore(button, toolbar.firstChild);
- button.addEventListener("command", newCommandListener(element), false);
-
- button.addEventListener("contextmenu", newContextmenuListener(button, element), false);
+ button.addEventListener("command", newCommandListener(element));
+
+ button.addEventListener("contextmenu", newContextmenuListener(button, element));
if (isFocusNode && oneElementSelected) {
button.setAttribute("checked", "true");
isFocusNode = false;
}
tmp = element;
element = element.parentNode;
--- a/editor/ui/composer/content/editorApplicationOverlay.js
+++ b/editor/ui/composer/content/editorApplicationOverlay.js
@@ -16,17 +16,17 @@ function initEditorContextMenuItems(aEve
// Hide the applications separator if there's no add-on apps present.
gContextMenu.showItem("context-sep-apps", gContextMenu.shouldShowSeparator("context-sep-apps"));
}
function initEditorContextMenuListener(aEvent)
{
var popup = document.getElementById("contentAreaContextMenu");
if (popup)
- popup.addEventListener("popupshowing", initEditorContextMenuItems, false);
+ popup.addEventListener("popupshowing", initEditorContextMenuItems);
}
addEventListener("load", initEditorContextMenuListener, false);
function editDocument(aDocument)
{
if (!aDocument)
aDocument = window.content.document;
--- a/editor/ui/dialogs/content/EdInputProps.js
+++ b/editor/ui/dialogs/content/EdInputProps.js
@@ -172,17 +172,17 @@ function SelectInputType()
break;
case 6:
gDialog.inputValue.disabled = true;
gDialog.inputAccept.disabled = false;
break;
case 8:
gDialog.inputValue.disabled = true;
gDialog.AdvancedEditDeck.setAttribute("selectedIndex", 1);
- gDialog.inputName.removeEventListener("input", onInput, false);
+ gDialog.inputName.removeEventListener("input", onInput);
break;
case 7:
gDialog.inputValueDeck.setAttribute("selectedIndex", 1);
break;
}
onInput();
}
--- a/im/content/blist.js
+++ b/im/content/blist.js
@@ -559,17 +559,17 @@ var buddyList = {
}
if (elt.hasAttribute("usingDefault"))
elt.setAttribute("value", elt.getAttribute("usingDefault"));
TextboxSpellChecker.unregisterTextbox(elt);
elt.removeAttribute("editing");
elt.setAttribute("role", "button");
elt.setAttribute("aria-haspopup", "true");
- elt.removeEventListener("blur", this.statusMessageBlur, false);
+ elt.removeEventListener("blur", this.statusMessageBlur);
if (!elt.getAttribute("focused"))
return;
// Force layout to remove input binding.
elt.getBoundingClientRect();
elt.focus();
},
openStatusTypePopup: function() {
@@ -775,17 +775,17 @@ var buddyList = {
// Apply the new display name only if it is different from the current one.
if (aSave && elt.value != elt.getAttribute("value"))
Services.core.globalUserStatus.displayName = elt.value;
else if (elt.hasAttribute("usingDefault"))
elt.setAttribute("value", elt.getAttribute("usingDefault"));
elt.removeAttribute("editing");
elt.setAttribute("role", "button");
- elt.removeEventListener("blur", this.displayNameBlur, false);
+ elt.removeEventListener("blur", this.displayNameBlur);
if (!elt.getAttribute("focused"))
return;
// Force layout to remove input binding.
elt.getBoundingClientRect();
elt.focus();
},
load: function bl_load() {
--- a/im/content/contact.xml
+++ b/im/content/contact.xml
@@ -334,17 +334,17 @@
<parameter name="aSave"/>
<body>
<![CDATA[
if (aSave) {
this.contact.alias =
document.getAnonymousElementByAttribute(this, "anonid", "displayname").value;
}
this.removeAttribute("aliasing");
- this.parentNode.removeEventListener("select", this._parentSelectListener, false);
+ this.parentNode.removeEventListener("select", this._parentSelectListener);
delete this._parentSelectListener;
this.parentNode.focus();
]]>
</body>
</method>
<method name="delete">
<body>
--- a/im/content/convZoom.js
+++ b/im/content/convZoom.js
@@ -17,17 +17,17 @@ var FullZoom = {
}
Services.prefs.addObserver(FullZoom.prefName, FullZoom, false);
FullZoom.applyPrefValue();
},
destroy: function FullZoom_destroy() {
Services.prefs.removeObserver(FullZoom.prefName, FullZoom);
- window.removeEventListener("DOMMouseScroll", FullZoom.handleMouseScrolled, false);
+ window.removeEventListener("DOMMouseScroll", FullZoom.handleMouseScrolled);
},
// Events Handlers / Observe
handleMouseScrolled: function FullZoom_handleMouseScrolled(event) {
if (!event.ctrlKey || event.altKey || event.shiftKey || !event.detail)
return;
if (event.detail < 0 )
--- a/im/content/conversation.xml
+++ b/im/content/conversation.xml
@@ -2147,17 +2147,17 @@
if (aSave) {
// apply the new topic only if it is different from the current one
if (elt.value != convBinding._conv.topic)
convBinding._conv.topic = elt.value;
}
this.editing = false;
elt.removeEventListener("keypress", this._topicKeyPress, true);
delete this._topicKeyPress;
- elt.removeEventListener("blur", this._topicBlur, false);
+ elt.removeEventListener("blur", this._topicBlur);
delete this._topicBlur;
if (!elt.getAttribute("focused"))
return;
// Shift focus back to the input box. Ideally we would keep the focus
// on the topic here, but the conv-top is currently not accessible
// via the keyboard, so doing that would leave us stranded.
convBinding.editor.focus();
]]>
--- a/im/content/group.xml
+++ b/im/content/group.xml
@@ -121,17 +121,17 @@
if (!contactElt.hasAttribute("selected") &&
!contactElt.hasAttribute("open"))
this.observe(contactElt.contact, "contact-display-name-changed");
else
remaining.push(contactElt);
}
this._pendingReorders = remaining;
if (remaining.length == 0) {
- this.parentNode.removeEventListener("select", this._selectListener, false);
+ this.parentNode.removeEventListener("select", this._selectListener);
this._selectListener = null;
}
}).bind(this);
this.parentNode.addEventListener("select", this._selectListener);
}
]]>
</body>
</method>
--- a/im/content/instantbird.js
+++ b/im/content/instantbird.js
@@ -19,18 +19,18 @@ var convWindow = {
window.arguments[0] instanceof XULElement) {
// swap the given tab with the default dummy conversation tab
// and then close the original tab in the other window.
let tab = window.arguments.shift();
getTabBrowser().importPanel(tab);
}
}
- window.addEventListener("mousemove", MousePosTracker, false);
- window.addEventListener("dragover", MousePosTracker, false);
+ window.addEventListener("mousemove", MousePosTracker);
+ window.addEventListener("dragover", MousePosTracker);
window.addEventListener("unload", convWindow.unload);
window.addEventListener("resize", convWindow.onresize);
window.addEventListener("activate", convWindow.onactivate, true);
window.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIWebNavigation)
.QueryInterface(Ci.nsIDocShellTreeItem).treeOwner
.QueryInterface(Ci.nsIInterfaceRequestor)
--- a/im/content/preferences/advanced.js
+++ b/im/content/preferences/advanced.js
@@ -28,20 +28,20 @@ var gAdvancedPane = {
var preference = document.getElementById("browser.preferences.advanced.selectedTabIndex");
if (preference.value !== null)
advancedPrefs.selectedIndex = preference.value;
}
this.updateConnectionGroupbox();
#ifdef MOZ_UPDATER
let onUnload = function () {
- window.removeEventListener("unload", onUnload, false);
+ window.removeEventListener("unload", onUnload);
Services.prefs.removeObserver("app.update.", this);
}.bind(this);
- window.addEventListener("unload", onUnload, false);
+ window.addEventListener("unload", onUnload);
Services.prefs.addObserver("app.update.", this, false);
this.updateReadPrefs();
#endif
let bundlePrefs = document.getElementById("bundlePreferences");
// Notify observers that the UI is now ready
Services.obs.notifyObservers(window, "advanced-pane-loaded", null);
--- a/im/content/tabbrowser.xml
+++ b/im/content/tabbrowser.xml
@@ -1515,21 +1515,21 @@
xbl:inherits="value=label,crop,mirror"
flex="1"
crop="end"/>
</xul:hbox>
</content>
<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>
<property name="label">
<setter><![CDATA[
if (!this.label) {
this.removeAttribute("mirror");
this.removeAttribute("sizelimit");
@@ -2099,24 +2099,24 @@
this._updateTabsVisibilityStatus();
]]></handler>
<handler event="popuphiding">
<![CDATA[
// clear out the menu popup and remove the listeners
while (this.hasChildNodes()) {
var menuItem = this.lastChild;
- menuItem.removeEventListener("command", this, false);
- menuItem.tab.removeEventListener("TabClose", this, false);
+ menuItem.removeEventListener("command", this);
+ menuItem.tab.removeEventListener("TabClose", this);
menuItem.tab.mCorrespondingMenuitem = null;
menuItem.remove();
}
var tabcontainer = document.getBindingParent(this);
- tabcontainer.mTabstrip.removeEventListener("scroll", this, false);
- tabcontainer.removeEventListener("TabOpen", this, false);
+ tabcontainer.mTabstrip.removeEventListener("scroll", this);
+ tabcontainer.removeEventListener("TabOpen", this);
window.XULBrowserWindow.setOverLink("", null);
]]></handler>
<handler event="DOMMenuItemActive">
<![CDATA[
if (!this._xulWindow || !this._xulWindow.XULBrowserWindow)
return;
@@ -2190,17 +2190,17 @@
let enableDblClick = function (event) {
if (event.detail == 1 && !clickedOnce) {
clickedOnce = true;
return;
}
setTimeout(function() {
tabbedBrowser._blockDblClick = false;
}, 0);
- tabbedBrowser.removeEventListener("click", enableDblClick, false);
+ tabbedBrowser.removeEventListener("click", enableDblClick);
};
tabbedBrowser.addEventListener("click", enableDblClick);
}
else // "tabs"
tabbedBrowser.removeCurrentTab();
}
]]></handler>
<handler event="dblclick" button="0" phase="capturing">
--- a/mail/base/content/folderDisplay.js
+++ b/mail/base/content/folderDisplay.js
@@ -169,17 +169,17 @@ function FolderDisplayWidget(aTabInfo, a
// Create a DOM node for the fake tree box below.
let domNode = document.createElementNS(
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", "vbox");
// We care about onselect events, so add a listener for that.
let self = this;
domNode.addEventListener("select", function () {
self.view.dbView.selectionChanged();
- }, false);
+ });
/**
* Create a fake tree box object for if/when this folder is in the background.
* We need to give it a DOM object to send events to, including the onselect
* event we care about and for which we added a handler above, and all the
* other events we don't care about.
*/
this._fakeTreeBox = new FakeTreeBoxObject(domNode);
--- a/mail/base/content/glodaFacetBindings.xml
+++ b/mail/base/content/glodaFacetBindings.xml
@@ -330,17 +330,17 @@
<body><![CDATA[
this.filterNode = document.getAnonymousElementByAttribute(
this, "anonid", "filter");
this.groupDisplayProperty = this.getAttribute("groupDisplayProperty");
let dis = this;
this.filterNode.addEventListener("change", function(event) {
return dis.filterChanged(event);
- }, false);
+ });
this.selectedValue = "all";
]]></body>
</method>
<method name="build">
<parameter name="aFirstTime" />
<body><![CDATA[
if (aFirstTime) {
--- a/mail/base/content/mailCore.js
+++ b/mail/base/content/mailCore.js
@@ -310,17 +310,17 @@ function onViewToolbarsPopupShowing(aEve
popup.insertBefore(menuItem, firstMenuItem);
let onMenuItemCommand = function(aEvent) {
let hidden = aEvent.originalTarget.getAttribute("checked") != "true";
toolbar.setAttribute(hidingAttribute, hidden);
document.persist(toolbar.id, hidingAttribute);
}
- menuItem.addEventListener("command", onMenuItemCommand, false);
+ menuItem.addEventListener("command", onMenuItemCommand);
}
}
}
}
function toJavaScriptConsole()
{
HUDService.openBrowserConsoleOrFocus();
--- a/mail/base/content/mailWidgets.xml
+++ b/mail/base/content/mailWidgets.xml
@@ -2371,30 +2371,30 @@
]]>
</destructor>
</implementation>
<handlers>
<handler event="mousemove" action="this.updateHover(event);"/>
<handler event="click" button="0" action="if (this.updateHover(event) >= 0) this.fire();"/>
<handler event="popupshowing">
<![CDATA[
- this.parentNode.addEventListener("blur", this.onBlurMenuList, false);
+ this.parentNode.addEventListener("blur", this.onBlurMenuList);
var box = this.tree.treeBoxObject;
box.focused = true;
var index = this.setInitialSelection();
var height = box.view.rowCount * box.rowHeight;
height += this.boxObject.height - box.treeBody.boxObject.height;
this.height = height;
if (index >= 0)
setTimeout(function() { box.ensureRowIsVisible(index); }, 0);
]]>
</handler>
<handler event="popuphiding">
<![CDATA[
- this.parentNode.removeEventListener("blur", this.onBlurMenuList, false);
+ this.parentNode.removeEventListener("blur", this.onBlurMenuList);
]]>
</handler>
</handlers>
</binding>
<binding id="folderSummary-popup" extends="chrome://global/content/bindings/popup.xml#tooltip">
<content>
<children>
@@ -2718,23 +2718,23 @@
xbl:inherits="disabled,_moz-menuactive=active"
oncommand="event.stopPropagation();">
<children includes="menupopup"/>
</xul:menu>
</content>
<implementation implements="nsIDOMEventListener">
<constructor><![CDATA[
- this._parentMenupopup.addEventListener("DOMMenuItemActive", this, false);
- this._parentMenupopup.addEventListener("popuphidden", this, false);
+ this._parentMenupopup.addEventListener("DOMMenuItemActive", this);
+ this._parentMenupopup.addEventListener("popuphidden", this);
]]></constructor>
<destructor><![CDATA[
- this._parentMenupopup.removeEventListener("DOMMenuItemActive", this, false);
- this._parentMenupopup.removeEventListener("popuphidden", this, false);
+ this._parentMenupopup.removeEventListener("DOMMenuItemActive", this);
+ this._parentMenupopup.removeEventListener("popuphidden", this);
]]></destructor>
<field name="menuitem" readonly="true">
document.getAnonymousElementByAttribute(this, "anonid", "menuitem");
</field>
<field name="menu" readonly="true">
document.getAnonymousElementByAttribute(this, "anonid", "menu");
</field>
--- a/mail/base/content/mailWindow.js
+++ b/mail/base/content/mailWindow.js
@@ -142,18 +142,18 @@ function onCopyOrDragStart(e) {
}
function CreateMailWindowGlobals()
{
// get the messenger instance
messenger = Components.classes["@mozilla.org/messenger;1"]
.createInstance(Components.interfaces.nsIMessenger);
- window.addEventListener("blur", appIdleManager.onBlur, false);
- window.addEventListener("focus", appIdleManager.onFocus, false);
+ window.addEventListener("blur", appIdleManager.onBlur);
+ window.addEventListener("focus", appIdleManager.onFocus);
//Create windows status feedback
// set the JS implementation of status feedback before creating the c++ one..
window.MsgStatusFeedback = new nsMsgStatusFeedback();
// double register the status feedback object as the xul browser window implementation
window.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
.getInterface(Components.interfaces.nsIWebNavigation)
.QueryInterface(Components.interfaces.nsIDocShellTreeItem).treeOwner
--- a/mail/base/content/msgHdrViewOverlay.js
+++ b/mail/base/content/msgHdrViewOverlay.js
@@ -2289,17 +2289,17 @@ function displayAttachmentsForExpandedVi
var lastPartID;
var unknownSize = false;
for (let attachment of currentAttachments) {
// Create a new attachment widget
var displayName = SanitizeAttachmentDisplayName(attachment);
var item = attachmentList.appendItem(attachment, displayName);
item.setAttribute("tooltiptext", attachment.name);
- item.addEventListener("command", attachmentItemCommand, false);
+ item.addEventListener("command", attachmentItemCommand);
// Check if this attachment's part ID is a child of the last attachment
// we counted. If so, skip it, since we already accounted for its size
// from its parent.
if (!lastPartID || attachment.partID.indexOf(lastPartID) != 0) {
lastPartID = attachment.partID;
if (attachment.size !== null)
totalSize += attachment.size;
--- a/mail/base/content/msgMail3PaneWindow.js
+++ b/mail/base/content/msgMail3PaneWindow.js
@@ -1654,17 +1654,17 @@ var TabsInTitlebar = {
Services.prefs.addObserver(this._drawInTitlePref, this, false);
Services.prefs.addObserver(this._autoHidePref, this, false);
this.allowedBy("sizemode", false);
window.addEventListener("resize", function (event) {
if (event.target != window)
return;
TabsInTitlebar.allowedBy("sizemode", true);
- }, false);
+ });
// Always disable on unsupported GTK versions.
if (AppConstants.MOZ_WIDGET_TOOLKIT == "gtk3") {
this.allowedBy("gtk", window.matchMedia("(-moz-gtk-csd-available)"));
}
// We need to update the appearance of the titlebar when the menu changes
// from the active to the inactive state. We can't, however, rely on
--- a/mail/base/content/multimessageview.js
+++ b/mail/base/content/multimessageview.js
@@ -241,17 +241,17 @@ MultiMessageSummary.prototype = {
itemHeaderNode.appendChild(authorNode);
let subjectNode = document.createElement("span");
subjectNode.classList.add("subject", "primary_header", "link");
subjectNode.textContent = message.mime2DecodedSubject ||
formatString("noSubject");
subjectNode.addEventListener("click", function() {
window.top.gFolderDisplay.selectMessages(thread);
- }, false);
+ });
itemHeaderNode.appendChild(subjectNode);
if (thread && thread.length > 1) {
let numUnreadStr = "";
if (numUnread)
numUnreadStr = formatString(
"numUnread", [numUnread.toLocaleString()], numUnread
);
@@ -270,17 +270,17 @@ MultiMessageSummary.prototype = {
dateNode.classList.add("date", "right");
dateNode.textContent = makeFriendlyDateAgo(new Date(message.date / 1000));
itemHeaderNode.appendChild(dateNode);
authorNode.classList.add("primary_header", "link");
authorNode.addEventListener("click", function() {
window.top.gFolderDisplay.selectMessage(message);
window.top.document.getElementById("messagepane").focus();
- }, false);
+ });
itemHeaderNode.appendChild(authorNode);
}
let tagNode = document.createElement("span");
tagNode.classList.add("tags");
this._addTagNodes(tags, tagNode);
itemHeaderNode.appendChild(tagNode);
--- a/mail/base/content/plugins.js
+++ b/mail/base/content/plugins.js
@@ -581,17 +581,17 @@ var gPluginHandler = {
// Use a weak reference, so we don't have to remove it...
Services.obs.addObserver(observer, "crash-report-status", true);
// ...alas, now we need something to hold a strong reference to prevent
// it from being GC. But I don't want to manually manage the reference's
// lifetime (which should be no greater than the page).
// Clever solution? Use a closue with an event listener on the document.
// When the doc goes away, so do the listener references and the closure.
- doc.addEventListener("mozCleverClosureHack", observer, false);
+ doc.addEventListener("mozCleverClosureHack", observer);
}
}
let crashText = this.getPluginUI(plugin, "crashedText");
crashText.textContent = messageString;
let browser = tabmail.getBrowserForSelectedTab();
let link = this.getPluginUI(plugin, "reloadLink");
@@ -673,14 +673,14 @@ var gPluginHandler = {
link.setAttribute("value", messengerBundle.getString("crashedpluginsMessage.learnMore"));
link.href = crashHelpUrl;
let description = notification.ownerDocument.getAnonymousElementByAttribute(notification, "anonid", "messageText");
description.appendChild(link);
// Remove the notfication when the page is reloaded.
doc.defaultView.top.addEventListener("unload", function() {
notificationBox.removeNotification(notification);
- }, false);
+ });
}
}
};
--- a/mail/base/content/quickFilterBar.js
+++ b/mail/base/content/quickFilterBar.js
@@ -30,17 +30,17 @@ var QuickFilterBarMuxer = {
this.tabmail.registerTabMonitor(this);
// -- window hookups
let dis = this;
// know when a resize happens so we can expand things collapsed by our
// overflow handler (registered by attribute in the XUL file).
window.addEventListener("resize", function QFBM_resizeWrap() {
dis.onWindowResize();
- }, false);
+ });
this._bindUI();
},
//////////////////////////////////////////////////////////////////////////////
// FolderDisplayListener
/**
@@ -207,17 +207,17 @@ var QuickFilterBarMuxer = {
let [postValue, update] =
latchedFilterDef.onCommand(preValue, domNode, aEvent, document);
QuickFilterBarMuxer.activeFilterer.setFilterValue(
latchedFilterDef.name, postValue, !update);
if (update)
QuickFilterBarMuxer.deferredUpdateSearch();
};
}
- domNode.addEventListener("command", handler, false);
+ domNode.addEventListener("command", handler);
if ("domBindExtra" in filterDef)
filterDef.domBindExtra(document, this, domNode);
}
},
/**
* Update the UI to reflect the state of the filterer constraints.
--- a/mail/base/content/safeMode.js
+++ b/mail/base/content/safeMode.js
@@ -57,16 +57,16 @@ function onOK() {
}
function onCancel() {
Services.startup.quit(Services.startup.eForceQuit);
}
function onLoad() {
document.getElementById("tasks")
- .addEventListener("CheckboxStateChange", updateOKButtonState, false);
+ .addEventListener("CheckboxStateChange", updateOKButtonState);
}
function updateOKButtonState() {
document.documentElement.getButton("accept").disabled =
!document.getElementById("resetToolbars").checked &&
!document.getElementById("disableAddons").checked;
}
--- a/mail/base/content/specialTabs.js
+++ b/mail/base/content/specialTabs.js
@@ -272,17 +272,17 @@ var contentTabBaseType = {
return -1;
},
closeTab: function onTabClosed(aTab) {
aTab.browser.removeEventListener("DOMTitleChanged",
aTab.titleListener, true);
aTab.browser.removeEventListener("DOMWindowClose",
aTab.closeListener, true);
- aTab.browser.removeEventListener("DOMLinkAdded", DOMLinkHandler, false);
+ aTab.browser.removeEventListener("DOMLinkAdded", DOMLinkHandler);
gPluginHandler.removeEventListeners(aTab.browser);
aTab.browser.webProgress.removeProgressListener(aTab.filter);
aTab.filter.removeProgressListener(aTab.progressListener);
aTab.browser.destroy();
},
saveTabState: function onSaveTabState(aTab) {
aTab.browser.setAttribute("type", "content");
@@ -556,17 +556,17 @@ var specialTabs = {
request.onerror = onDownloadError;
request.timeout = this.REQUEST_TIMEOUT;
request.ontimeout = onDownloadError;
request.send(null);
},
// This will open any special tabs if necessary on startup.
openSpecialTabsOnStartup: function() {
- window.addEventListener("unload", specialTabs.onunload, false);
+ window.addEventListener("unload", specialTabs.onunload);
let browser = document.getElementById("dummycontentbrowser");
// Manually hook up session and global history for the first browser
// so that we don't have to load global history before bringing up a
// window.
// Wire up session and global history before any possible
// progress notifications for back/forward button updating
@@ -690,17 +690,17 @@ var specialTabs = {
aArgs.clickHandler :
"specialTabs.defaultClickHandler(event);";
aTab.browser.setAttribute("onclick", aTab.clickHandler);
// Set this attribute so that when favicons fail to load, we remove the
// image attribute and just show the default tab icon.
aTab.tabNode.setAttribute("onerror", "this.removeAttribute('image');");
- aTab.browser.addEventListener("DOMLinkAdded", DOMLinkHandler, false);
+ aTab.browser.addEventListener("DOMLinkAdded", DOMLinkHandler);
gPluginHandler.addEventListeners(aTab.browser);
// Now initialise the find bar.
aTab.findbar = aTab.panel.querySelector("findbar");
aTab.findbar.setAttribute("browserid",
"contentTabBrowser" + this.lastBrowserId);
// Default to reload being disabled.
@@ -913,17 +913,17 @@ var specialTabs = {
link.className = "text-link telemetry-text-link";
link.setAttribute("value", telemetryBundle.get("telemetryLinkLabel"));
link.addEventListener('click', function() {
openPrivacyPolicy('tab');
// Remove the notification on which the user clicked
notification.parentNode.removeNotification(notification, true);
// Add a new notification to that tab, with no "Learn more" link
notifyBox.appendNotification(telemetryText, "telemetry", null, notifyBox.PRIORITY_INFO_LOW, buttons);
- }, false);
+ });
let description = notification.ownerDocument.getAnonymousElementByAttribute(notification, "anonid", "messageText");
description.appendChild(link);
},
/**
* Looks at the existing prefs and determines if we should show about:rights
* or not.
*
@@ -1137,17 +1137,17 @@ var specialTabs = {
"clickHandler" in aArgs && aArgs.clickHandler ?
aArgs.clickHandler :
"specialTabs.defaultClickHandler(event);");
// Set this attribute so that when favicons fail to load, we remove the
// image attribute and just show the default tab icon.
aTab.tabNode.setAttribute("onerror", "this.removeAttribute('image');");
- aTab.browser.addEventListener("DOMLinkAdded", DOMLinkHandler, false);
+ aTab.browser.addEventListener("DOMLinkAdded", DOMLinkHandler);
aTab.browser.setAttribute("id", "chromeTabBrowser" + this.lastBrowserId);
// Now set up the listeners.
this._setUpTitleListener(aTab);
this._setUpCloseWindowListener(aTab);
if ("onLoad" in aArgs) {
@@ -1172,17 +1172,17 @@ var specialTabs = {
&& !docShell.contentViewer.permitUnload());
},
closeTab: function onTabClosed(aTab) {
aTab.browser.removeEventListener("load", aTab.loadListener, true);
aTab.browser.removeEventListener("DOMTitleChanged",
aTab.titleListener, true);
aTab.browser.removeEventListener("DOMWindowClose",
aTab.closeListener, true);
- aTab.browser.removeEventListener("DOMLinkAdded", DOMLinkHandler, false);
+ aTab.browser.removeEventListener("DOMLinkAdded", DOMLinkHandler);
aTab.browser.destroy();
},
saveTabState: function onSaveTabState(aTab) {
},
showTab: function onShowTab(aTab) {
},
persistTab: function onPersistTab(aTab) {
if (aTab.browser.currentURI.spec == "about:blank")
@@ -1313,17 +1313,17 @@ var specialTabs = {
false);
Services.obs.addObserver(this.xpInstallObserver, "addon-install-failed",
false);
Services.obs.addObserver(this.xpInstallObserver, "addon-install-complete",
false);
},
onunload: function () {
- window.removeEventListener("unload", specialTabs.onunload, false);
+ window.removeEventListener("unload", specialTabs.onunload);
Services.obs.removeObserver(specialTabs.xpInstallObserver,
"addon-install-disabled");
Services.obs.removeObserver(specialTabs.xpInstallObserver,
"addon-install-blocked");
Services.obs.removeObserver(specialTabs.xpInstallObserver,
"addon-install-failed");
Services.obs.removeObserver(specialTabs.xpInstallObserver,
--- a/mail/base/content/tabmail.xml
+++ b/mail/base/content/tabmail.xml
@@ -1748,42 +1748,42 @@
this.mCollapseToolbar.collapsed = true;
this.firstChild.minWidth = this.mTabMinWidth;
this.firstChild.maxWidth = this.mTabMaxWidth;
this.adjustTabstrip();
Services.prefs.addObserver("mail.tabs.", this._prefObserver, false);
- window.addEventListener("resize", this, false);
+ window.addEventListener("resize", this);
// Listen to overflow/underflow events on the tabstrip,
// we cannot put these as xbl handlers on the entire binding because
// they would also get called for the all-tabs popup scrollbox.
// Also, we can't rely on event.target becuase these are all
// anonymous nodes.
- this.mTabstrip.addEventListener("overflow", this, false);
- this.mTabstrip.addEventListener("underflow", this, false);
+ this.mTabstrip.addEventListener("overflow", this);
+ this.mTabstrip.addEventListener("underflow", this);
]]>
</constructor>
<destructor>
<![CDATA[
Components.utils.import("resource://gre/modules/Services.jsm");
Services.prefs.removeObserver("mail.tabs.", this._prefObserver);
// Release timer to avoid reference cycles.
if (this._animateTimer) {
this._animateTimer.cancel();
this._animateTimer = null;
}
- this.mTabstrip.removeEventListener("overflow", this, false);
- this.mTabstrip.removeEventListener("underflow", this, false);
+ this.mTabstrip.removeEventListener("overflow", this);
+ this.mTabstrip.removeEventListener("underflow", this);
]]>
</destructor>
<field name="tabmail" readonly="true">
document.getElementById("tabmail");
</field>
<field name="tabbox" readonly="true">
@@ -2510,19 +2510,19 @@
menuItem.setAttribute("class", "menuitem-iconic alltabs-item menuitem-with-favicon");
this._setMenuitemAttributes(menuItem, aTab);
// Keep some attributes of the menuitem in sync with its
// corresponding tab (e.g. the tab label)
aTab.mCorrespondingMenuitem = menuItem;
- aTab.addEventListener("TabClose", this, false);
+ aTab.addEventListener("TabClose", this);
menuItem.tab = aTab;
- menuItem.addEventListener("command", this, false);
+ menuItem.addEventListener("command", this);
this.appendChild(menuItem);
return menuItem;
]]></body>
</method>
<method name="_setMenuitemAttributes">
<parameter name="aMenuitem"/>
@@ -2567,44 +2567,44 @@
// Listen for changes in the tab bar.
this._mutationObserver.observe(tabcontainer, {
attributes: true,
subtree: true,
attributeFilter: ["label", "crop", "busy", "image", "selected"]
});
- tabmail.addEventListener("TabOpen", this, false);
- tabcontainer.mTabstrip.addEventListener("scroll", this, false);
+ tabmail.addEventListener("TabOpen", this);
+ tabcontainer.mTabstrip.addEventListener("scroll", this);
// if an animation is in progress and the user
// clicks on the "all tabs" button, stop the animation
tabcontainer._stopAnimation();
for (var i = 0; i < tabs.length; i++) {
this._createTabMenuItem(tabs[i]);
}
this._updateTabsVisibilityStatus();
]]></handler>
<handler event="popuphiding">
<![CDATA[
// clear out the menu popup and remove the listeners
while (this.hasChildNodes()) {
var menuItem = this.lastChild;
- menuItem.removeEventListener("command", this, false);
- menuItem.tab.removeEventListener("TabClose", this, false);
+ menuItem.removeEventListener("command", this);
+ menuItem.tab.removeEventListener("TabClose", this);
menuItem.tab.mCorrespondingMenuitem = null;
menuItem.remove();
}
this._mutationObserver.disconnect();
var tabcontainer = document.getElementById('tabmail').tabContainer;
- tabcontainer.mTabstrip.removeEventListener("scroll", this, false);
- tabcontainer.tabmail.removeEventListener("TabOpen", this, false);
+ tabcontainer.mTabstrip.removeEventListener("scroll", this);
+ tabcontainer.tabmail.removeEventListener("TabOpen", this);
]]></handler>
</handlers>
</binding>
<!-- close-tab-button binding
This binding relies on the structure of the tabmail-tabs binding.
Therefore it should only be used as a child of the tab or the tabs
element. This binding is exposed as a pseudo-public-API so themes
can customize the tabbar appearance without having to be scriptable
--- a/mail/base/modules/quickFilterManager.js
+++ b/mail/base/modules/quickFilterManager.js
@@ -806,17 +806,17 @@ var TagFacetingFilter = {
domBindExtra: function(aDocument, aMuxer, aNode) {
// Tag filtering mode menu (All of/Any of)
function commandHandler(aEvent) {
let filterValue = aMuxer.getFilterValueForMutation(TagFacetingFilter.name);
filterValue.mode = aEvent.target.value;
aMuxer.updateSearch();
}
aDocument.getElementById("qfb-boolean-mode").addEventListener(
- "ValueChange", commandHandler, false);
+ "ValueChange", commandHandler);
},
reflectInDOM: function TFF_reflectInDOM(aNode, aFilterValue,
aDocument, aMuxer) {
aNode.checked = aFilterValue ? true : false;
if ((aFilterValue != null) &&
(typeof(aFilterValue) == "object"))
this._populateTagBar(aFilterValue, aDocument, aMuxer);
@@ -882,18 +882,18 @@ var TagFacetingFilter = {
addCount++;
// Keep in mind that the XBL does not get built for dynamically created
// elements such as these until they get displayed, which definitely
// means not before we append it into the tree.
let button = aDocument.createElement("toolbarbutton");
button.setAttribute("id", "qfb-tag-" + tag.key);
- button.addEventListener("command", commandHandler, false);
- button.addEventListener("click", rightClickHandler, false);
+ button.addEventListener("command", commandHandler);
+ button.addEventListener("click", rightClickHandler);
button.setAttribute("type", "checkbox");
if (keywordMap[tag.key] !== null) {
button.setAttribute("checked", "true");
if (!keywordMap[tag.key])
button.setAttribute("inverted", "true");
}
button.setAttribute("label", tag.tag);
button.setAttribute("value", tag.key);
@@ -1082,17 +1082,17 @@ var MessageTextFilter = {
// ...so explicitly select the current index.
threadPane.view.selection.select(threadPane.currentIndex);
return false;
}
// - Enter when upsell is actively proposed...
else if (aEvent.keyCode == aEvent.DOM_VK_RETURN) {
}
return true;
- }, false);
+ });
// -- Blurring kills upsell.
aNode.addEventListener("blur", function(aEvent) {
let panel = aDocument.getElementById("qfb-text-search-upsell");
if ((Services.focus.activeWindow != aDocument.defaultView ||
aDocument.commandDispatcher.focusedElement != aNode.inputField) &&
panel.state == "open") {
panel.hidePopup();
@@ -1105,17 +1105,17 @@ var MessageTextFilter = {
let filterDef = MessageTextFilter.textFilterDefsByDomId[aEvent.target.id];
state.states[filterDef.name] = aEvent.target.checked;
aMuxer.updateSearch();
}
for (let name in this.textFilterDefs) {
let textFilter = this.textFilterDefs[name];
aDocument.getElementById(textFilter.domId).addEventListener(
- "command", commandHandler, false);
+ "command", commandHandler);
}
},
onCommand: function(aState, aNode, aEvent, aDocument) {
let text = aNode.value.length ? aNode.value : null;
if (text == aState.text) {
let upsell = aDocument.getElementById("qfb-text-search-upsell");
if (upsell.state == "open") {
--- a/mail/components/cloudfile/content/addAccountDialog.js
+++ b/mail/components/cloudfile/content/addAccountDialog.js
@@ -73,17 +73,17 @@ var addAccountDialog = {
this.removeTitleMenuItem();
// Determine whether any account types were added to the menulist,
// if not, return early.
if (this.addAccountTypes() == 0)
return;
// Hook up our onInput event handler
- this._settings.addEventListener("DOMContentLoaded", this, false);
+ this._settings.addEventListener("DOMContentLoaded", this);
this._settings.addEventListener("overflow", this);
// Hook up the selection handler.
this._accountType.addEventListener("select", this);
// Also call it to run it for the default selection.
addAccountDialog.accountTypeSelected();
@@ -99,17 +99,17 @@ var addAccountDialog = {
// listener, so we'll call the function here manually.
this.onIFrameLoaded(null);
addAccountDialog.fitIFrame();
},
onUnInit: function() {
// Clean-up the event listeners.
- this._settings.removeEventListener("DOMContentLoaded", this, false);
+ this._settings.removeEventListener("DOMContentLoaded", this);
this._settings.removeEventListener("overflow", this);
this._accountType.removeEventListener("select", this);
return true;
},
handleEvent: function(aEvent) {
switch (aEvent.type) {
--- a/mail/components/compose/content/MsgComposeCommands.js
+++ b/mail/components/compose/content/MsgComposeCommands.js
@@ -2602,18 +2602,18 @@ function ComposeStartup(aParams)
// Observe dictionary removals.
dictionaryRemovalObserver.addObserver();
var identityList = document.getElementById("msgIdentity");
document.addEventListener("keypress", awDocumentKeyPress, true);
- document.addEventListener("paste", onPasteOrDrop, false);
- document.addEventListener("drop", onPasteOrDrop, false);
+ document.addEventListener("paste", onPasteOrDrop);
+ document.addEventListener("drop", onPasteOrDrop);
if (identityList)
FillIdentityList(identityList);
if (!params) {
// This code will go away soon as now arguments are passed to the window using a object of type nsMsgComposeParams instead of a string
params = Components.classes["@mozilla.org/messengercompose/composeparams;1"].createInstance(Components.interfaces.nsIMsgComposeParams);
@@ -4429,17 +4429,17 @@ function AddAttachments(aAttachments, aC
gAttachmentsSize += attachment.size;
try {
item.setAttribute("tooltiptext", decodeURI(attachment.url));
}
catch(e) {
item.setAttribute("tooltiptext", attachment.url);
}
- item.addEventListener("command", OpenSelectedAttachment, false);
+ item.addEventListener("command", OpenSelectedAttachment);
if (attachment.sendViaCloud) {
try {
let cloudProvider = cloudFileAccounts.getAccount(attachment.cloudProviderKey);
item.cloudProvider = cloudProvider;
item.image = cloudProvider.iconClass;
item.originalUrl = attachment.url;
} catch (ex) {dump(ex);}
--- a/mail/components/compose/content/bigFileObserver.js
+++ b/mail/components/compose/content/bigFileObserver.js
@@ -24,22 +24,22 @@ var gBigFileObserver = {
if (aPermanent)
Services.prefs.setBoolPref("mail.compose.big_attachments.notify", false);
else
this.sessionHidden = true;
},
init: function() {
let bucket = document.getElementById("attachmentBucket");
- bucket.addEventListener("attachments-added", this, false);
- bucket.addEventListener("attachments-removed", this, false);
- bucket.addEventListener("attachments-uploading", this, false);
- bucket.addEventListener("attachment-uploaded", this, false);
- bucket.addEventListener("attachment-upload-failed", this, false);
- bucket.addEventListener("attachments-converted", this, false);
+ bucket.addEventListener("attachments-added", this);
+ bucket.addEventListener("attachments-removed", this);
+ bucket.addEventListener("attachments-uploading", this);
+ bucket.addEventListener("attachment-uploaded", this);
+ bucket.addEventListener("attachment-upload-failed", this);
+ bucket.addEventListener("attachments-converted", this);
this.sessionHidden = false;
this.privacyWarned = false;
this.bigFiles = [];
},
handleEvent: function(event) {
if (this.hidden)
--- a/mail/components/compose/content/cloudAttachmentLinkManager.js
+++ b/mail/components/compose/content/cloudAttachmentLinkManager.js
@@ -2,19 +2,19 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
var gCloudAttachmentLinkManager = {
init: function() {
this.cloudAttachments = [];
let bucket = document.getElementById("attachmentBucket");
- bucket.addEventListener("attachment-uploaded", this, false);
- bucket.addEventListener("attachments-removed", this, false);
- bucket.addEventListener("attachments-converted", this, false);
+ bucket.addEventListener("attachment-uploaded", this);
+ bucket.addEventListener("attachments-removed", this);
+ bucket.addEventListener("attachments-converted", this);
// If we're restoring a draft that has some attachments,
// check to see if any of them are marked to be sent via
// cloud, and if so, add them to our list.
for (let i = 0; i < bucket.getRowCount(); ++i) {
let attachment = bucket.getItemAtIndex(i).attachment;
if (attachment && attachment.sendViaCloud)
this.cloudAttachments.push(attachment);
--- a/mail/components/im/content/imStatusSelector.js
+++ b/mail/components/im/content/imStatusSelector.js
@@ -170,17 +170,17 @@ var statusSelector = {
delete this._statusTypeBeforeEditing;
delete this._statusTypeEditing;
}
if (elt.hasAttribute("usingDefault"))
elt.setAttribute("value", elt.getAttribute("usingDefault"));
TextboxSpellChecker.unregisterTextbox(elt);
elt.removeAttribute("editing");
- elt.removeEventListener("blur", this.statusMessageBlur, false);
+ elt.removeEventListener("blur", this.statusMessageBlur);
// We need to put the focus back on the label after the textbox
// binding has been detached, otherwise the focus gets lost (it's
// on none of the elements in the document), but before that we
// need to flush the layout.
elt.getBoundingClientRect();
elt.focus();
},
@@ -250,18 +250,18 @@ var statusSelector = {
let elt = document.getElementById("displayName");
// Apply the new display name only if it is different from the current one.
if (aSave && elt.value != elt.getAttribute("value"))
Services.core.globalUserStatus.displayName = elt.value;
else if (elt.hasAttribute("usingDefault"))
elt.setAttribute("value", elt.getAttribute("usingDefault"));
elt.removeAttribute("editing");
- elt.removeEventListener("keypress", this.displayNameKeyPress, false);
- elt.removeEventListener("blur", this.displayNameBlur, false);
+ elt.removeEventListener("keypress", this.displayNameKeyPress);
+ elt.removeEventListener("blur", this.displayNameBlur);
},
init: function ss_load() {
let events = ["status-changed"];
statusSelector.displayCurrentStatus();
if (document.getElementById("displayName")) {
events.push("user-display-name-changed");
--- a/mail/components/im/content/imcontact.xml
+++ b/mail/components/im/content/imcontact.xml
@@ -143,18 +143,17 @@
// trigger a re-order (and a removeContact call), which sets
// this.parentNode to undefined.
let listbox = this.parentNode;
if (aSave) {
this.contact.alias = document.getAnonymousElementByAttribute(this, "anonid",
"displayname").value;
}
this.removeAttribute("aliasing");
- listbox.removeEventListener("select", this._parentSelectListener,
- false);
+ listbox.removeEventListener("select", this._parentSelectListener);
delete this._parentSelectListener;
listbox.focus();
]]>
</body>
</method>
<method name="deleteContact">
<body>
--- a/mail/components/im/content/imconversation.xml
+++ b/mail/components/im/content/imconversation.xml
@@ -1763,17 +1763,17 @@
if (aSave) {
// apply the new topic only if it is different from the current one
if (elt.value != elt.getAttribute("value"))
convBinding._conv.topic = elt.value;
}
this.removeAttribute("editing");
elt.removeEventListener("keypress", this._topicKeyPress, true);
delete this._topicKeyPress;
- elt.removeEventListener("blur", this._topicBlur, false);
+ elt.removeEventListener("blur", this._topicBlur);
delete this._topicBlur;
// After removing the "editing" attribute, the focus is on an element
// that can't receive keyboard events, so move it to somewhere else.
convBinding.editor.focus();
]]>
</body>
</method>
--- a/mail/components/preferences/preferencesTab.js
+++ b/mail/components/preferences/preferencesTab.js
@@ -65,17 +65,17 @@ var preferencesTabType = {
aTab.panel.appendChild(clone);
// Start setting up the browser.
aTab.browser = aTab.panel.querySelector("browser");
aTab.browser.setAttribute("id", "preferencesTabBrowser" + this.lastBrowserId);
- aTab.browser.addEventListener("DOMLinkAdded", DOMLinkHandler, false);
+ aTab.browser.addEventListener("DOMLinkAdded", DOMLinkHandler);
// Default to reload being disabled.
aTab.reloadEnabled = false;
aTab.url = aArgs.contentPage;
aTab.paneID = aArgs.paneID;
aTab.tabID = aArgs.tabID;
aTab.otherArgs = aArgs.otherArgs;
--- a/mail/extensions/mailviews/content/msgViewPickerOverlay.js
+++ b/mail/extensions/mailviews/content/msgViewPickerOverlay.js
@@ -75,18 +75,17 @@ function ViewChangeByMenuitem(aMenuitem)
* Mediates interaction with the #viewPickerPopup. In theory this should be
* an XBL binding, but for the insanity where the view picker may not be
* visible at all times (or ever). No view picker widget, no binding.
*/
var ViewPickerBinding = {
_init: function ViewPickerBinding_init() {
window.addEventListener(
"MailViewChanged",
- function(aEvent) { ViewPickerBinding.updateDisplay(aEvent); },
- false);
+ function(aEvent) { ViewPickerBinding.updateDisplay(aEvent); });
},
/**
* Return true if the view picker is visible. This is used by the
* FolderDisplayWidget to know whether or not to actually use mailviews. (The
* idea is that if we are not visible, then it would be confusing to the user
* if we filtered their mail since they would have no feedback about this and
* no way to change it.)
@@ -254,9 +253,9 @@ function RefreshTagsPopup(aMenupopup)
function ViewPickerOnLoad()
{
var viewPickerPopup = document.getElementById("viewPickerPopup");
if (viewPickerPopup)
RefreshAllViewPopups(viewPickerPopup, true);
}
-window.addEventListener("load", ViewPickerOnLoad, false);
+window.addEventListener("load", ViewPickerOnLoad);
--- a/mail/extensions/smime/content/msgHdrViewSMIMEOverlay.js
+++ b/mail/extensions/smime/content/msgHdrViewSMIMEOverlay.js
@@ -205,18 +205,18 @@ function onSMIMEBeforeShowHeaderPane() {
gExpandedHeaderView.sender.enclosingRow.collapsed = true;
delete gExpandedHeaderView.sender;
}
}
function msgHdrViewSMIMEOnLoad(event)
{
window.crypto.enableSmartCardEvents = true;
- document.addEventListener("smartcard-insert", onSmartCardChange, false);
- document.addEventListener("smartcard-remove", onSmartCardChange, false);
+ document.addEventListener("smartcard-insert", onSmartCardChange);
+ document.addEventListener("smartcard-remove", onSmartCardChange);
if (!gSMIMEBundle)
gSMIMEBundle = document.getElementById("bundle_read_smime");
// we want to register our security header sink as an opaque nsISupports
// on the msgHdrSink used by mail.....
msgWindow.msgHeaderSink.securityInfo = smimeHeaderSink;
gSignedUINode = document.getElementById('signedHdrIcon');
@@ -235,18 +235,18 @@ function msgHdrViewSMIMEOnLoad(event)
gEncryptedURIService =
Components.classes["@mozilla.org/messenger-smime/smime-encrypted-uris-service;1"]
.getService(Components.interfaces.nsIEncryptedSMIMEURIsService);
}
function msgHdrViewSMIMEOnUnload(event)
{
window.crypto.enableSmartCardEvents = false;
- document.removeEventListener("smartcard-insert", onSmartCardChange, false);
- document.removeEventListener("smartcard-remove", onSmartCardChange, false);
+ document.removeEventListener("smartcard-insert", onSmartCardChange);
+ document.removeEventListener("smartcard-remove", onSmartCardChange);
forgetEncryptedURI();
removeEventListener('messagepane-loaded', msgHdrViewSMIMEOnLoad, true);
removeEventListener('messagepane-unloaded', msgHdrViewSMIMEOnUnload, true);
removeEventListener('messagepane-hide', msgHdrViewSMIMEOnMessagePaneHide, true);
removeEventListener('messagepane-unhide', msgHdrViewSMIMEOnMessagePaneUnhide, true);
}
function msgHdrViewSMIMEOnMessagePaneHide()
--- a/mail/test/mozmill/attachment/test-attachment-events.js
+++ b/mail/test/mozmill/attachment/test-attachment-events.js
@@ -46,17 +46,17 @@ function test_attachments_added_on_singl
let lastEvent;
let listener = function(event) {
eventCount++;
lastEvent = event;
}
// Open up the compose window
let cw = open_compose_new_mail(mc);
- cw.e("attachmentBucket").addEventListener(kAttachmentsAdded, listener, false);
+ cw.e("attachmentBucket").addEventListener(kAttachmentsAdded, listener);
// Attach a single file
add_attachment(cw, "http://www.example.com/1", 0);
// Make sure we only saw the event once
assert_equals(1, eventCount);
// Make sure that we were passed the right subject
@@ -74,18 +74,17 @@ function test_attachments_added_on_singl
assert_equals("http://www.example.com/2",
subjects.queryElementAt(0, Ci.nsIMsgAttachment).url);
// And check that we don't receive the event if we try to attach a file
// that's already attached.
add_attachment(cw, "http://www.example.com/2");
assert_equals(2, eventCount);
- cw.e("attachmentBucket").removeEventListener(kAttachmentsAdded, listener,
- false);
+ cw.e("attachmentBucket").removeEventListener(kAttachmentsAdded, listener);
close_compose_window(cw);
}
/**
* Test that the attachments-added event is fired when we add a series
* of files all at once.
*/
function test_attachments_added_on_multiple() {
@@ -99,17 +98,17 @@ function test_attachments_added_on_multi
// Prepare the attachments - we store the names in attachmentNames to
// make sure that we observed the right event subjects later on.
let attachmentUrls = ["http://www.example.com/1",
"http://www.example.com/2"];
// Open the compose window and add the attachments
let cw = open_compose_new_mail(mc);
- cw.e("attachmentBucket").addEventListener(kAttachmentsAdded, listener, false);
+ cw.e("attachmentBucket").addEventListener(kAttachmentsAdded, listener);
add_attachments(cw, attachmentUrls);
// Make sure we only saw a single attachments-added for this group
// of files.
assert_equals(1, eventCount);
// Now make sure we got passed the right subjects for the event
@@ -126,17 +125,17 @@ function test_attachments_added_on_multi
attachmentUrls = ["http://www.example.com/1",
"http://www.example.com/2",
"http://www.example.com/3"];
// Open the compose window and attach the files, and ensure that we saw
// the attachments-added event
cw = open_compose_new_mail(mc);
- cw.e("attachmentBucket").addEventListener(kAttachmentsAdded, listener, false);
+ cw.e("attachmentBucket").addEventListener(kAttachmentsAdded, listener);
add_attachments(cw, attachmentUrls);
assert_equals(2, eventCount);
// Make sure that we got the right subjects back
subjects = lastEvent.detail;
assert_true(subjects instanceof Ci.nsIMutableArray);
assert_equals(3, subjects.length);
@@ -145,18 +144,17 @@ function test_attachments_added_on_multi
assert_true(attachmentUrls.includes(attachment.url));
}
// Make sure we don't fire the event again if we try to attach the same
// files.
add_attachments(cw, attachmentUrls);
assert_equals(2, eventCount);
- cw.e("attachmentBucket").removeEventListener(kAttachmentsAdded, listener,
- false);
+ cw.e("attachmentBucket").removeEventListener(kAttachmentsAdded, listener);
close_compose_window(cw);
}
/**
* Test that the attachments-removed event is fired when removing a
* single file.
*/
function test_attachments_removed_on_single() {
@@ -166,18 +164,17 @@ function test_attachments_removed_on_sin
let listener = function(event) {
eventCount++;
lastEvent = event;
}
// Open up the compose window, attach a file...
let cw = open_compose_new_mail(mc);
- cw.e("attachmentBucket").addEventListener(kAttachmentsRemoved, listener,
- false);
+ cw.e("attachmentBucket").addEventListener(kAttachmentsRemoved, listener);
add_attachment(cw, "http://www.example.com/1");
// Now select that attachment and delete it
let removedAttachmentItem = select_attachments(cw, 0);
// We need to hold a reference to removedAttachment here because
// the delete routine nulls it out from the attachmentitem.
let removedAttachment = removedAttachmentItem[0].attachment;
@@ -201,18 +198,17 @@ function test_attachments_removed_on_sin
assert_equals(2, eventCount);
subjects = lastEvent.detail;
assert_true(subjects instanceof Ci.nsIMutableArray);
assert_equals(1, subjects.length);
assert_equals(subjects.queryElementAt(0, Ci.nsIMsgAttachment).url,
"http://www.example.com/2");
- cw.e("attachmentBucket").removeEventListener(kAttachmentsRemoved, listener,
- false);
+ cw.e("attachmentBucket").removeEventListener(kAttachmentsRemoved, listener);
close_compose_window(cw);
}
/**
* Test that the attachments-removed event is fired when removing multiple
* files all at once.
*/
function test_attachments_removed_on_multiple() {
@@ -221,18 +217,17 @@ function test_attachments_removed_on_mul
let lastEvent;
let listener = function(event) {
eventCount++;
lastEvent = event;
}
// Open up the compose window and attach some files...
let cw = open_compose_new_mail(mc);
- cw.e("attachmentBucket").addEventListener(kAttachmentsRemoved, listener,
- false);
+ cw.e("attachmentBucket").addEventListener(kAttachmentsRemoved, listener);
add_attachments(cw, ["http://www.example.com/1",
"http://www.example.com/2",
"http://www.example.com/3"]);
// Select all three attachments, and remove them.
let removedAttachmentItems = select_attachments(cw, 0, 2);
@@ -258,18 +253,17 @@ function test_attachments_removed_on_mul
// Ok, let's attach and remove some again to ensure that we still see the event.
add_attachments(cw, ["http://www.example.com/1",
"http://www.example.com/2"]);
select_attachments(cw, 0, 1);
cw.window.goDoCommand("cmd_delete");
assert_equals(2, eventCount);
- cw.e("attachmentBucket").removeEventListener(kAttachmentsRemoved, listener,
- false);
+ cw.e("attachmentBucket").removeEventListener(kAttachmentsRemoved, listener);
close_compose_window(cw);
}
/**
* Test that we don't see the attachments-removed event if no attachments
* are selected when hitting "Delete"
*/
function test_no_attachments_removed_on_none() {
@@ -278,31 +272,29 @@ function test_no_attachments_removed_on_
let lastEvent;
let listener = function(event) {
eventCount++;
lastEvent = event;
}
// Open the compose window and add some attachments.
let cw = open_compose_new_mail(mc);
- cw.e("attachmentBucket").addEventListener(kAttachmentsRemoved, listener,
- false);
+ cw.e("attachmentBucket").addEventListener(kAttachmentsRemoved, listener);
add_attachments(cw, ["http://www.example.com/1",
"http://www.example.com/2",
"http://www.example.com/3"]);
// Choose no attachments
cw.e("attachmentBucket").clearSelection();
// Run the delete command
cw.window.goDoCommand("cmd_delete");
// Make sure we didn't see the attachments_removed event.
assert_equals(0, eventCount);
- cw.e("attachmentBucket").removeEventListener(kAttachmentsRemoved, listener,
- false);
+ cw.e("attachmentBucket").removeEventListener(kAttachmentsRemoved, listener);
close_compose_window(cw);
}
/**
* Test that we see the attachment-renamed event when an attachments
* name is changed.
*/
@@ -325,18 +317,17 @@ function test_attachment_renamed() {
gMockPromptService.register();
// The inoutValue is used to set the attachment name
gMockPromptService.inoutValue = kRenameTo1;
gMockPromptService.returnValue = true;
// Open up the compose window, attach some files, choose the first
// attachment, and choose to rename it.
let cw = open_compose_new_mail(mc);
- cw.e("attachmentBucket").addEventListener(kAttachmentRenamed, listener,
- false);
+ cw.e("attachmentBucket").addEventListener(kAttachmentRenamed, listener);
add_attachments(cw, ["http://www.example.com/1",
"http://www.example.com/2",
"http://www.example.com/3"]);
select_attachments(cw, 0);
cw.window.goDoCommand("cmd_renameAttachment");
@@ -381,18 +372,17 @@ function test_attachment_renamed() {
let renamedAttachment3 = lastEvent.target.attachment;
let originalName3 = lastEvent.detail;
assert_true(renamedAttachment3 instanceof Ci.nsIMsgAttachment);
assert_equals(kRenameTo3, renamedAttachment3.name);
assert_true(renamedAttachment3.url.includes("http://www.example.com/2"));
assert_equals("www.example.com/2", originalName3);
// Unregister the Mock Prompt service, and remove our observer.
- cw.e("attachmentBucket").addEventListener(kAttachmentRenamed, listener,
- false);
+ cw.e("attachmentBucket").addEventListener(kAttachmentRenamed, listener);
close_compose_window(cw);
gMockPromptService.unregister();
}
/**
* Test that the attachment-renamed event is not fired if we set the
* filename to be blank.
@@ -411,25 +401,23 @@ function test_no_attachment_renamed_on_b
gMockPromptService.reset();
gMockPromptService.register();
gMockPromptService.inoutValue = "";
gMockPromptService.returnValue = true;
// Open the compose window, attach some files, select one, and chooes to
// rename it.
let cw = open_compose_new_mail(mc);
- cw.e("attachmentBucket").addEventListener(kAttachmentRenamed, listener,
- false);
+ cw.e("attachmentBucket").addEventListener(kAttachmentRenamed, listener);
add_attachments(cw, ["http://www.example.com/1",
"http://www.example.com/2",
"http://www.example.com/3"]);
select_attachments(cw, 0);
cw.window.goDoCommand("cmd_renameAttachment");
// Ensure that we didn't see the attachment-renamed event.
assert_equals(0, eventCount);
- cw.e("attachmentBucket").removeEventListener(kAttachmentRenamed, listener,
- false);
+ cw.e("attachmentBucket").removeEventListener(kAttachmentRenamed, listener);
close_compose_window(cw);
gMockPromptService.unregister();
}
--- a/mail/test/mozmill/content-tabs/test-content-tab.js
+++ b/mail/test/mozmill/content-tabs/test-content-tab.js
@@ -147,17 +147,17 @@ function test_content_tab_default_favico
assert_content_tab_has_favicon(tab, url + "favicon.ico");
}
function test_content_tab_onbeforeunload() {
let count = mc.tabmail.tabContainer.childNodes.length;
let tab = mc.tabmail.tabInfo[count-1];
tab.browser.contentWindow.addEventListener("beforeunload", function (event) {
event.returnValue = "Green llama in your car";
- }, false);
+ });
const interactionPref = "dom.require_user_interaction_for_beforeunload";
Services.prefs.setBoolPref(interactionPref, false);
plan_for_modal_dialog("commonDialog", function (controller) {
controller.window.document.documentElement.getButton("accept").doCommand();
});
mc.tabmail.closeTab(tab);
--- a/mail/test/mozmill/content-tabs/test-install-xpi.js
+++ b/mail/test/mozmill/content-tabs/test-install-xpi.js
@@ -24,25 +24,25 @@ var gNewTab;
var gNotificationBox;
var ALERT_TIMEOUT = 50000;
var AlertWatcher = {
planForAlert: function(aController) {
this.alerted = false;
aController.window.document.addEventListener("AlertActive",
- this.alertActive, false);
+ this.alertActive);
},
waitForAlert: function(aController) {
if (!this.alerted) {
aController.waitFor(() => this.alerted, "Timeout waiting for alert",
ALERT_TIMEOUT, 100);
}
aController.window.document.removeEventListener("AlertActive",
- this.alertActive, false);
+ this.alertActive);
},
alerted: false,
alertActive: function() {
AlertWatcher.alerted = true;
}
};
var setupModule = function (module) {
--- a/mail/test/mozmill/shared-modules/test-content-tab-helpers.js
+++ b/mail/test/mozmill/shared-modules/test-content-tab-helpers.js
@@ -119,33 +119,33 @@ function MockExtProtConstructor() {
* install notifications.
*/
var ALERT_TIMEOUT = 10000;
var NotificationWatcher = {
planForNotification: function(aController) {
this.alerted = false;
aController.window.document.addEventListener("AlertActive",
- this.alertActive, false);
+ this.alertActive);
},
waitForNotification: function(aController) {
if (!this.alerted) {
aController.waitFor(() => this.alerted, "Timeout waiting for alert",
ALERT_TIMEOUT, 100);
}
// Double check the notification box has finished animating.
let notificationBox =
mc.tabmail.selectedTab.panel.querySelector("notificationbox");
if (notificationBox && notificationBox._animating)
aController.waitFor(() => !notificationBox._animating,
"Timeout waiting for notification box animation to finish",
ALERT_TIMEOUT, 100);
aController.window.document.removeEventListener("AlertActive",
- this.alertActive, false);
+ this.alertActive);
},
alerted: false,
alertActive: function() {
NotificationWatcher.alerted = true;
}
};
/**
--- a/mail/test/mozmill/shared-modules/test-window-helpers.js
+++ b/mail/test/mozmill/shared-modules/test-window-helpers.js
@@ -1716,22 +1716,22 @@ function augment_controller(aController,
doc.addEventListener("keypress", __peek_keypress_handler, true);
doc.addEventListener("focus", __peek_focus_handler, true);
doc.addEventListener("blur", __peek_focus_handler, true);
// - bubbling listeners
// (so we can see if the event got killed / eaten)
- doc.addEventListener("mousedown", __bubbled_click_handler, false);
- doc.addEventListener("click", __bubbled_click_handler, false);
- doc.addEventListener("contextmenu", __bubbled_click_handler, false);
- doc.addEventListener("mouseup", __bubbled_click_handler, false);
+ doc.addEventListener("mousedown", __bubbled_click_handler);
+ doc.addEventListener("click", __bubbled_click_handler);
+ doc.addEventListener("contextmenu", __bubbled_click_handler);
+ doc.addEventListener("mouseup", __bubbled_click_handler);
- doc.addEventListener("keypress", __bubbled_keypress_handler, false);
+ doc.addEventListener("keypress", __bubbled_keypress_handler);
// - also, add pop-up shown/hidden events....
// We need to add these directly to the popups themselves in order to
// see anything.
let popups = doc.documentElement.getElementsByTagName("menupopup");
for (let i = 0; i < popups.length; i++) {
let popup = popups[i];
popup.addEventListener("popupshowing", __popup_showing, true);
--- a/mailnews/base/content/newmailalert.js
+++ b/mailnews/base/content/newmailalert.js
@@ -128,20 +128,20 @@ function showAlert()
!Services.prefs.getBoolPref("toolkit.cosmeticAnimations.enabled")) {
alertContainer.setAttribute("noanimation", true);
setTimeout(closeAlert, gOpenTime);
return;
}
alertContainer.addEventListener("animationend", function hideAlert(event) {
if (event.animationName == "fade-in") {
- alertContainer.removeEventListener("animationend", hideAlert, false);
+ alertContainer.removeEventListener("animationend", hideAlert);
setTimeout(fadeOutAlert, gOpenTime);
}
- }, false);
+ });
alertContainer.setAttribute("fade-in", true);
}
function resizeAlert(aMoveOffScreen)
{
var alertTextBox = document.getElementById("alertTextBox");
var alertImageBox = document.getElementById("alertImageBox");
@@ -166,20 +166,20 @@ function resizeAlert(aMoveOffScreen)
window.moveTo(x, y);
}
function fadeOutAlert()
{
var alertContainer = document.getElementById("alertContainer");
alertContainer.addEventListener("animationend", function fadeOut(event) {
if (event.animationName == "fade-out") {
- alertContainer.removeEventListener("animationend", fadeOut, false);
+ alertContainer.removeEventListener("animationend", fadeOut);
closeAlert();
}
- }, false);
+ });
alertContainer.setAttribute("fade-out", true);
}
function closeAlert()
{
if (gAlertListener)
gAlertListener.observe(null, "alertfinished", "");
window.close();
--- a/mailnews/base/prefs/content/am-archiveoptions.js
+++ b/mailnews/base/prefs/content/am-archiveoptions.js
@@ -10,21 +10,21 @@ var gIdentity = null;
* appropriate values, and update the archive hierarchy example.
*/
function onLoadArchiveOptions() {
// extract the account
gIdentity = window.arguments[0];
let granularity = document.getElementById("archiveGranularity");
granularity.selectedIndex = gIdentity.archiveGranularity;
- granularity.addEventListener("command", updateArchiveExample, false);
+ granularity.addEventListener("command", updateArchiveExample);
let kfs = document.getElementById("archiveKeepFolderStructure");
kfs.checked = gIdentity.archiveKeepFolderStructure;
- kfs.addEventListener("command", updateArchiveExample, false);
+ kfs.addEventListener("command", updateArchiveExample);
updateArchiveExample();
}
/**
* Save the archive settings to the current identity.
*/
function onAcceptArchiveOptions() {
--- a/mailnews/extensions/smime/content/msgHdrViewSMIMEOverlay.js
+++ b/mailnews/extensions/smime/content/msgHdrViewSMIMEOverlay.js
@@ -168,18 +168,18 @@ function onSmartCardChange()
// only reload encrypted windows
if (gMyLastEncryptedURI && gEncryptionStatus != -1)
ReloadMessage();
}
function msgHdrViewSMIMEOnLoad(event)
{
window.crypto.enableSmartCardEvents = true;
- document.addEventListener("smartcard-insert", onSmartCardChange, false);
- document.addEventListener("smartcard-remove", onSmartCardChange, false);
+ document.addEventListener("smartcard-insert", onSmartCardChange);
+ document.addEventListener("smartcard-remove", onSmartCardChange);
if (!gSMIMEBundle)
gSMIMEBundle = document.getElementById("bundle_read_smime");
// we want to register our security header sink as an opaque nsISupports
// on the msgHdrSink used by mail.....
msgWindow.msgHeaderSink.securityInfo = smimeHeaderSink;
gSignedUINode = document.getElementById('signedHdrIcon');
@@ -199,18 +199,18 @@ function msgHdrViewSMIMEOnLoad(event)
gEncryptedURIService =
Components.classes["@mozilla.org/messenger-smime/smime-encrypted-uris-service;1"]
.getService(Components.interfaces.nsIEncryptedSMIMEURIsService);
}
function msgHdrViewSMIMEOnUnload(event)
{
window.crypto.enableSmartCardEvents = false;
- document.removeEventListener("smartcard-insert", onSmartCardChange, false);
- document.removeEventListener("smartcard-remove", onSmartCardChange, false);
+ document.removeEventListener("smartcard-insert", onSmartCardChange);
+ document.removeEventListener("smartcard-remove", onSmartCardChange);
forgetEncryptedURI();
removeEventListener("messagepane-loaded", msgHdrViewSMIMEOnLoad, true);
removeEventListener("messagepane-unloaded", msgHdrViewSMIMEOnUnload, true);
removeEventListener("messagepane-hide", msgHdrViewSMIMEOnMessagePaneHide, true);
removeEventListener("messagepane-unhide", msgHdrViewSMIMEOnMessagePaneUnhide, true);
}
function msgHdrViewSMIMEOnMessagePaneHide()
--- a/suite/browser/linkToolbarOverlay.js
+++ b/suite/browser/linkToolbarOverlay.js
@@ -184,27 +184,25 @@ LinkToolbarUI.prototype.initialized = fa
LinkToolbarUI.prototype.initHandlers =
function()
{
var contentArea = document.getElementById("appcontent");
if (linkToolbarUI.isLinkToolbarEnabled())
{
if (!linkToolbarUI.addHandlerActive) {
- contentArea.addEventListener("select", linkToolbarUI.tabSelected,
- false);
+ contentArea.addEventListener("select", linkToolbarUI.tabSelected);
contentArea.addEventListener("DOMLinkAdded", linkToolbarUI.linkAdded,
true);
linkToolbarUI.addHandlerActive = true;
}
} else
{
if (linkToolbarUI.addHandlerActive) {
- contentArea.removeEventListener("select", linkToolbarUI.tabSelected,
- false);
+ contentArea.removeEventListener("select", linkToolbarUI.tabSelected);
contentArea.removeEventListener("DOMLinkAdded", linkToolbarUI.linkAdded,
true);
linkToolbarUI.addHandlerActive = false;
}
}
if (!linkToolbarUI.initialized)
{
linkToolbarUI.initialized = true;
--- a/suite/browser/mailNavigatorOverlay.js
+++ b/suite/browser/mailNavigatorOverlay.js
@@ -151,17 +151,17 @@ function initMailContextMenuItems(aEvent
gContextMenu.showItem("context-sep-apps", gContextMenu.shouldShowSeparator("context-sep-apps"));
}
function initMailContextMenuPopupListener(aEvent)
{
var popup = document.getElementById("contentAreaContextMenu");
if (popup)
- popup.addEventListener("popupshowing", initMailContextMenuItems, false);
+ popup.addEventListener("popupshowing", initMailContextMenuItems);
}
function hideMenuitems() {
document.getElementById("menu_newCard").hidden = gUseExternalMailto;
var menu_sendPage = document.getElementById("menu_sendPage");
if (menu_sendPage)
menu_sendPage.hidden = gUseExternalMailto;
}
--- a/suite/browser/navigator.js
+++ b/suite/browser/navigator.js
@@ -161,25 +161,25 @@ const gFormSubmitObserver = {
// error message.
if (gFormSubmitObserver.panel.firstChild.textContent !=
e.originalTarget.validationMessage) {
gFormSubmitObserver.panel.firstChild.textContent =
e.originalTarget.validationMessage;
}
}
}
- element.addEventListener("input", inputHandler, false);
- element.addEventListener("blur", blurHandler, false);
+ element.addEventListener("input", inputHandler);
+ element.addEventListener("blur", blurHandler);
// One event to bring them all and in the darkness bind them.
this.panel.addEventListener("popuphiding", function popupHidingHandler(aEvent) {
- aEvent.target.removeEventListener("popuphiding", popupHidingHandler, false);
- element.removeEventListener("input", inputHandler, false);
- element.removeEventListener("blur", blurHandler, false);
- }, false);
+ aEvent.target.removeEventListener("popuphiding", popupHidingHandler);
+ element.removeEventListener("input", inputHandler);
+ element.removeEventListener("blur", blurHandler);
+ });
this.panel.hidden = false;
var win = element.ownerDocument.defaultView;
var style = win.getComputedStyle(element, null);
var scale = win.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
.getInterface(Components.interfaces.nsIDOMWindowUtils)
.fullZoom;
@@ -593,17 +593,17 @@ function Startup()
// Make sure we're safe at the left/top edge of screen
document.documentElement.setAttribute("screenX", screen.availLeft);
document.documentElement.setAttribute("screenY", screen.availTop);
}
// hook up UI through progress listener
getBrowser().addProgressListener(window.XULBrowserWindow);
// setup the search service DOMLinkAdded listener
- getBrowser().addEventListener("DOMLinkAdded", BrowserSearch, false);
+ getBrowser().addEventListener("DOMLinkAdded", BrowserSearch);
// hook up drag'n'drop
getBrowser().droppedLinkHandler = handleDroppedLink;
var uriToLoad = "";
// Check window.arguments[0]. If not null then use it for uriArray
// otherwise the new window is being called when another browser
// window already exists so use the New Window pref for uriArray
@@ -752,17 +752,17 @@ function Startup()
// initialize the sync UI
gSyncUI.init();
// initialize the session-restore service
setTimeout(InitSessionStoreCallback, 0);
}
- window.addEventListener("MozAfterPaint", DelayedStartup, false);
+ window.addEventListener("MozAfterPaint", DelayedStartup);
}
// Minimal gBrowserInit shim to keep the Addon-SDK happy.
var gBrowserInit = {
delayedStartupFinished: false,
}
function DelayedStartup() {
@@ -869,17 +869,17 @@ function Shutdown()
{
AeroPeek.onCloseWindow(window);
PlacesStarButton.uninit();
// shut down browser access support
window.browserDOMWindow = null;
- getBrowser().removeEventListener("DOMLinkAdded", BrowserSearch, false);
+ getBrowser().removeEventListener("DOMLinkAdded", BrowserSearch);
try {
getBrowser().removeProgressListener(window.XULBrowserWindow);
} catch (ex) {
// Perhaps we didn't get around to adding the progress listener
}
window.XULBrowserWindow.destroy();
@@ -1267,17 +1267,17 @@ var BrowserSearch = {
function webSearchCallback() {
// This needs to be in a timeout so that we don't end up refocused
// in the url bar
setTimeout(BrowserSearch.webSearch, 0);
}
win = window.openDialog(getBrowserURL(), "_blank",
"chrome,all,dialog=no", "about:blank");
- win.addEventListener("load", webSearchCallback, false);
+ win.addEventListener("load", webSearchCallback);
return;
}
if (isElementVisible(this.searchBar)) {
this.searchBar.select();
this.searchBar.focus();
} else if (this.searchSidebar) {
this.searchSidebar.focus();
@@ -2413,31 +2413,31 @@ function SetPageProxyState(aState, aURI)
gProxyFavIcon = document.getElementById("page-proxy-favicon");
if (!gProxyDeck)
gProxyDeck = document.getElementById("page-proxy-deck");
gProxyButton.setAttribute("pageproxystate", aState);
if (aState == "valid") {
gLastValidURLStr = gURLBar.value;
- gURLBar.addEventListener("input", UpdatePageProxyState, false);
+ gURLBar.addEventListener("input", UpdatePageProxyState);
if (gBrowser.shouldLoadFavIcon(aURI)) {
var favStr = gBrowser.buildFavIconString(aURI);
if (favStr != gProxyFavIcon.src) {
gBrowser.loadFavIcon(aURI, "src", gProxyFavIcon);
gProxyDeck.selectedIndex = 0;
}
else gProxyDeck.selectedIndex = 1;
}
else {
gProxyDeck.selectedIndex = 0;
gProxyFavIcon.removeAttribute("src");
}
} else if (aState == "invalid") {
- gURLBar.removeEventListener("input", UpdatePageProxyState, false);
+ gURLBar.removeEventListener("input", UpdatePageProxyState);
gProxyDeck.selectedIndex = 0;
gProxyFavIcon.removeAttribute("src");
}
}
function handlePageProxyClick(aEvent)
{
switch (aEvent.button) {
@@ -2861,29 +2861,29 @@ var LightWeightThemeWebInstaller = {
var data = this._getThemeFromNode(event.target);
if (!data)
return;
this._resetPreview();
this._previewWindow = event.target.ownerDocument.defaultView;
this._previewWindow.addEventListener("pagehide", this, true);
- gBrowser.tabContainer.addEventListener("TabSelect", this, false);
+ gBrowser.tabContainer.addEventListener("TabSelect", this);
this._manager.previewTheme(data);
},
_resetPreview: function (event) {
if (!this._previewWindow ||
event && !this._isAllowed(event.target))
return;
this._previewWindow.removeEventListener("pagehide", this, true);
this._previewWindow = null;
- gBrowser.tabContainer.removeEventListener("TabSelect", this, false);
+ gBrowser.tabContainer.removeEventListener("TabSelect", this);
this._manager.resetPreview();
},
_isAllowed: function (node) {
var uri = node.ownerDocument.documentURIObject;
return Services.perms.testPermission(uri, "install") == Services.perms.ALLOW_ACTION;
},
--- a/suite/browser/safeBrowsingOverlay.js
+++ b/suite/browser/safeBrowsingOverlay.js
@@ -48,13 +48,13 @@ var gSafeBrowsing = {
*/
getReportURL: function getReportURL(aName) {
var pageUri = getBrowser().currentURI.cloneIgnoringRef();
return SafeBrowsing.getReportURL(aName, pageUri);
},
initOverlay: function initOverlay(aEvent) {
var popup = document.getElementById("helpPopup");
- popup.addEventListener("popupshowing", gSafeBrowsing.initMenuItems, false);
+ popup.addEventListener("popupshowing", gSafeBrowsing.initMenuItems);
}
}
-window.addEventListener("load", gSafeBrowsing.initOverlay, false);
+window.addEventListener("load", gSafeBrowsing.initOverlay);
--- a/suite/browser/tabbrowser.xml
+++ b/suite/browser/tabbrowser.xml
@@ -3067,17 +3067,17 @@
</getter>
</property>
<field name="_lastSearchString">null</field>
<field name="_lastSearchHighlight">false</field>
<constructor>
<![CDATA[
- document.addEventListener("keypress", this._keyEventHandler, false);
+ document.addEventListener("keypress", this._keyEventHandler);
this.arrowKeysShouldWrap = /Mac/.test(navigator.platform);
// Bail out early if we are in tabmail. See Bug 521803.
if (!this.mPanelContainer)
return;
this.mCurrentBrowser = this.mPanelContainer.firstChild.firstChild;
this.mCurrentTab = this.tabContainer.firstChild;
@@ -3133,17 +3133,17 @@
var onclick = this.getAttribute("oncontentclick");
if (onclick)
this.onContentClick = new Function("event", onclick);
]]>
</constructor>
<destructor>
<![CDATA[
- document.removeEventListener("keypress", this._keyEventHandler, false);
+ document.removeEventListener("keypress", this._keyEventHandler);
// Bail out early if we are in tabmail. See Bug 521803.
if (!this.mPanelContainer)
return;
for (var i = 0; i < this.mTabListeners.length; ++i) {
this.browsers[i].webProgress.removeProgressListener(this.mTabFilters[i]);
this.mTabFilters[i].removeProgressListener(this.mTabListeners[i]);
this.mTabFilters[i] = null;
@@ -3327,23 +3327,23 @@
<implementation implements="nsIDOMEventListener">
<constructor>
<![CDATA[
var tab = this.firstChild;
// set the tabstrip's minWidth too, otherwise it immediately overflows
this.mTabstrip.style.minWidth =
tab.style.minWidth = this.mPrefs.getIntPref("browser.tabs.tabMinWidth") + "px";
tab.style.maxWidth = this.mPrefs.getIntPref("browser.tabs.tabMaxWidth") + "px";
- window.addEventListener("resize", this, false);
+ window.addEventListener("resize", this);
]]>
</constructor>
<destructor>
<![CDATA[
- window.removeEventListener("resize", this, false);
+ window.removeEventListener("resize", this);
]]>
</destructor>
<field name="mPrefs" readonly="true">
Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefBranch);
</field>
@@ -3560,17 +3560,17 @@
// Keep some attributes of the menuitem in sync with its
// corresponding tab (e.g. the tab label)
aTabNode.mCorrespondingMenuitem = menuItem;
document.addBroadcastListenerFor(aTabNode, menuItem, "label");
document.addBroadcastListenerFor(aTabNode, menuItem, "crop");
document.addBroadcastListenerFor(aTabNode, menuItem, "image");
document.addBroadcastListenerFor(aTabNode, menuItem, "busy");
document.addBroadcastListenerFor(aTabNode, menuItem, "selected");
- aTabNode.addEventListener("TabClose", this, false);
+ aTabNode.addEventListener("TabClose", this);
menuItem.tab = aTabNode;
this.appendChild(menuItem);
return menuItem;
]]>
</body>
</method>
</implementation>
@@ -3578,18 +3578,18 @@
<handler event="popupshowing">
<![CDATA[
// set up the menu popup
let tabcontainer = document.getBindingParent(this);
let tabs = tabcontainer.childNodes;
// Listen for changes in the tab bar.
let tabbrowser = document.getBindingParent(tabcontainer);
- tabbrowser.addEventListener("TabOpen", this, false);
- tabcontainer.mTabstrip.addEventListener("scroll", this, false);
+ tabbrowser.addEventListener("TabOpen", this);
+ tabcontainer.mTabstrip.addEventListener("scroll", this);
for (let i = 0; i < tabs.length; i++)
this._createTabMenuItem(tabs[i]);
this._updateTabsVisibilityStatus();
]]>
</handler>
<handler event="popuphiding">
@@ -3598,24 +3598,24 @@
while (this.hasChildNodes())
{
let menuItem = this.lastChild;
document.removeBroadcastListenerFor(menuItem.tab, menuItem, "label");
document.removeBroadcastListenerFor(menuItem.tab, menuItem, "crop");
document.removeBroadcastListenerFor(menuItem.tab, menuItem, "image");
document.removeBroadcastListenerFor(menuItem.tab, menuItem, "busy");
document.removeBroadcastListenerFor(menuItem.tab, menuItem, "selected");
- menuItem.tab.removeEventListener("TabClose", this, false);
+ menuItem.tab.removeEventListener("TabClose", this);
menuItem.tab.mCorrespondingMenuitem = null;
menuItem.tab = null;
menuItem.remove();
}
let tabcontainer = document.getBindingParent(this);
- tabcontainer.mTabstrip.removeEventListener("scroll", this, false);
- document.getBindingParent(tabcontainer).removeEventListener("TabOpen", this, false);
+ tabcontainer.mTabstrip.removeEventListener("scroll", this);
+ document.getBindingParent(tabcontainer).removeEventListener("TabOpen", this);
]]>
</handler>
<handler event="command">
<![CDATA[
let tabcontainer = document.getBindingParent(this);
let tab = event.target.tab;
if (tabcontainer.selectedItem == tab)
--- a/suite/browser/test/browser/browser_bug435325.js
+++ b/suite/browser/test/browser/browser_bug435325.js
@@ -4,17 +4,17 @@
/* Ensure that clicking the button in the Offline mode neterror page makes the browser go online. See bug 435325. */
var proxyPrefValue;
function test() {
waitForExplicitFinish();
gBrowser.selectedTab = gBrowser.addTab();
- window.addEventListener("DOMContentLoaded", checkPage, false);
+ window.addEventListener("DOMContentLoaded", checkPage);
// Tests always connect to localhost, and per bug 87717, localhost is now
// reachable in offline mode. To avoid this, disable any proxy.
proxyPrefValue = Services.prefs.getIntPref("network.proxy.type");
Services.prefs.setIntPref("network.proxy.type", 0);
// Go offline and disable the proxy and cache, then try to load the test URL.
@@ -25,17 +25,17 @@ function test() {
}
function checkPage() {
if(content.location == "about:blank") {
info("got about:blank, which is expected once, so return");
return;
}
- window.removeEventListener("DOMContentLoaded", checkPage, false);
+ window.removeEventListener("DOMContentLoaded", checkPage);
ok(Services.io.offline, "Setting Services.io.offline to true.");
is(gBrowser.contentDocument.documentURI.substring(0,27),
"about:neterror?e=netOffline", "Loading the Offline mode neterror page.");
// Now press the "Try Again" button
ok(gBrowser.contentDocument.getElementById("errorTryAgain"),
"The error page has got a #errorTryAgain element");
--- a/suite/browser/test/browser/browser_bug561636.js
+++ b/suite/browser/test/browser/browser_bug561636.js
@@ -69,29 +69,29 @@ function test1() {
* the invalid element is focused and a popup appears.
*/
function test2()
{
let uri = "data:text/html,<iframe name='t'></iframe><form target='t' action='data:text/html,'><input required id='i'><input id='s' type='submit'></form>";
let tab = gBrowser.addTab();
gInvalidFormPopup.addEventListener("popupshown", function test2gIpopupShown() {
- gInvalidFormPopup.removeEventListener("popupshown", test2gIpopupShown, false);
+ gInvalidFormPopup.removeEventListener("popupshown", test2gIpopupShown);
let doc = gBrowser.contentDocument;
is(doc.activeElement, doc.getElementById('i'),
"First invalid element should be focused");
checkPopupShow();
checkPopupMessage(doc);
// Clean-up and next test.
gBrowser.removeTab(gBrowser.selectedTab);
executeSoon(test3);
- }, false);
+ });
tab.linkedBrowser.addEventListener("load", function test2TabLBLoad(aEvent) {
tab.linkedBrowser.removeEventListener("load", test2TabLBLoad, true);
gBrowser.contentDocument.getElementById('s').click();
}, true);
gBrowser.selectedTab = tab;
@@ -103,29 +103,29 @@ function test2()
* the first invalid element is focused and a popup appears.
*/
function test3()
{
let uri = "data:text/html,<iframe name='t'></iframe><form target='t' action='data:text/html,'><input><input id='i' required><input required><input id='s' type='submit'></form>";
let tab = gBrowser.addTab();
gInvalidFormPopup.addEventListener("popupshown", function test3gIPopupShown() {
- gInvalidFormPopup.removeEventListener("popupshown", test3gIPopupShown, false);
+ gInvalidFormPopup.removeEventListener("popupshown", test3gIPopupShown);
let doc = gBrowser.contentDocument;
is(doc.activeElement, doc.getElementById('i'),
"First invalid element should be focused");
checkPopupShow();
checkPopupMessage(doc);
// Clean-up and next test.
gBrowser.removeTab(gBrowser.selectedTab);
executeSoon(test4a);
- }, false);
+ });
tab.linkedBrowser.addEventListener("load", function test3TabLBLoad(aEvent) {
tab.linkedBrowser.removeEventListener("load", test3TabLBLoad, true);
gBrowser.contentDocument.getElementById('s').click();
}, true);
gBrowser.selectedTab = tab;
@@ -137,17 +137,17 @@ function test3()
* invalid element if the element becomes valid.
*/
function test4a()
{
let uri = "data:text/html,<iframe name='t'></iframe><form target='t' action='data:text/html,'><input id='i' required><input id='s' type='submit'></form>";
let tab = gBrowser.addTab();
gInvalidFormPopup.addEventListener("popupshown", function test4agIPopupShown() {
- gInvalidFormPopup.removeEventListener("popupshown", test4agIPopupShown, false);
+ gInvalidFormPopup.removeEventListener("popupshown", test4agIPopupShown);
let doc = gBrowser.contentDocument;
is(doc.activeElement, doc.getElementById('i'),
"First invalid element should be focused");
checkPopupShow();
checkPopupMessage(doc);
@@ -155,17 +155,17 @@ function test4a()
executeSoon(function () {
checkPopupHide();
// Clean-up and next test.
gBrowser.removeTab(gBrowser.selectedTab);
executeSoon(test4b);
});
- }, false);
+ });
tab.linkedBrowser.addEventListener("load", function test4aTabLBLoad(aEvent) {
tab.linkedBrowser.removeEventListener("load", test4aTabLBLoad, true);
gBrowser.contentDocument.getElementById('s').click();
}, true);
gBrowser.selectedTab = tab;
@@ -177,17 +177,17 @@ function test4a()
* invalid element if the element is still invalid.
*/
function test4b()
{
let uri = "data:text/html,<iframe name='t'></iframe><form target='t' action='data:text/html,'><input type='email' id='i' required><input id='s' type='submit'></form>";
let tab = gBrowser.addTab();
gInvalidFormPopup.addEventListener("popupshown", function test4bgIpopupShown() {
- gInvalidFormPopup.removeEventListener("popupshown", test4bgIpopupShown, false);
+ gInvalidFormPopup.removeEventListener("popupshown", test4bgIpopupShown);
let doc = gBrowser.contentDocument;
is(doc.activeElement, doc.getElementById('i'),
"First invalid element should be focused");
checkPopupShow();
checkPopupMessage(doc);
@@ -195,17 +195,17 @@ function test4b()
executeSoon(function () {
checkPopupShow();
// Clean-up and next test.
gBrowser.removeTab(gBrowser.selectedTab);
executeSoon(test5);
});
- }, false);
+ });
tab.linkedBrowser.addEventListener("load", function test4bTabLBLoad(aEvent) {
tab.linkedBrowser.removeEventListener("load", test4bTabLBLoad, true);
gBrowser.contentDocument.getElementById('s').click();
}, true);
gBrowser.selectedTab = tab;
@@ -217,17 +217,17 @@ function test4b()
* element.
*/
function test5()
{
let uri = "data:text/html,<iframe name='t'></iframe><form target='t' action='data:text/html,'><input id='i' required><input id='s' type='submit'></form>";
let tab = gBrowser.addTab();
gInvalidFormPopup.addEventListener("popupshown", function test5gIpopupShown() {
- gInvalidFormPopup.removeEventListener("popupshown", test5gIpopupShown, false);
+ gInvalidFormPopup.removeEventListener("popupshown", test5gIpopupShown);
let doc = gBrowser.contentDocument;
is(doc.activeElement, doc.getElementById('i'),
"First invalid element should be focused");
checkPopupShow();
checkPopupMessage(doc);
@@ -235,17 +235,17 @@ function test5()
executeSoon(function () {
checkPopupHide();
// Clean-up and next test.
gBrowser.removeTab(gBrowser.selectedTab);
executeSoon(test6);
});
- }, false);
+ });
tab.linkedBrowser.addEventListener("load", function test5TabLBLoad(aEvent) {
tab.linkedBrowser.removeEventListener("load", test5TabLBLoad, true);
gBrowser.contentDocument.getElementById('s').click();
}, true);
gBrowser.selectedTab = tab;
@@ -256,17 +256,17 @@ function test5()
* In this test, we check that we can hide the popup by pressing TAB.
*/
function test6()
{
let uri = "data:text/html,<iframe name='t'></iframe><form target='t' action='data:text/html,'><input id='i' required><input id='s' type='submit'></form>";
let tab = gBrowser.addTab();
gInvalidFormPopup.addEventListener("popupshown", function test6gIpopupShown() {
- gInvalidFormPopup.removeEventListener("popupshown", test6gIpopupShown, false);
+ gInvalidFormPopup.removeEventListener("popupshown", test6gIpopupShown);
let doc = gBrowser.contentDocument;
is(doc.activeElement, doc.getElementById('i'),
"First invalid element should be focused");
checkPopupShow();
checkPopupMessage(doc);
@@ -274,17 +274,17 @@ function test6()
executeSoon(function () {
checkPopupHide();
// Clean-up and next test.
gBrowser.removeTab(gBrowser.selectedTab);
executeSoon(test7);
});
- }, false);
+ });
tab.linkedBrowser.addEventListener("load", function test6TabLBLoad(aEvent) {
tab.linkedBrowser.removeEventListener("load", test6TabLBLoad, true);
gBrowser.contentDocument.getElementById('s').click();
}, true);
gBrowser.selectedTab = tab;
@@ -295,17 +295,17 @@ function test6()
* In this test, we check that the popup will hide if we move to another tab.
*/
function test7()
{
let uri = "data:text/html,<iframe name='t'></iframe><form target='t' action='data:text/html,'><input id='i' required><input id='s' type='submit'></form>";
let tab = gBrowser.addTab();
gInvalidFormPopup.addEventListener("popupshown", function test7gIpopupShown() {
- gInvalidFormPopup.removeEventListener("popupshown", test7gIpopupShown, false);
+ gInvalidFormPopup.removeEventListener("popupshown", test7gIpopupShown);
let doc = gBrowser.contentDocument;
is(doc.activeElement, doc.getElementById('i'),
"First invalid element should be focused");
checkPopupShow();
checkPopupMessage(doc);
@@ -316,17 +316,17 @@ function test7()
executeSoon(function() {
checkPopupHide();
// Clean-up and next test.
gBrowser.removeTab(gBrowser.selectedTab);
gBrowser.removeTab(gBrowser.selectedTab);
executeSoon(test8);
});
- }, false);
+ });
tab.linkedBrowser.addEventListener("load", function test7TabLBLoad(aEvent) {
tab.linkedBrowser.removeEventListener("load", test7TabLBLoad, true);
gBrowser.contentDocument.getElementById('s').click();
}, true);
gBrowser.selectedTab = tab;
@@ -379,31 +379,31 @@ function test8()
* In this test, we check that the author defined error message is shown.
*/
function test9()
{
let uri = "data:text/html,<iframe name='t'></iframe><form target='t' action='data:text/html,'><input x-moz-errormessage='foo' required id='i'><input id='s' type='submit'></form>";
let tab = gBrowser.addTab();
gInvalidFormPopup.addEventListener("popupshown", function test9gIpopupShown() {
- gInvalidFormPopup.removeEventListener("popupshown", test9gIpopupShown, false);
+ gInvalidFormPopup.removeEventListener("popupshown", test9gIpopupShown);
let doc = gBrowser.contentDocument;
is(doc.activeElement, doc.getElementById('i'),
"First invalid element should be focused");
checkPopupShow();
is(gInvalidFormPopup.firstChild.textContent, "foo",
"The panel should show the author defined error message");
// Clean-up and next test.
gBrowser.removeTab(gBrowser.selectedTab);
executeSoon(test10);
- }, false);
+ });
tab.linkedBrowser.addEventListener("load", function test9TabLBLoad(aEvent) {
tab.linkedBrowser.removeEventListener("load", test9TabLBLoad, true);
gBrowser.contentDocument.getElementById('s').click();
}, true);
gBrowser.selectedTab = tab;
@@ -414,44 +414,44 @@ function test9()
* In this test, we check that the message is correctly updated when it changes.
*/
function test10()
{
let uri = "data:text/html,<iframe name='t'></iframe><form target='t' action='data:text/html,'><input type='email' required id='i'><input id='s' type='submit'></form>";
let tab = gBrowser.addTab();
gInvalidFormPopup.addEventListener("popupshown", function test10gIpopupShown() {
- gInvalidFormPopup.removeEventListener("popupshown", test10gIpopupShown, false);
+ gInvalidFormPopup.removeEventListener("popupshown", test10gIpopupShown);
let doc = gBrowser.contentDocument;
let input = doc.getElementById('i');
is(doc.activeElement, input, "First invalid element should be focused");
checkPopupShow();
is(gInvalidFormPopup.firstChild.textContent, input.validationMessage,
"The panel should show the current validation message");
input.addEventListener('input', function test10InputInput() {
- input.removeEventListener('input', test10InputInput, false);
+ input.removeEventListener('input', test10InputInput);
executeSoon(function() {
// Now, the element suffers from another error, the message should have
// been updated.
is(gInvalidFormPopup.firstChild.textContent, input.validationMessage,
"The panel should show the current validation message");
// Clean-up and next test.
gBrowser.removeTab(gBrowser.selectedTab);
executeSoon(finish);
});
- }, false);
+ });
EventUtils.synthesizeKey('f', {});
- }, false);
+ });
tab.linkedBrowser.addEventListener("load", function test10TabLBLoad(aEvent) {
tab.linkedBrowser.removeEventListener("load", test10TabLBLoad, true);
gBrowser.contentDocument.getElementById('s').click();
}, true);
gBrowser.selectedTab = tab;
--- a/suite/browser/test/browser/browser_bug595507.js
+++ b/suite/browser/test/browser/browser_bug595507.js
@@ -8,29 +8,29 @@ ok(gInvalidFormPopup,
function test()
{
waitForExplicitFinish();
let uri = "data:text/html,<iframe src=\"data:text/html,<iframe name='t'></iframe><form target='t' action='data:text/html,'><input required id='i'><input id='s' type='submit'></form>\"</iframe>";
let tab = gBrowser.addTab();
gInvalidFormPopup.addEventListener("popupshown", function testgIpopupShown() {
- gInvalidFormPopup.removeEventListener("popupshown", testgIpopupShown, false);
+ gInvalidFormPopup.removeEventListener("popupshown", testgIpopupShown);
let doc = gBrowser.contentDocument.getElementsByTagName('iframe')[0].contentDocument;
is(doc.activeElement, doc.getElementById('i'),
"First invalid element should be focused");
ok(gInvalidFormPopup.state == 'showing' || gInvalidFormPopup.state == 'open',
"The invalid form popup should be shown");
// Clean-up and next test.
gBrowser.removeTab(gBrowser.selectedTab, {animate: false});
executeSoon(finish);
- }, false);
+ });
tab.linkedBrowser.addEventListener("load", function testTabLBLoad(aEvent) {
tab.linkedBrowser.removeEventListener("load", testTabLBLoad, true);
gBrowser.contentDocument.getElementsByTagName('iframe')[0].contentDocument
.getElementById('s').click();
}, true);
--- a/suite/browser/test/browser/browser_ctrlTab.js
+++ b/suite/browser/test/browser/browser_ctrlTab.js
@@ -58,35 +58,35 @@ function test() {
assertTabs(1);
{ // test for bug 445768
let focusedWindow = document.commandDispatcher.focusedWindow;
let eventConsumed = true;
let detectKeyEvent = function (event) {
eventConsumed = event.defaultPrevented;
};
- document.addEventListener("keypress", detectKeyEvent, false);
+ document.addEventListener("keypress", detectKeyEvent);
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.location, document.commandDispatcher.focusedWindow.location,
"Ctrl+Tab doesn't change focus if one tab is open");
}
gBrowser.addTab();
gBrowser.addTab();
gBrowser.addTab();
assertTabs(4);
selectTabs([0, 1, 2, 3]);
pressCtrlTab();
- ctrlTab.panel.addEventListener("popupshown", stickyTests, false);
+ ctrlTab.panel.addEventListener("popupshown", stickyTests);
function stickyTests() {
- ctrlTab.panel.removeEventListener("popupshown", stickyTests, false);
+ ctrlTab.panel.removeEventListener("popupshown", stickyTests);
EventUtils.synthesizeKey("f", { ctrlKey: true });
is(document.activeElement, ctrlTab.searchField.inputField,
"Ctrl+Tab -> Ctrl+F focuses the panel's search field");
releaseCtrl();
ok(isOpen(),
"panel is sticky after focusing the search field and releasing the Ctrl key");
--- a/suite/browser/test/browser/browser_pluginCrashCommentAndURL.js
+++ b/suite/browser/test/browser/browser_pluginCrashCommentAndURL.js
@@ -22,24 +22,23 @@ function test() {
getService(Ci.nsIEnvironment);
let noReport = env.get("MOZ_CRASHREPORTER_NO_REPORT");
let serverURL = env.get("MOZ_CRASHREPORTER_URL");
env.set("MOZ_CRASHREPORTER_NO_REPORT", "");
env.set("MOZ_CRASHREPORTER_URL", SERVER_URL);
let tab = gBrowser.loadOneTab("about:blank", { inBackground: false });
let browser = tab.linkedBrowser;
- browser.addEventListener("PluginCrashed", onCrash, false);
+ browser.addEventListener("PluginCrashed", onCrash);
Services.obs.addObserver(onSubmitStatus, "crash-report-status", false);
registerCleanupFunction(function cleanUp() {
env.set("MOZ_CRASHREPORTER_NO_REPORT", noReport);
env.set("MOZ_CRASHREPORTER_URL", serverURL);
- gBrowser.selectedBrowser.removeEventListener("PluginCrashed", onCrash,
- false);
+ gBrowser.selectedBrowser.removeEventListener("PluginCrashed", onCrash);
Services.obs.removeObserver(onSubmitStatus, "crash-report-status");
gBrowser.removeCurrentTab();
});
doNextRun();
}
var runs = [
--- a/suite/browser/test/browser/browser_pluginnotification.js
+++ b/suite/browser/test/browser/browser_pluginnotification.js
@@ -13,44 +13,44 @@ Components.utils.import("resource://gre/
// This listens for the next opened tab and checks it is of the right url.
// opencallback is called when the new tab is fully loaded
// closecallback is called when the tab is closed
function TabOpenListener(url, opencallback, closecallback) {
this.url = url;
this.opencallback = opencallback;
this.closecallback = closecallback;
- gBrowser.tabContainer.addEventListener("TabOpen", this, false);
+ gBrowser.tabContainer.addEventListener("TabOpen", this);
}
TabOpenListener.prototype = {
url: null,
opencallback: null,
closecallback: null,
tab: null,
browser: null,
handleEvent: function(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;
- gBrowser.addEventListener("pageshow", this, false);
+ gBrowser.addEventListener("pageshow", this);
} else if (event.type == "pageshow") {
if (event.target.location.href != this.url)
return;
- gBrowser.removeEventListener("pageshow", this, false);
- this.tab.addEventListener("TabClose", this, false);
+ gBrowser.removeEventListener("pageshow", this);
+ this.tab.addEventListener("TabClose", this);
var url = this.browser.contentDocument.location.href;
is(url, this.url, "Should have opened the correct tab");
this.opencallback(this.tab, this.browser.contentWindow);
} 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;
// Let the window close complete
executeSoon(this.closecallback);
this.closecallback = null;
}
}
@@ -640,22 +640,22 @@ function test18a() {
var overlay = doc.getAnonymousElementByAttribute(plugin, "anonid", "main");
ok(overlay.style.visibility != "hidden", "Test 18a, Plugin overlay should exist, not be hidden");
var updateLink = doc.getAnonymousElementByAttribute(plugin, "anonid", "checkForUpdatesLink");
ok(updateLink.style.visibility != "hidden", "Test 18a, Plugin should have an update link");
var tabOpenListener = new TabOpenListener(Services.urlFormatter.formatURLPref("plugins.update.url"), false, false);
tabOpenListener.handleEvent = function(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;
- gBrowser.addEventListener("pageshow", this, false);
+ gBrowser.addEventListener("pageshow", this);
} else if (event.type == "pageshow") {
- gBrowser.removeEventListener("pageshow", this, false);
+ gBrowser.removeEventListener("pageshow", this);
is(this.browser.contentDocument.location.href, this.url, "Test 18a, Update link should open up the plugin check page");
gBrowser.removeTab(this.tab);
test18b();
}
};
EventUtils.synthesizeMouseAtCenter(updateLink, {}, gTestBrowser.contentWindow);
}
--- a/suite/browser/test/browser/browser_popupNotification.js
+++ b/suite/browser/test/browser/browser_popupNotification.js
@@ -12,17 +12,17 @@ function test() {
runNextTest();
}
function cleanUp() {
for (var topic in gActiveObservers)
Services.obs.removeObserver(gActiveObservers[topic], topic);
for (var eventName in gActiveListeners)
- PopupNotifications.panel.removeEventListener(eventName, gActiveListeners[eventName], false);
+ PopupNotifications.panel.removeEventListener(eventName, gActiveListeners[eventName]);
}
var gActiveListeners = {};
var gActiveObservers = {};
var gShownState = {};
function runNextTest() {
let nextTest = tests[gTestIndex];
@@ -89,23 +89,23 @@ function runNextTest() {
function doOnPopupEvent(eventName, callback, numExpected) {
gActiveListeners[eventName] = function (event) {
if (event.target != PopupNotifications.panel)
return;
if (typeof(numExpected) === "number")
numExpected--;
if (!numExpected) {
- PopupNotifications.panel.removeEventListener(eventName, gActiveListeners[eventName], false);
+ PopupNotifications.panel.removeEventListener(eventName, gActiveListeners[eventName]);
delete gActiveListeners[eventName];
}
callback.call(PopupNotifications.panel);
}
- PopupNotifications.panel.addEventListener(eventName, gActiveListeners[eventName], false);
+ PopupNotifications.panel.addEventListener(eventName, gActiveListeners[eventName]);
}
var gTestIndex = 0;
var gNewTab;
function basicNotification() {
var self = this;
this.browser = gBrowser.selectedBrowser;
@@ -742,25 +742,25 @@ function triggerSecondaryCommand(popup,
info("[Test #" + gTestIndex + "] triggering secondary command");
let notifications = popup.childNodes;
ok(notifications.length > 0, "at least one notification displayed");
let notification = notifications[0];
notification.button.focus();
popup.addEventListener("popupshown", function triggerPopupShown() {
- popup.removeEventListener("popupshown", triggerPopupShown, false);
+ popup.removeEventListener("popupshown", triggerPopupShown);
// Press down until the desired command is selected
for (let i = 0; i <= index; i++)
EventUtils.synthesizeKey("VK_DOWN", {});
// Activate
EventUtils.synthesizeKey("VK_RETURN", {});
- }, false);
+ });
// One down event to open the popup
EventUtils.synthesizeKey("VK_DOWN", { altKey: (navigator.platform.indexOf("Mac") == -1) });
}
function loadURI(uri, callback) {
if (callback) {
gBrowser.addEventListener("load", function loadURIgBLoad() {
--- a/suite/browser/test/browser/head.js
+++ b/suite/browser/test/browser/head.js
@@ -45,19 +45,19 @@ function waitForCondition(condition, nex
function whenNewWindowLoaded(aOptions, aCallback) {
var { private } = aOptions;
var features = private ? "private,chrome,all,dialog=no" :
"non-private,chrome,all,dialog=no";
var win = window.openDialog(getBrowserURL(), "_blank", features,
"about:blank");
win.addEventListener("load", function onLoad() {
- win.removeEventListener("load", onLoad, false);
+ win.removeEventListener("load", onLoad);
aCallback(win);
- }, false);
+ });
}
function updateBlocklist(aCallback) {
var blocklistNotifier = Components.classes["@mozilla.org/extensions/blocklist;1"]
.getService(Components.interfaces.nsITimerCallback);
var observer = function() {
Services.obs.removeObserver(observer, "blocklist-updated");
SimpleTest.executeSoon(aCallback);
--- a/suite/browser/test/mochitest/test_contextmenu.html
+++ b/suite/browser/test/mochitest/test_contextmenu.html
@@ -938,40 +938,40 @@ function startTest() {
contenteditable.focus(); // content editable needs to be focused to enable spellcheck
inputspell = subwindow.document.getElementById("test-input-spellcheck");
pagemenu = subwindow.document.getElementById("test-pagemenu");
// SeaMonkey specific elements.
img_link = subwindow.document.getElementById("test-image-link");
img_mailto = subwindow.document.getElementById("test-image-mailto");
- contextMenu.addEventListener("popupshown", function() { runTest(++testNum); }, false);
+ contextMenu.addEventListener("popupshown", function() { runTest(++testNum); });
runTest(1);
}
// We open this in a separate window, because the Mochitests run inside a frame.
// The frame causes an extra menu item, and prevents running the test
// standalone (ie, clicking the test name in the Mochitest window) to see
// success/failure messages.
var painted = false, loaded = false;
function waitForEvents(event)
{
if (event.type == "MozAfterPaint")
painted = true;
else if (event.type == "load")
loaded = true;
if (painted && loaded) {
- subwindow.removeEventListener("MozAfterPaint", waitForEvents, false);
+ subwindow.removeEventListener("MozAfterPaint", waitForEvents);
subwindow.onload = null;
startTest();
}
}
var subwindow = window.open("./subtst_contextmenu.html", "contextmenu-subtext", "width=600,height=700");
-subwindow.addEventListener("MozAfterPaint", waitForEvents, false);
+subwindow.addEventListener("MozAfterPaint", waitForEvents);
subwindow.onload = waitForEvents;
SimpleTest.waitForExplicitFinish();
</script>
</pre>
</body>
</html>
--- a/suite/browser/urlbarBindings.xml
+++ b/suite/browser/urlbarBindings.xml
@@ -53,23 +53,23 @@
<constructor><![CDATA[
this.mPrefs.addObserver("browser.urlbar", this.mPrefObserver, false);
this.updatePref("browser.urlbar.showPopup");
this.updatePref("browser.urlbar.autoFill");
this.updatePref("browser.urlbar.showSearch");
this.updatePref("browser.urlbar.formatting.enabled");
this.inputField.controllers.insertControllerAt(0, this._editItemsController);
- this.inputField.addEventListener("overflow", this, false);
- this.inputField.addEventListener("underflow", this, false);
+ this.inputField.addEventListener("overflow", this);
+ this.inputField.addEventListener("underflow", this);
]]></constructor>
<destructor><![CDATA[
- this.inputField.removeEventListener("underflow", this, false);
- this.inputField.removeEventListener("overflow", this, false);
+ this.inputField.removeEventListener("underflow", this);
+ this.inputField.removeEventListener("overflow", this);
this.inputField.controllers.removeController(this._editItemsController);
this.mPrefs.removeObserver("browser.urlbar", this.mPrefObserver);
]]></destructor>
<field name="mPrefs">
var svc = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefService);
svc.getBranch(null);
@@ -545,27 +545,27 @@
// calls updateEngines but doesn't cause the ``Search for ...''
// display string to be updated
if ( (!this.mEnginesReady && this.defaultSearchEngine) ||
!("mShowSearch" in this) )
this.updatePref("browser.urlbar.showSearch");
if (this.mShowSearch) {
this.textbox.mSearchInputTO = 0;
- this.textbox.addEventListener("input", this.mInputListener, false);
+ this.textbox.addEventListener("input", this.mInputListener);
if ("searchValue" in this.mSearchBox)
this.mSearchBox.searchValue = this.textbox.currentSearchString;
else
this.mSearchBox.setAttribute("searchvalue", this.textbox.currentSearchString);
}
]]></handler>
<handler event="popuphiding"><![CDATA[
if (this.mShowSearch)
- this.textbox.removeEventListener("input", this.mInputListener, false);
+ this.textbox.removeEventListener("input", this.mInputListener);
]]></handler>
</handlers>
</binding>
<binding id="autocomplete-search-box">
<content orient="vertical"/>
<implementation>
--- a/suite/browser/webDeveloperOverlay.js
+++ b/suite/browser/webDeveloperOverlay.js
@@ -82,34 +82,34 @@ var gWebDeveloper = {
enableDebugger: function(aItem) {
var shouldEnable = aItem.getAttribute("checked") == "true";
Services.prefs.setBoolPref("devtools.debugger.remote-enabled", shouldEnable);
},
handleEvent: function(aEvent) {
switch (aEvent.type) {
case "load":
- window.removeEventListener("load", gWebDeveloper, false);
- window.addEventListener("unload", gWebDeveloper, false);
+ window.removeEventListener("load", gWebDeveloper);
+ window.addEventListener("unload", gWebDeveloper);
var popup = document.getElementById("toolsPopup");
- popup.addEventListener("popupshowing", gWebDeveloper, false);
+ popup.addEventListener("popupshowing", gWebDeveloper);
// Don't use gDevToolsBrowser.updateCommandAvailability() at the moment
// because some tools aren't working.
if (!gDevToolsBrowser._old_updateCommandAvailability) {
gDevToolsBrowser._old_updateCommandAvailability = gDevToolsBrowser.updateCommandAvailability;
gDevToolsBrowser.updateCommandAvailability = this.updateCommandAvailability;
}
// Add Devtools menuitems, observers, and listeners
gDevToolsBrowser.registerBrowserWindow(window);
Services.prefs.addObserver(this.devtoolsThemePref, this, false);
this.updateDevtoolsThemeAttribute();
break;
case "unload":
- window.removeEventListener("unload", gWebDeveloper, false);
+ window.removeEventListener("unload", gWebDeveloper);
gDevToolsBrowser.forgetBrowserWindow(window);
Services.prefs.removeObserver(this.devtoolsThemePref, this);
var desc = Object.getOwnPropertyDescriptor(window, "DeveloperToolbar");
if (desc && !desc.get)
DeveloperToolbar.destroy();
break;
@@ -201,9 +201,9 @@ var gWebDeveloper = {
//toggleCmd("Tools:BrowserContentToolbox", remoteEnabled && win.gMultiProcessBrowser);
toggleCmd("Tools:BrowserContentToolbox", false);
// Enable DevTools connection screen, if the preference allows this.
toggleCmd("Tools:DevToolsConnect", devtoolsRemoteEnabled);
},
}
-window.addEventListener("load", gWebDeveloper, false);
+window.addEventListener("load", gWebDeveloper);
--- a/suite/common/bindings/notification.xml
+++ b/suite/common/bindings/notification.xml
@@ -868,32 +868,30 @@
return;
if (aEvent.button != 0)
return;
aEvent.preventDefault();
aEvent.stopPropagation();
if (callbackArgs.length == 0)
callbackArgs = [ aEvent ];
callback.apply(this, callbackArgs);
- }.bind(this),
- false);
+ }.bind(this));
linkNode.addEventListener("keydown",
function(aEvent) {
if (!aEvent.isTrusted)
return;
if (aEvent.keyCode != aEvent.DOM_VK_RETURN)
return;
aEvent.preventDefault();
aEvent.stopPropagation();
if (callbackArgs.length == 0)
callbackArgs = [ aEvent ];
callback.apply(this, callbackArgs);
- }.bind(this),
- false);
+ }.bind(this));
]]>
</body>
</method>
<!-- Callback for user clicking "submit a report" link -->
<method name="submitReport">
<parameter name="pluginDumpID"/>
<parameter name="browserDumpID"/>
@@ -2337,17 +2335,17 @@
Components.classes["@mozilla.org/observer-service;1"]
.getService(Components.interfaces.nsIObserverService)
.addObserver(observer, "crash-report-status", true);
// ...alas, now we need something to hold a strong reference to prevent
// it from being GC. But I don't want to manually manage the reference's
// lifetime (which should be no greater than the page).
// Clever solution? Use a closure with an event listener on the statusDiv.
// When it goes away, so do the listener references and the closure.
- statusDiv.addEventListener("mozCleverClosureHack", observer, false);
+ statusDiv.addEventListener("mozCleverClosureHack", observer);
}
}
// If we don't have a minidumpID, we can't (or didn't) submit anything.
// This can happen if the plugin is killed from the task manager.
if (!pluginDumpID) {
status = "noReport";
}
--- a/suite/common/bookmarks/bm-props.js
+++ b/suite/common/bookmarks/bm-props.js
@@ -350,27 +350,27 @@ var BookmarkPropertiesPanel = {
acceptButton.disabled = !this._inputIsValid();
break;
}
if (!this._readOnly) {
// Listen on uri fields to enable accept button if input is valid
if (this._itemType == BOOKMARK_ITEM) {
this._element("locationField")
- .addEventListener("input", this, false);
+ .addEventListener("input", this);
if (this._isAddKeywordDialog) {
this._element("keywordField")
- .addEventListener("input", this, false);
+ .addEventListener("input", this);
}
}
else if (this._itemType == LIVEMARK_CONTAINER) {
this._element("feedLocationField")
- .addEventListener("input", this, false);
+ .addEventListener("input", this);
this._element("siteLocationField")
- .addEventListener("input", this, false);
+ .addEventListener("input", this);
}
}
},
// nsIDOMEventListener
handleEvent: function BPP_handleEvent(aEvent) {
var target = aEvent.target;
switch (aEvent.type) {
@@ -443,25 +443,25 @@ var BookmarkPropertiesPanel = {
},
onDialogUnload: function BPP_onDialogUnload() {
// gEditItemOverlay does not exist anymore here, so don't rely on it.
this._mutationObserver.disconnect();
delete this._mutationObserver;
- window.removeEventListener("resize", this, false);
+ window.removeEventListener("resize", this);
// Calling removeEventListener with arguments which do not identify any
// currently registered EventListener on the EventTarget has no effect.
this._element("locationField")
- .removeEventListener("input", this, false);
+ .removeEventListener("input", this);
this._element("feedLocationField")
- .removeEventListener("input", this, false);
+ .removeEventListener("input", this);
this._element("siteLocationField")
- .removeEventListener("input", this, false);
+ .removeEventListener("input", this);
},
onDialogAccept: function BPP_onDialogAccept() {
// We must blur current focused element to save its changes correctly
document.commandDispatcher.focusedElement.blur();
// The order here is important! We have to uninit the panel first, otherwise
// late changes could force it to commit more transactions.
--- a/suite/common/bookmarks/browser-places.js
+++ b/suite/common/bookmarks/browser-places.js
@@ -13,18 +13,18 @@ var StarUI = {
// Edit-bookmark panel
get panel() {
delete this.panel;
var element = this._element("editBookmarkPanel");
// initially the panel is hidden
// to avoid impacting startup / new window performance
element.hidden = false;
- element.addEventListener("popuphidden", this, false);
- element.addEventListener("keypress", this, false);
+ element.addEventListener("popuphidden", this);
+ element.addEventListener("keypress", this);
return this.panel = element;
},
// Array of command elements to disable when the panel is opened.
get _blockedCommands() {
delete this._blockedCommands;
return this._blockedCommands =
["cmd_close", "cmd_closeWindow"].map(id => this._element(id));
--- a/suite/common/bookmarks/editBookmarkOverlay.js
+++ b/suite/common/bookmarks/editBookmarkOverlay.js
@@ -202,17 +202,17 @@ var gEditItemOverlay = {
this._showHideRows();
// observe changes
if (!this._observersAdded) {
// Single bookmarks observe any change. History entries and multiEdit
// observe only tags changes, through bookmarks.
if (this._itemId != -1 || this._uri || this._multiEdit)
PlacesUtils.bookmarks.addObserver(this, false);
- window.addEventListener("unload", this, false);
+ window.addEventListener("unload", this);
this._observersAdded = true;
}
this._initialized = true;
},
/**
* Finds tags that are in common among this._tags entries that track tags
@@ -774,17 +774,17 @@ var gEditItemOverlay = {
if (tagsSelectorRow.collapsed) {
expander.className = "expander-up";
expander.setAttribute("tooltiptext",
expander.getAttribute("tooltiptextup"));
tagsSelectorRow.collapsed = false;
this._rebuildTagsSelectorList();
// This is a no-op if we've added the listener.
- tagsSelector.addEventListener("CheckboxStateChange", this, false);
+ tagsSelector.addEventListener("CheckboxStateChange", this);
}
else {
expander.className = "expander-down";
expander.setAttribute("tooltiptext",
expander.getAttribute("tooltiptextdown"));
tagsSelectorRow.collapsed = true;
}
},
--- a/suite/common/dataman/tests/browser_dataman_basics.js
+++ b/suite/common/dataman/tests/browser_dataman_basics.js
@@ -785,25 +785,25 @@ function test_storage_load(aWin) {
let rootDir = getRootDirectory(gTestPath).replace("chrome://mochitests/content/", "http://mochi.test:8888/");
let testURL = rootDir + "dataman_storage.html";
let storagetab = gBrowser.addTab(testURL);
let stWin = storagetab.linkedBrowser.contentWindow.wrappedJSObject;
let dmStorageListener = {
handleEvent: function dmStorageHandler(aEvent) {
let tab = aEvent.target;
if (tab == storagetab) {
- gBrowser.tabContainer.removeEventListener("TabClose", this, false);
+ gBrowser.tabContainer.removeEventListener("TabClose", this);
// Force DOM Storage to write its data to the disk.
Services.obs.notifyObservers(null, "domstorage-flush-timer", "");
Services.perms.remove("mochi.test", "offline-app");
Services.obs.notifyObservers(window, TEST_DONE, null);
}
},
};
- gBrowser.tabContainer.addEventListener("TabClose", dmStorageListener, false);
+ gBrowser.tabContainer.addEventListener("TabClose", dmStorageListener);
},
function test_storage_wait(aWin) {
// Wait to make sure that DOM Storage flushing has actually worked.
setTimeout(function foo() {
Services.obs.notifyObservers(window, TEST_DONE, null); }, 1000);
},
@@ -838,17 +838,17 @@ function test_storage(aWin) {
isnot(aWin.gTabs.activePanel, "storagePanel",
"Storage panel is not selected any more");
Services.obs.notifyObservers(window, TEST_DONE, null);
},
function test_close(aWin) {
function dmWindowClosedListener() {
- aWin.removeEventListener("unload", dmWindowClosedListener, false);
+ aWin.removeEventListener("unload", dmWindowClosedListener);
isnot(content.document.documentElement.id, "dataman-page",
"The active tab is not the Data Manager");
Services.obs.notifyObservers(window, TEST_DONE, null);
}
- aWin.addEventListener("unload", dmWindowClosedListener, false);
+ aWin.addEventListener("unload", dmWindowClosedListener);
aWin.close();
}
];
--- a/suite/common/dataman/tests/dataman_storage.html
+++ b/suite/common/dataman/tests/dataman_storage.html
@@ -10,18 +10,18 @@ function eventSeen(e){
setTimeout(close, 1000);
}
</script>
</head>
<body>
<h1>Test</h1>
<p id="eventCnt">*</p>
<script>
-document.body.addEventListener('storage', eventSeen, false);
-document.addEventListener('idb-done', eventSeen, false);
+document.body.addEventListener('storage', eventSeen);
+document.addEventListener('idb-done', eventSeen);
localStorage.setItem("localtest", "foo"); // issues no storage event (!?)
globalStorage['mochi.test'].setItem("globaltest", "bar"); // issues a storage event
var request = mozIndexedDB.open("test", "test-decription");
request.onsuccess = function(e) {
var db = e.target.result;
var setVrequest = db.setVersion("1.0");
--- a/suite/common/downloads/tests/browser/browser_nsISuiteDownloadManagerUI.js
+++ b/suite/common/downloads/tests/browser/browser_nsISuiteDownloadManagerUI.js
@@ -11,22 +11,22 @@ function test_visibility_open()
}
function test_visibility_closed(aWin)
{
var dmui = Components.classes["@mozilla.org/download-manager-ui;1"]
.getService(Components.interfaces.nsISuiteDownloadManagerUI);
function dmWindowClosedListener() {
- aWin.removeEventListener("unload", dmWindowClosedListener, false);
+ aWin.removeEventListener("unload", dmWindowClosedListener);
is(dmui.recentWindow, null,
"nsIDownloadManagerUI indicates that the UI is not visible");
finish();
}
- aWin.addEventListener("unload", dmWindowClosedListener, false);
+ aWin.addEventListener("unload", dmWindowClosedListener);
aWin.close();
}
var testFuncs = [
test_visibility_open
, test_visibility_closed /* all tests after this *must* expect there to be
no open window, otherwise they will fail! */
];
--- a/suite/common/fullscreen-video.xhtml
+++ b/suite/common/fullscreen-video.xhtml
@@ -17,57 +17,57 @@ var video;
var closeIcon;
var title = (contentVideo.currentSrc || contentVideo.src).replace(/^.*\//, "");
try {
title = decodeURI(title);
} catch (e) {}
document.title = title;
-window.addEventListener("focus", onFocus, false);
-window.addEventListener("unload", onUnload, false);
-window.addEventListener("keypress", onKeyPress, false);
+window.addEventListener("focus", onFocus);
+window.addEventListener("unload", onUnload);
+window.addEventListener("keypress", onKeyPress);
function onFocus() {
- window.removeEventListener("focus", onFocus, false);
+ window.removeEventListener("focus", onFocus);
window.fullScreen = true;
- window.addEventListener("deactivate", autoClose, false);
+ window.addEventListener("deactivate", autoClose);
video = document.querySelector("video");
closeIcon = document.querySelector("div");
- video.addEventListener("loadeddata", onLoadedData, false);
+ video.addEventListener("loadeddata", onLoadedData);
// Automatically close this window when the playback ended, unless the user
// interacted with it.
- video.addEventListener("ended", autoClose, false);
- window.addEventListener("click", cancelAutoClose, false);
- window.addEventListener("keypress", cancelAutoClose, false);
+ video.addEventListener("ended", autoClose);
+ window.addEventListener("click", cancelAutoClose);
+ window.addEventListener("keypress", cancelAutoClose);
- video.addEventListener("playing", hideUI, false);
- video.addEventListener("seeked", hideUI, false);
- video.addEventListener("seeking", showUI, false);
- video.addEventListener("pause", showUI, false);
- video.addEventListener("ended", showUI, false);
+ video.addEventListener("playing", hideUI);
+ video.addEventListener("seeked", hideUI);
+ video.addEventListener("seeking", showUI);
+ video.addEventListener("pause", showUI);
+ video.addEventListener("ended", showUI);
- window.addEventListener("mousemove", onMouseMove, false);
+ window.addEventListener("mousemove", onMouseMove);
video.src = contentVideo.currentSrc || contentVideo.src;
}
function onLoadedData() {
- video.removeEventListener("loadeddata", onLoadedData, false);
+ video.removeEventListener("loadeddata", onLoadedData);
video.volume = contentVideo.volume;
video.muted = contentVideo.muted;
video.poster = contentVideo.poster;
if (contentVideo.currentTime && !contentVideo.ended) {
- video.addEventListener("seeked", playbackStarts, false);
+ video.addEventListener("seeked", playbackStarts);
video.currentTime = contentVideo.currentTime;
} else {
playbackStarts();
}
video.controls = true;
@@ -101,32 +101,32 @@ function onKeyPress(event) {
resetIdleTimer();
if (!video.controls &&
String.fromCharCode(event.charCode) == " ")
video.pause();
}
function playbackStarts() {
- video.removeEventListener("seeked", playbackStarts, false);
+ video.removeEventListener("seeked", playbackStarts);
// Loading the data from the content video may take a second or two. We hide
// the video during that period.
document.body.style.visibility = "visible";
video.focus();
}
function autoClose() {
window.close();
}
function cancelAutoClose() {
- video.removeEventListener("ended", autoClose, false);
- window.removeEventListener("click", cancelAutoClose, false);
- window.removeEventListener("keypress", cancelAutoClose, false);
+ video.removeEventListener("ended", autoClose);
+ window.removeEventListener("click", cancelAutoClose);
+ window.removeEventListener("keypress", cancelAutoClose);
}
var idleTimer = 0;
function resetIdleTimer() {
clearTimeout(idleTimer);
idleTimer = setTimeout(hideUI, 2000);
}
--- a/suite/common/places/tests/browser/browser_drag_bookmarks_on_toolbar.js
+++ b/suite/common/places/tests/browser/browser_drag_bookmarks_on_toolbar.js
@@ -84,32 +84,32 @@ function synthesizeDragWithDirection(aEl
EventUtils.synthesizeMouse(aElement,
startingPoint.x,
startingPoint.y,
{ type: "mousedown" });
EventUtils.synthesizeMouse(aElement,
startingPoint.x + xIncrement * 1,
startingPoint.y + yIncrement * 1,
{ type: "mousemove" });
- gBookmarksToolbar.addEventListener("dragstart", trapDrag, false);
+ gBookmarksToolbar.addEventListener("dragstart", trapDrag);
EventUtils.synthesizeMouse(aElement,
startingPoint.x + xIncrement * 9,
startingPoint.y + yIncrement * 9,
{ type: "mousemove" });
ok(trapped, "A dragstart event has been trapped.");
- gBookmarksToolbar.removeEventListener("dragstart", trapDrag, false);
+ gBookmarksToolbar.removeEventListener("dragstart", trapDrag);
// This is likely to cause a click event, and, in case we are dragging a
// bookmark, an unwanted page visit. Prevent the click event.
- aElement.addEventListener("click", prevent, false);
+ aElement.addEventListener("click", prevent);
EventUtils.synthesizeMouse(aElement,
startingPoint.x + xIncrement * 9,
startingPoint.y + yIncrement * 9,
{ type: "mouseup" });
- aElement.removeEventListener("click", prevent, false);
+ aElement.removeEventListener("click", prevent);
// Cleanup eventually opened menus.
if (aElement.localName == "menu" && aElement.open)
aElement.open = false;
}
function getToolbarNodeForItemId(aItemId) {
var children = document.getElementById("PlacesToolbarItems").childNodes;
--- a/suite/common/pref/pref-applications.js
+++ b/suite/common/pref/pref-applications.js
@@ -836,21 +836,21 @@ var gApplicationsPane = {
Services.prefs.addObserver(PREF_VIDEO_FEED_SELECTED_WEB, this, false);
Services.prefs.addObserver(PREF_VIDEO_FEED_SELECTED_ACTION, this, false);
Services.prefs.addObserver(PREF_AUDIO_FEED_SELECTED_APP, this, false);
Services.prefs.addObserver(PREF_AUDIO_FEED_SELECTED_WEB, this, false);
Services.prefs.addObserver(PREF_AUDIO_FEED_SELECTED_ACTION, this, false);
// Listen for window unload so we can remove our preference observers.
- window.addEventListener("unload", this, false);
+ window.addEventListener("unload", this);
// Listen for user events on the listbox and its children
- this._list.addEventListener("select", this, false);
- this._list.addEventListener("command", this, false);
+ this._list.addEventListener("select", this);
+ this._list.addEventListener("command", this);
// Figure out how we should be sorting the list. We persist sort settings
// across sessions, so we can't assume the default sort column/direction.
this._sortColumn = document.getElementById("typeColumn");
if (document.getElementById("actionColumn").hasAttribute("sortDirection")) {
this._sortColumn = document.getElementById("actionColumn");
// The typeColumn element always has a sortDirection attribute,
// either because it was persisted or because the default value
@@ -865,19 +865,19 @@ var gApplicationsPane = {
this._sortVisibleTypes();
this._rebuildView();
// Notify observers that the UI is now ready
Services.obs.notifyObservers(window, "app-handler-pane-loaded", null);
},
destroy: function() {
- this._list.removeEventListener("command", this, false);
- this._list.removeEventListener("select", this, false);
- window.removeEventListener("unload", this, false);
+ this._list.removeEventListener("command", this);
+ this._list.removeEventListener("select", this);
+ window.removeEventListener("unload", this);
Services.prefs.removeObserver(PREF_SHOW_PLUGINS_IN_LIST, this);
Services.prefs.removeObserver(PREF_HIDE_PLUGINS_WITHOUT_EXTENSIONS, this);
Services.prefs.removeObserver(PREF_FEED_SELECTED_APP, this);
Services.prefs.removeObserver(PREF_FEED_SELECTED_WEB, this);
Services.prefs.removeObserver(PREF_FEED_SELECTED_ACTION, this);
Services.prefs.removeObserver(PREF_VIDEO_FEED_SELECTED_APP, this);
Services.prefs.removeObserver(PREF_VIDEO_FEED_SELECTED_WEB, this);
--- a/suite/common/pref/pref-offlineapps.js
+++ b/suite/common/pref/pref-offlineapps.js
@@ -13,32 +13,32 @@ function Startup()
UpdateNotifyBox(always);
}
var OfflineAppsObserver = {
init: function offlineAppsInit() {
this.update();
Services.obs.addObserver(this, "perm-changed", false);
- window.addEventListener("unload", this, false);
+ window.addEventListener("unload", this);
},
update: function offlineAppsUpdate() {
UpdateActualCacheSize();
UpdateOfflineApps();
},
observe: function offlineAppsObserve(aSubject, aTopic, aData) {
if (aTopic == "perm-changed")
this.update();
},
handleEvent: function offlineAppsEvent(aEvent) {
if (aEvent.type == "unload") {
- window.removeEventListener("unload", this, false);
+ window.removeEventListener("unload", this);
Services.obs.removeObserver(this, "perm-changed");
}
}
}
function UpdateActualCacheSize()
{
var visitor = {
--- a/suite/common/pref/pref-search.js
+++ b/suite/common/pref/pref-search.js
@@ -7,28 +7,28 @@ Components.utils.import("resource://gre/
function Startup() {
MakeList();
SearchObserver.init();
}
var SearchObserver = {
init: function searchEngineListObserver_init() {
Services.obs.addObserver(this, "browser-search-engine-modified", false);
- window.addEventListener("unload", this, false);
+ window.addEventListener("unload", this);
},
observe: function searchEngineListObj_observe(aEngine, aTopic, aVerb) {
if (aTopic != "browser-search-engine-modified")
return;
MakeList();
},
handleEvent: function searchEngineListEvent(aEvent) {
if (aEvent.type == "unload") {
- window.removeEventListener("unload", this, false);
+ window.removeEventListener("unload", this);
Services.obs.removeObserver(this, "browser-search-engine-modified");
}
}
};
function MakeList() {
var menulist = document.getElementById("engineList");
var currentEngineName = Services.search.currentEngine.name;
--- a/suite/common/sync/syncSetup.js
+++ b/suite/common/sync/syncSetup.js
@@ -70,17 +70,17 @@ var gSyncSetup = {
// of `this`. Fix in a followup. (bug 583347)
if (add)
Weave.Svc.Obs.add(topic, self[func], self);
else
Weave.Svc.Obs.remove(topic, self[func], self);
});
};
addRem(true);
- window.addEventListener("unload", () => addRem(false), false);
+ window.addEventListener("unload", () => addRem(false));
setTimeout(function () {
// Force Service to be loaded so that engines are registered.
// See Bug 670082.
Weave.Service;
}, 0);
this.captchaBrowser = document.getElementById("captcha");
--- a/suite/common/sync/syncUI.js
+++ b/suite/common/sync/syncUI.js
@@ -18,41 +18,41 @@ var gSyncUI = {
"weave:ui:clear-error"],
_unloaded: false,
init: function SUI_init() {
// Update the Tools menu according to whether Sync is set up or not.
let taskPopup = document.getElementById("taskPopup");
if (taskPopup)
- taskPopup.addEventListener("popupshowing", this.updateUI.bind(this), false);
+ taskPopup.addEventListener("popupshowing", this.updateUI.bind(this));
// Proceed to set up the UI if Sync has already started up.
// Otherwise we'll do it when Sync is firing up.
if (Components.classes["@mozilla.org/weave/service;1"]
.getService().wrappedJSObject.ready) {
this.initUI();
return;
}
Services.obs.addObserver(this, "weave:service:ready", true);
// Remove the observer if the window is closed before the observer
// was triggered.
window.addEventListener("unload", function SUI_unload() {
gSyncUI._unloaded = true;
- window.removeEventListener("unload", SUI_unload, false);
+ window.removeEventListener("unload", SUI_unload);
Services.obs.removeObserver(gSyncUI, "weave:service:ready");
if (Weave.Status.ready) {
gSyncUI._obs.forEach(function(topic) {
Services.obs.removeObserver(gSyncUI, topic);
});
}
- }, false);
+ });
},
initUI: function SUI_initUI() {
this._obs.forEach(function(topic) {
Services.obs.addObserver(this, topic, true);
}, this);
// Find the alltabs-popup
--- a/suite/common/tasksOverlay.js
+++ b/suite/common/tasksOverlay.js
@@ -105,36 +105,36 @@ function toOpenWindowByType(inType, uri,
return topWindow;
}
else
{
// open the requested window, but block it until it's fully loaded
function newWindowLoaded(event)
{
// make sure that this handler is called only once
- window.removeEventListener("unload", newWindowLoaded, false);
- window[uri].removeEventListener("load", newWindowLoaded, false);
+ window.removeEventListener("unload", newWindowLoaded);
+ window[uri].removeEventListener("load", newWindowLoaded);
delete window[uri];
}
// Remember the newly loading window until it's fully loaded
// or until the current window passes away.
// Only pass args if they exist and have a value (see Bug 1279738).
if (typeof args != "undefined" && args) {
window[uri] = openDialog(uri, "",
features || "non-private,all,dialog=no",
args || null);
}
else {
window[uri] = openDialog(uri, "",
features || "non-private,all,dialog=no");
}
- window[uri].addEventListener("load", newWindowLoaded, false);
- window.addEventListener("unload", newWindowLoaded, false);
+ window[uri].addEventListener("load", newWindowLoaded);
+ window.addEventListener("unload", newWindowLoaded);
}
return;
}
function OpenBrowserWindow()
{
var win = Services.wm.getMostRecentWindow("navigator:browser");
if (document.documentElement.getAttribute("windowtype") ==
--- a/suite/common/tests/browser/browser_354894.js
+++ b/suite/common/tests/browser/browser_354894.js
@@ -183,26 +183,26 @@ function test() {
*/
function setupTestAndRun(testFn) {
// Prepare the prefs
setPrefs();
// Prepare a window; open it and add more tabs
let newWin = openDialog(location, "_blank", CHROME_FEATURES, "about:config");
newWin.addEventListener("load", function loadListener1(aEvent) {
- newWin.removeEventListener("load", loadListener1, false);
+ newWin.removeEventListener("load", loadListener1);
newWin.getBrowser().addEventListener("pageshow", function pageshowListener2(aEvent) {
newWin.getBrowser().removeEventListener("pageshow", pageshowListener2, true);
for (let url of TEST_URLS) {
newWin.getBrowser().addTab(url);
}
executeSoon(() => testFn(newWin));
}, true);
- }, false);
+ });
}
/**
* Test 1: Normal in-session restore
* @note: Non-Mac only
*/
function testOpenCloseNormal(nextFn) {
setupTestAndRun(function(newWin) {
@@ -217,17 +217,17 @@ function test() {
newWin.BrowserTryToCloseWindow();
ok(newWin.closed, "Second close request was granted");
}
// Open a new window
// The previously closed window should be restored
newWin = openDialog(location, "_blank", CHROME_FEATURES, "about:blank");
newWin.addEventListener("load", function loadListener3() {
- newWin.removeEventListener("load", loadListener3, false);
+ newWin.removeEventListener("load", loadListener3);
executeSoon(function() {
is(newWin.getBrowser().browsers.length, TEST_URLS.length + 1,
"Restored window in-session with otherpopup windows around");
// Cleanup
newWin.close();
// Next please
@@ -243,46 +243,46 @@ function test() {
* @note: Non-Mac only
*/
function testOpenCloseWindowAndPopup(nextFn) {
setupTestAndRun(function(newWin) {
// open some popups
let popup = openDialog(location, "popup", POPUP_FEATURES, TEST_URLS[0]);
let popup2 = openDialog(location, "popup2", POPUP_FEATURES, TEST_URLS[1]);
popup2.addEventListener("load", function loadListener4() {
- popup2.removeEventListener("load", loadListener4, false);
+ popup2.removeEventListener("load", loadListener4);
popup2.getBrowser().addEventListener("pageshow", function pageshowListener5() {
popup2.getBrowser().removeEventListener("pageshow", pageshowListener5, true);
popup2.getBrowser().addTab(TEST_URLS[0]);
// close the window
newWin.BrowserTryToCloseWindow();
// Close the popup window
// The test is successful when not this popup window is restored
// but instead newWin
popup2.close();
// open a new window the previously closed window should be restored to
newWin = openDialog(location, "_blank", CHROME_FEATURES, "about:blank");
newWin.addEventListener("load", function loadListener6() {
- newWin.removeEventListener("load", loadListener6, false);
+ newWin.removeEventListener("load", loadListener6);
executeSoon(function() {
is(newWin.getBrowser().browsers.length, TEST_URLS.length + 1,
"Restored window and associated tabs in session");
// Cleanup
newWin.close();
popup.close();
// Next please
executeSoon(nextFn);
});
}, true);
}, true);
- }, false);
+ });
});
}
/**
* Test 3: Open some popup window to check it isn't restored.
* Instead nothing at all should be restored
* @note: Non-Mac only
*/
@@ -297,17 +297,17 @@ function test() {
popup.removeEventListener("load", loadListener7, true);
is(popup.getBrowser().browsers.length, 1,
"Did not restore the popup window (1)");
popup.BrowserTryToCloseWindow();
// Real tests
popup = openDialog(location, "popup", POPUP_FEATURES, TEST_URLS[1]);
popup.addEventListener("load", function loadListener8() {
- popup.removeEventListener("load", loadListener8, false);
+ popup.removeEventListener("load", loadListener8);
popup.getBrowser().addEventListener("pageshow", function pageshowListener9() {
popup.getBrowser().removeEventListener("pageshow", pageshowListener9, true);
popup.getBrowser().addTab(TEST_URLS[0]);
is(popup.getBrowser().browsers.length, 2,
"Did not restore to the popup window (2)");
// Close the popup window
@@ -327,17 +327,17 @@ function test() {
// Cleanup
newWin.close();
// Next please
executeSoon(nextFn);
});
}, true);
}, true);
- }, false);
+ });
}, true);
}
/**
* Test 4: Open some windows and do undoCloseWindow. This should prevent any
* restoring later in the test
* @note: Non-Mac only
*/
--- a/suite/common/tests/browser/browser_423132.js
+++ b/suite/common/tests/browser/browser_423132.js
@@ -31,17 +31,17 @@ function test() {
const testURL = "http://mochi.test:8888/browser/" +
"suite/common/tests/browser/browser_423132_sample.html";
// open a new window
let newWin = openDialog(location, "_blank", "chrome,all,dialog=no", "about:blank");
// make sure sessionstore saves the cookie data, then close the window
newWin.addEventListener("load", function testNewWinLoad(aEvent) {
- newWin.removeEventListener("load", testNewWinLoad, false);
+ newWin.removeEventListener("load", testNewWinLoad);
newWin.getBrowser().selectedBrowser.loadURI(testURL, null, null);
newWin.getBrowser().addEventListener("pageshow", function testNewWinPageShow(aEvent) {
newWin.getBrowser().removeEventListener("pageshow", testNewWinPageShow, true);
// get the sessionstore state for the window
let state = ss.getWindowState(newWin);
@@ -77,10 +77,10 @@ function test() {
// clean up
if (Services.prefs.prefHasUserValue("browser.sessionstore.interval"))
Services.prefs.clearUserPref("browser.sessionstore.interval");
cs.removeAll();
newWin.close();
is(browserWindowsCount(), 1, "Only one browser window should be open eventually");
finish();
}, true);
- }, false);
+ });
}
--- a/suite/common/tests/browser/browser_447951.js
+++ b/suite/common/tests/browser/browser_447951.js
@@ -15,17 +15,17 @@ function test() {
let tabState = { entries: [] };
let max_entries = Services.prefs.getIntPref("browser.sessionhistory.max_entries");
for (let i = 0; i < max_entries; i++)
tabState.entries.push({ url: baseURL + i });
ss.setTabState(tab, JSON.stringify(tabState));
tab.addEventListener("SSTabRestored", function testTabSSTabRestored(aEvent) {
- tab.removeEventListener("SSTabRestored", testTabSSTabRestored, false);
+ tab.removeEventListener("SSTabRestored", testTabSSTabRestored);
tabState = JSON.parse(ss.getTabState(tab));
is(tabState.entries.length, max_entries, "session history filled to the limit");
is(tabState.entries[0].url, baseURL + 0, "... but not more");
// visit yet another anchor (appending it to session history)
let doc = tab.linkedBrowser.contentDocument;
let event = doc.createEvent("MouseEvents");
event.initMouseEvent("click", true, true, doc.defaultView, 1,
@@ -40,11 +40,11 @@ function test() {
"... and ignored");
is(tabState.entries[0].url, baseURL + 1,
"... and the first item was removed");
// clean up
getBrowser().removeTab(tab);
finish();
});
- }, false);
+ });
}, true);
}
--- a/suite/common/tests/browser/browser_461634.js
+++ b/suite/common/tests/browser/browser_461634.js
@@ -39,17 +39,17 @@ function test() {
catch (ex) {
return ex.name == "NS_ERROR_ILLEGAL_VALUE";
}
}
// open a window and add the above closed tab list
let newWin = openDialog(location, "", "chrome,all,dialog=no");
newWin.addEventListener("load", function loadListener(aEvent) {
- newWin.removeEventListener("load", loadListener, false);
+ newWin.removeEventListener("load", loadListener);
Services.prefs.setIntPref("browser.sessionstore.max_tabs_undo",
test_state.windows[0]._closedTabs.length);
ss.setWindowState(newWin, JSON.stringify(test_state), true);
let closedTabs = JSON.parse(ss.getClosedTabData(newWin));
is(closedTabs.length, test_state.windows[0]._closedTabs.length,
"Closed tab list has the expected length");
@@ -79,10 +79,10 @@ function test() {
is(countByTitle(closedTabs, REMEMBER), remember_count,
"... and tabs not specifically forgetten weren't.");
// clean up
newWin.close();
is(browserWindowsCount(), 1, "Only one browser window should be open eventually");
Services.prefs.clearUserPref("browser.sessionstore.max_tabs_undo");
finish();
- }, false);
+ });
}
--- a/suite/common/tests/browser/browser_465223.js
+++ b/suite/common/tests/browser/browser_465223.js
@@ -22,17 +22,17 @@ function test() {
let uniqueKey1 = "bug 465223.1";
let uniqueKey2 = "bug 465223.2";
let uniqueValue1 = "unik" + Date.now();
let uniqueValue2 = "pi != " + Math.random();
// open a window and set a value on it
let newWin = openDialog(location, "_blank", "chrome,all,dialog=no");
newWin.addEventListener("load", function loadListener(aEvent) {
- newWin.removeEventListener("load", loadListener, false);
+ newWin.removeEventListener("load", loadListener);
ss.setWindowValue(newWin, uniqueKey1, uniqueValue1);
let newState = { windows: [{ tabs:[{ entries: [] }], extData: {} }] };
newState.windows[0].extData[uniqueKey2] = uniqueValue2;
ss.setWindowState(newWin, JSON.stringify(newState), false);
is(newWin.gBrowser.tabContainer.childNodes.length, 2,
@@ -51,10 +51,10 @@ function test() {
"window value was cleared");
is(ss.getWindowValue(newWin, uniqueKey2), uniqueValue1,
"window value was correctly overwritten");
// clean up
newWin.close();
is(browserWindowsCount(), 1, "Only one browser window should be open eventually");
finish();
- }, false);
+ });
}
--- a/suite/common/tests/browser/browser_466937_sample.html
+++ b/suite/common/tests/browser/browser_466937_sample.html
@@ -4,18 +4,18 @@
<title>Test for bug 466937</title>
<input id="thief" value="/home/user/secret">
<input type="file" id="reverse_thief">
<input type="file" id="bystander">
<script>
window.addEventListener("DOMContentLoaded", function windowDOMContentLoaded() {
- window.removeEventListener("DOMContentLoaded", windowDOMContentLoaded, false);
+ window.removeEventListener("DOMContentLoaded", windowDOMContentLoaded);
if (!document.location.hash) {
document.location.hash = "#ready";
}
else {
document.getElementById("thief").type = "file";
document.getElementById("reverse_thief").type = "text";
}
- }, false);
+ });
</script>
--- a/suite/common/tests/browser/browser_477657.js
+++ b/suite/common/tests/browser/browser_477657.js
@@ -19,17 +19,17 @@ function test() {
// Test fails randomly on OS X (bug 482975)
if ("nsILocalFileMac" in Components.interfaces)
return;
waitForExplicitFinish();
let newWin = openDialog(location, "_blank", "chrome,all,dialog=no");
newWin.addEventListener("load", function loadListener(aEvent) {
- newWin.removeEventListener("load", loadListener, false);
+ newWin.removeEventListener("load", loadListener);
let newState = { windows: [{
tabs: [{ entries: [] }],
_closedTabs: [{
state: { entries: [{ url: "about:" }]},
title: "About:"
}],
sizemode: "maximized"
@@ -71,10 +71,10 @@ function test() {
"the window was explicitly unmaximized");
newWin.close();
is(browserWindowsCount(), 1, "Only one browser window should be open eventually");
finish();
}, 0);
}, 0);
}, 0);
- }, false);
+ });
}
--- a/suite/common/tests/browser/browser_490040.js
+++ b/suite/common/tests/browser/browser_490040.js
@@ -31,17 +31,17 @@ function test() {
let theWin = aSubject.QueryInterface(Components.interfaces.nsIDOMWindow);
if (origWin && theWin != origWin)
return;
switch (aTopic) {
case "domwindowopened":
origWin = theWin;
theWin.addEventListener("load", function testTheWinLoad() {
- theWin.removeEventListener("load", testTheWinLoad, false);
+ theWin.removeEventListener("load", testTheWinLoad);
executeSoon(function () {
// Close the window as soon as the first tab loads, or
// immediately if there are no tabs.
if (aState.windowState.windows[0].tabs[0].entries.length) {
theWin.gBrowser.addEventListener("load",
function testTheWinLoad2() {
theWin.gBrowser.removeEventListener("load", testTheWinLoad2,
true);
@@ -50,17 +50,17 @@ function test() {
} else {
executeSoon(function () {
theWin.close();
});
}
ss.setWindowState(theWin, JSON.stringify(aState.windowState),
true);
});
- }, false);
+ });
break;
case "domwindowclosed":
Services.ww.unregisterNotification(windowObserver);
// Use executeSoon to ensure this happens after SS observer.
executeSoon(function () {
is(ss.getClosedWindowCount(),
curClosedWindowCount + (aState.shouldBeAdded ? 1 : 0),
--- a/suite/common/tests/browser/browser_514751.js
+++ b/suite/common/tests/browser/browser_514751.js
@@ -20,31 +20,31 @@ function test() {
let windowObserver = {
observe: function(aSubject, aTopic, aData) {
let theWin = aSubject.QueryInterface(Ci.nsIDOMWindow);
switch(aTopic) {
case "domwindowopened":
theWin.addEventListener("load", function testTheWinLoad() {
- theWin.removeEventListener("load", testTheWinLoad, false);
+ theWin.removeEventListener("load", testTheWinLoad);
executeSoon(function() {
var gotError = false;
try {
ss.setWindowState(theWin, JSON.stringify(state), true);
} catch (e) {
if (/NS_ERROR_MALFORMED_URI/.test(e))
gotError = true;
}
ok(!gotError, "Didn't get a malformed URI error.");
executeSoon(function() {
theWin.close();
});
});
- }, false);
+ });
break;
case "domwindowclosed":
Services.ww.unregisterNotification(this);
finish();
break;
}
}
--- a/suite/common/tests/browser/browser_524745.js
+++ b/suite/common/tests/browser/browser_524745.js
@@ -18,17 +18,17 @@ function test() {
let uniqKey = "bug524745";
let uniqVal = Date.now();
waitForExplicitFinish();
let window_B = openDialog(location, "_blank", "chrome,all,dialog=no");
window_B.addEventListener("load", function testWindowBLoad(aEvent) {
- window_B.removeEventListener("load", testWindowBLoad, false);
+ window_B.removeEventListener("load", testWindowBLoad);
waitForFocus(function() {
// Add identifying information to window_B
ss.setWindowValue(window_B, uniqKey, uniqVal);
let state = JSON.parse(ss.getBrowserState());
let selectedWindow = state.windows[state.selectedWindow - 1];
is(selectedWindow.extData && selectedWindow.extData[uniqKey], uniqVal,
"selectedWindow is window_B");
@@ -50,10 +50,10 @@ function test() {
// Cleanup
window.restore();
window_B.close();
is(browserWindowsCount(), 1,
"Only one browser window should be open eventually");
finish();
});
}, window_B);
- }, false);
+ });
}
--- a/suite/common/tests/browser/browser_528776.js
+++ b/suite/common/tests/browser/browser_528776.js
@@ -15,15 +15,15 @@ function test() {
/** Test for Bug 528776, ported by Bug 548228 **/
waitForExplicitFinish();
browserWindowsCount(1);
var win = openDialog(location, "", "chrome,all,dialog=no");
win.addEventListener("load", function loadListener() {
- win.removeEventListener("load", loadListener, false);
+ win.removeEventListener("load", loadListener);
browserWindowsCount(2);
win.close();
browserWindowsCount(1);
finish();
- }, false);
+ });
}
--- a/suite/common/tests/browser/browser_586068-cascaded_restore.js
+++ b/suite/common/tests/browser/browser_586068-cascaded_restore.js
@@ -245,21 +245,21 @@ function test_multiWindowState() {
runNextTest();
}
// We also want to catch the 2nd window, so we need to observe domwindowopened
function windowObserver(aSubject, aTopic, aData) {
let theWin = aSubject.QueryInterface(Components.interfaces.nsIDOMWindow);
if (aTopic == "domwindowopened") {
theWin.addEventListener("load", function theWinLoad() {
- theWin.removeEventListener("load", theWinLoad, false);
+ theWin.removeEventListener("load", theWinLoad);
Services.ww.unregisterNotification(windowObserver);
theWin.getBrowser().addTabsProgressListener(progressListener);
- }, false);
+ });
}
}
Services.ww.registerNotification(windowObserver);
window.getBrowser().addTabsProgressListener(progressListener);
ss.setBrowserState(JSON.stringify(state));
}
@@ -508,21 +508,21 @@ function test_setBrowserStateInterrupted
runNextTest();
}
// We also want to catch the extra windows (there should be 2), so we need to observe domwindowopened
function windowObserver(aSubject, aTopic, aData) {
let theWin = aSubject.QueryInterface(Components.interfaces.nsIDOMWindow);
if (aTopic == "domwindowopened") {
theWin.addEventListener("load", function wObserverTheWinLoad() {
- theWin.removeEventListener("load", wObserverTheWinLoad, false);
+ theWin.removeEventListener("load", wObserverTheWinLoad);
Services.ww.unregisterNotification(windowObserver);
theWin.getBrowser().addTabsProgressListener(progressListener);
- }, false);
+ });
}
}
Services.ww.registerNotification(windowObserver);
window.getBrowser().addTabsProgressListener(progressListener);
ss.setBrowserState(JSON.stringify(state1));
}
--- a/suite/common/tests/browser/browser_615394-SSWindowState_events.js
+++ b/suite/common/tests/browser/browser_615394-SSWindowState_events.js
@@ -99,26 +99,26 @@ function test_setTabState() {
}
function onSSTabRestored(aEvent) {
is(busyEventCount, 1);
is(readyEventCount, 1);
is(ss.getTabValue(tab, "baz"), "qux");
is(tab.linkedBrowser.currentURI.spec, "http://example.org/");
- window.removeEventListener("SSWindowStateBusy", onSSWindowStateBusy, false);
- window.removeEventListener("SSWindowStateReady", onSSWindowStateReady, false);
- getBrowser().tabContainer.removeEventListener("SSTabRestored", onSSTabRestored, false);
+ window.removeEventListener("SSWindowStateBusy", onSSWindowStateBusy);
+ window.removeEventListener("SSWindowStateReady", onSSWindowStateReady);
+ getBrowser().tabContainer.removeEventListener("SSTabRestored", onSSTabRestored);
runNextTest();
}
- window.addEventListener("SSWindowStateBusy", onSSWindowStateBusy, false);
- window.addEventListener("SSWindowStateReady", onSSWindowStateReady, false);
- getBrowser().tabContainer.addEventListener("SSTabRestored", onSSTabRestored, false);
+ window.addEventListener("SSWindowStateBusy", onSSWindowStateBusy);
+ window.addEventListener("SSWindowStateReady", onSSWindowStateReady);
+ getBrowser().tabContainer.addEventListener("SSTabRestored", onSSTabRestored);
ss.setTabState(tab, newTabState);
}
function test_duplicateTab() {
let tab = getBrowser().tabs[1];
let busyEventCount = 0;
let readyEventCount = 0;
@@ -140,26 +140,26 @@ function test_duplicateTab() {
}
function onSSTabRestored(aEvent) {
is(busyEventCount, 1);
is(readyEventCount, 1);
is(ss.getTabValue(newTab, "baz"), "qux");
is(newTab.linkedBrowser.currentURI.spec, "about:logo");
- window.removeEventListener("SSWindowStateBusy", onSSWindowStateBusy, false);
- window.removeEventListener("SSWindowStateReady", onSSWindowStateReady, false);
- getBrowser().tabContainer.removeEventListener("SSTabRestored", onSSTabRestored, false);
+ window.removeEventListener("SSWindowStateBusy", onSSWindowStateBusy);
+ window.removeEventListener("SSWindowStateReady", onSSWindowStateReady);
+ getBrowser().tabContainer.removeEventListener("SSTabRestored", onSSTabRestored);
runNextTest();
}
- window.addEventListener("SSWindowStateBusy", onSSWindowStateBusy, false);
- window.addEventListener("SSWindowStateReady", onSSWindowStateReady, false);
- getBrowser().tabContainer.addEventListener("SSTabRestored", onSSTabRestored, false);
+ window.addEventListener("SSWindowStateBusy", onSSWindowStateBusy);
+ window.addEventListener("SSWindowStateReady", onSSWindowStateReady);
+ getBrowser().tabContainer.addEventListener("SSTabRestored", onSSTabRestored);
newTab = ss.duplicateTab(window, tab);
}
function test_undoCloseTab() {
let tab = getBrowser().tabs[1],
busyEventCount = 0,
@@ -181,26 +181,26 @@ function test_undoCloseTab() {
}
function onSSTabRestored(aEvent) {
is(busyEventCount, 1);
is(readyEventCount, 1);
is(ss.getTabValue(reopenedTab, "baz"), "qux");
is(reopenedTab.linkedBrowser.currentURI.spec, "about:logo");
- window.removeEventListener("SSWindowStateBusy", onSSWindowStateBusy, false);
- window.removeEventListener("SSWindowStateReady", onSSWindowStateReady, false);
- getBrowser().tabContainer.removeEventListener("SSTabRestored", onSSTabRestored, false);
+ window.removeEventListener("SSWindowStateBusy", onSSWindowStateBusy);
+ window.removeEventListener("SSWindowStateReady", onSSWindowStateReady);
+ getBrowser().tabContainer.removeEventListener("SSTabRestored", onSSTabRestored);
runNextTest();
}
- window.addEventListener("SSWindowStateBusy", onSSWindowStateBusy, false);
- window.addEventListener("SSWindowStateReady", onSSWindowStateReady, false);
- getBrowser().tabContainer.addEventListener("SSTabRestored", onSSTabRestored, false);
+ window.addEventListener("SSWindowStateBusy", onSSWindowStateBusy);
+ window.addEventListener("SSWindowStateReady", onSSWindowStateReady);
+ getBrowser().tabContainer.addEventListener("SSTabRestored", onSSTabRestored);
getBrowser().removeTab(tab);
reopenedTab = ss.undoCloseTab(window, 0);
}
function test_setWindowState() {
let testState = {
@@ -230,26 +230,26 @@ function test_setWindowState() {
if (++tabRestoredCount < 2)
return;
is(busyEventCount, 1);
is(readyEventCount, 1);
is(getBrowser().tabs[0].linkedBrowser.currentURI.spec, "about:mozilla");
is(getBrowser().tabs[1].linkedBrowser.currentURI.spec, "http://example.org/");
- window.removeEventListener("SSWindowStateBusy", onSSWindowStateBusy, false);
- window.removeEventListener("SSWindowStateReady", onSSWindowStateReady, false);
- getBrowser().tabContainer.removeEventListener("SSTabRestored", onSSTabRestored, false);
+ window.removeEventListener("SSWindowStateBusy", onSSWindowStateBusy);
+ window.removeEventListener("SSWindowStateReady", onSSWindowStateReady);
+ getBrowser().tabContainer.removeEventListener("SSTabRestored", onSSTabRestored);
runNextTest();
}
- window.addEventListener("SSWindowStateBusy", onSSWindowStateBusy, false);
- window.addEventListener("SSWindowStateReady", onSSWindowStateReady, false);
- getBrowser().tabContainer.addEventListener("SSTabRestored", onSSTabRestored, false);
+ window.addEventListener("SSWindowStateBusy", onSSWindowStateBusy);
+ window.addEventListener("SSWindowStateReady", onSSWindowStateReady);
+ getBrowser().tabContainer.addEventListener("SSTabRestored", onSSTabRestored);
ss.setWindowState(window, JSON.stringify(testState), true);
}
function test_setBrowserState() {
// We'll track events per window so we are sure that they are each happening once
// pre window.
@@ -258,55 +258,55 @@ function test_setBrowserState() {
// waitForBrowserState does it's own observing for windows, but doesn't attach
// the listeners we want here, so do it ourselves.
let newWindow;
function windowObserver(aSubject, aTopic, aData) {
if (aTopic == "domwindowopened") {
newWindow = aSubject.QueryInterface(Components.interfaces.nsIDOMWindow);
newWindow.addEventListener("load", function newWindowLoad() {
- newWindow.removeEventListener("load", newWindowLoad, false);
+ newWindow.removeEventListener("load", newWindowLoad);
Services.ww.unregisterNotification(windowObserver);
windowEvents[getOuterWindowID(newWindow)] = { busyEventCount: 0, readyEventCount: 0 };
- newWindow.addEventListener("SSWindowStateBusy", onSSWindowStateBusy, false);
- newWindow.addEventListener("SSWindowStateReady", onSSWindowStateReady, false);
- }, false);
+ newWindow.addEventListener("SSWindowStateBusy", onSSWindowStateBusy);
+ newWindow.addEventListener("SSWindowStateReady", onSSWindowStateReady);
+ });
}
}
function onSSWindowStateBusy(aEvent) {
windowEvents[getOuterWindowID(aEvent.originalTarget)].busyEventCount++;
}
function onSSWindowStateReady(aEvent) {
windowEvents[getOuterWindowID(aEvent.originalTarget)].readyEventCount++;
}
- window.addEventListener("SSWindowStateBusy", onSSWindowStateBusy, false);
- window.addEventListener("SSWindowStateReady", onSSWindowStateReady, false);
+ window.addEventListener("SSWindowStateBusy", onSSWindowStateBusy);
+ window.addEventListener("SSWindowStateReady", onSSWindowStateReady);
Services.ww.registerNotification(windowObserver);
waitForBrowserState(lameMultiWindowState, function() {
let checkedWindows = 0;
for (let [id, winEvents] of Object.entries(windowEvents)) {
is(winEvents.busyEventCount, 1,
"[test_setBrowserState] window" + id + " busy event count correct");
is(winEvents.readyEventCount, 1,
"[test_setBrowserState] window" + id + " ready event count correct");
checkedWindows++;
}
is(checkedWindows, 2,
"[test_setBrowserState] checked 2 windows");
- window.removeEventListener("SSWindowStateBusy", onSSWindowStateBusy, false);
- window.removeEventListener("SSWindowStateReady", onSSWindowStateReady, false);
- newWindow.removeEventListener("SSWindowStateBusy", onSSWindowStateBusy, false);
- newWindow.removeEventListener("SSWindowStateReady", onSSWindowStateReady, false);
+ window.removeEventListener("SSWindowStateBusy", onSSWindowStateBusy);
+ window.removeEventListener("SSWindowStateReady", onSSWindowStateReady);
+ newWindow.removeEventListener("SSWindowStateBusy", onSSWindowStateBusy);
+ newWindow.removeEventListener("SSWindowStateReady", onSSWindowStateReady);
runNextTest();
});
}
function test_undoCloseWindow() {
let newWindow, reopenedWindow;
@@ -317,24 +317,24 @@ function test_undoCloseWindow() {
}
}
Services.ww.registerNotification(firstWindowObserver);
waitForBrowserState(lameMultiWindowState, function() {
// Close the window which isn't window
newWindow.close();
reopenedWindow = ss.undoCloseWindow(0);
- reopenedWindow.addEventListener("SSWindowStateBusy", onSSWindowStateBusy, false);
- reopenedWindow.addEventListener("SSWindowStateReady", onSSWindowStateReady, false);
+ reopenedWindow.addEventListener("SSWindowStateBusy", onSSWindowStateBusy);
+ reopenedWindow.addEventListener("SSWindowStateReady", onSSWindowStateReady);
reopenedWindow.addEventListener("load", function reopenWindowLoad() {
- reopenedWindow.removeEventListener("load", reopenWindowLoad, false);
+ reopenedWindow.removeEventListener("load", reopenWindowLoad);
- reopenedWindow.getBrowser().tabContainer.addEventListener("SSTabRestored", onSSTabRestored, false);
- }, false);
+ reopenedWindow.getBrowser().tabContainer.addEventListener("SSTabRestored", onSSTabRestored);
+ });
});
let busyEventCount = 0,
readyEventCount = 0,
tabRestoredCount = 0;
// These will listen to the reopened closed window...
function onSSWindowStateBusy(aEvent) {
busyEventCount++;
@@ -346,17 +346,17 @@ function test_undoCloseWindow() {
function onSSTabRestored(aEvent) {
if (++tabRestoredCount < 4)
return;
is(busyEventCount, 1);
is(readyEventCount, 1);
- reopenedWindow.removeEventListener("SSWindowStateBusy", onSSWindowStateBusy, false);
- reopenedWindow.removeEventListener("SSWindowStateReady", onSSWindowStateReady, false);
- reopenedWindow.gBrowser.tabContainer.removeEventListener("SSTabRestored", onSSTabRestored, false);
+ reopenedWindow.removeEventListener("SSWindowStateBusy", onSSWindowStateBusy);
+ reopenedWindow.removeEventListener("SSWindowStateReady", onSSWindowStateReady);
+ reopenedWindow.gBrowser.tabContainer.removeEventListener("SSTabRestored", onSSTabRestored);
reopenedWindow.close();
runNextTest();
}
}
--- a/suite/common/tests/browser/browser_636279.js
+++ b/suite/common/tests/browser/browser_636279.js
@@ -24,17 +24,17 @@ function test() {
TabsProgressListener.uninit();
ss.setBrowserState(stateBackup);
});
TabsProgressListener.init();
window.addEventListener("SSWindowStateReady", function onReady() {
- window.removeEventListener("SSWindowStateReady", onReady, false);
+ window.removeEventListener("SSWindowStateReady", onReady);
let firstProgress = true;
TabsProgressListener.setCallback(function (needsRestore, isRestoring) {
if (firstProgress) {
firstProgress = false;
is(isRestoring, 3, "restoring 3 tabs concurrently");
} else {
@@ -43,17 +43,17 @@ function test() {
if (0 == needsRestore) {
TabsProgressListener.unsetCallback();
waitForFocus(finish);
}
});
ss.setBrowserState(JSON.stringify(state));
- }, false);
+ });
ss.setBrowserState(JSON.stringify(statePinned));
}
function countTabs() {
let needsRestore = 0, isRestoring = 0;
let windowsEnum = Services.wm.getEnumerator("navigator:browser");
--- a/suite/common/tests/browser/browser_form_restore_events_sample.html
+++ b/suite/common/tests/browser/browser_form_restore_events_sample.html
@@ -2,23 +2,23 @@
<title>Test for form restore events (originally bug 476161)</title>
<script>
document.addEventListener("input", function(aEvent) {
var inputEl = aEvent.originalTarget;
var changedEl = document.getElementById("inputFired");
changedEl.textContent += " " + inputEl.id;
-}, false);
+});
document.addEventListener("change", function(aEvent) {
var inputEl = aEvent.originalTarget;
var changedEl = document.getElementById("changeFired");
changedEl.textContent += " " + inputEl.id;
-}, false);
+});
</script>
<!-- input events -->
<h3>Text fields with changed text</h3>
<input type="text" id="modify1">
<input type="text" id="modify2" value="preset value">
<input type="text" id="modify01">
--- a/suite/common/tests/browser/browser_markPageAsFollowedLink.js
+++ b/suite/common/tests/browser/browser_markPageAsFollowedLink.js
@@ -44,20 +44,20 @@ function test()
let frameCount = 0;
gBrowser.selectedTab.linkedBrowser.addEventListener("DOMContentLoaded",
function gBrowserDOMContentLoaded(event)
{
// Wait for all the frames.
if (frameCount++ < 2)
return;
gBrowser.selectedTab.linkedBrowser.removeEventListener("DOMContentLoaded",
- gBrowserDOMContentLoaded, false)
+ gBrowserDOMContentLoaded)
gTabLoaded = true;
maybeClickLink();
- }, false
+ }
);
}
function maybeClickLink() {
if (gTabLoaded && gLeftFrameVisited) {
// Click on the link in the left frame to cause a page load in the
// right frame.
EventUtils.sendMouseEvent({type: "click"}, "clickme", content.frames[0]);
--- a/suite/common/tests/browser/head.js
+++ b/suite/common/tests/browser/head.js
@@ -52,28 +52,28 @@ function waitForBrowserState(aState, aSe
}
// Used to add our listener to further windows so we can catch SSTabRestored
// coming from them when creating a multi-window state.
function windowObserver(aSubject, aTopic, aData) {
if (aTopic == "domwindowopened") {
let newWindow = aSubject.QueryInterface(Components.interfaces.nsIDOMWindow);
newWindow.addEventListener("load", function newWindowLoad() {
- newWindow.removeEventListener("load", newWindowLoad, false);
+ newWindow.removeEventListener("load", newWindowLoad);
if (++windowsOpen == expectedWindows) {
Services.ww.unregisterNotification(windowObserver);
windowObserving = false;
}
// Track this window so we can remove the progress listener later
windows.push(newWindow);
// Add the progress listener
newWindow.getBrowser().tabContainer.addEventListener("SSTabRestored", onSSTabRestored, true);
- }, false);
+ });
}
}
// We only want to register the notification if we expect more than 1 window
if (expectedWindows > 1) {
registerCleanupFunction(function() {
if (windowObserving) {
Services.ww.unregisterNotification(windowObserver);
@@ -133,19 +133,19 @@ function waitForSaveState(aSaveStateCall
});
observing = true;
Services.obs.addObserver(observer, topic, false);
};
function whenWindowLoaded(aWindow, aCallback) {
aWindow.addEventListener("load", function windowLoadListener() {
- aWindow.removeEventListener("load", windowLoadListener, false);
+ aWindow.removeEventListener("load", windowLoadListener);
executeSoon(function executeWhenWindowLoaded() {
aCallback(aWindow);
});
- }, false);
+ });
}
var gUniqueCounter = 0;
function r() {
return Date.now() + "-" + (++gUniqueCounter);
}
--- a/suite/common/utilityOverlay.js
+++ b/suite/common/utilityOverlay.js
@@ -309,19 +309,19 @@ function goCustomizeToolbar(toolbox)
sheetFrame.contentWindow.location.reload();
else
sheetFrame.setAttribute("src", customizeURL);
// Open the panel, but make it invisible until the iframe has loaded so
// that the user doesn't see a white flash.
panel.style.visibility = "hidden";
toolbox.addEventListener("beforecustomization", function toolboxBeforeCustom() {
- toolbox.removeEventListener("beforecustomization", toolboxBeforeCustom, false);
+ toolbox.removeEventListener("beforecustomization", toolboxBeforeCustom);
panel.style.removeProperty("visibility");
- }, false);
+ });
panel.openPopup(toolbox, "after_start", 0, 0);
return sheetFrame.contentWindow;
}
else {
return window.openDialog(customizeURL,
"",
"chrome,all,dependent",
toolbox);
--- a/suite/common/viewApplyThemeOverlay.js
+++ b/suite/common/viewApplyThemeOverlay.js
@@ -152,21 +152,21 @@ function applyThemeOnLoad()
// init globals
gApplyThemeBundle = document.getElementById("bundle_viewApplyTheme");
AddonManager.addAddonListener(gAddonListener);
reloadThemes();
removeEventListener("load", applyThemeOnLoad, false);
addEventListener("unload", applyThemeOnUnload, false);
var popup = document.getElementById("menu_viewApplyTheme_Popup");
- popup.addEventListener("DOMMenuItemActive", previewTheme, false);
- popup.addEventListener("DOMMenuItemInactive", previewTheme, false);
+ popup.addEventListener("DOMMenuItemActive", previewTheme);
+ popup.addEventListener("DOMMenuItemInactive", previewTheme);
}
function applyThemeOnUnload()
{
AddonManager.removeAddonListener(gAddonListener);
var popup = document.getElementById("menu_viewApplyTheme_Popup");
- popup.removeEventListener("DOMMenuItemActive", previewTheme, false);
- popup.removeEventListener("DOMMenuItemInactive", previewTheme, false);
+ popup.removeEventListener("DOMMenuItemActive", previewTheme);
+ popup.removeEventListener("DOMMenuItemInactive", previewTheme);
}
addEventListener("load", applyThemeOnLoad, false);
--- a/suite/common/viewSourceOverlay.js
+++ b/suite/common/viewSourceOverlay.js
@@ -1,14 +1,14 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// onload make sure we adapt what's needed for partial source
-window.addEventListener("load", onLoadViewSourceOverlay, false);
+window.addEventListener("load", onLoadViewSourceOverlay);
function onLoadViewSourceOverlay() {
if (/viewPartialSource\.xul$/.test(document.location)) {
// disable menu items that don't work since the selection is munged and
// the editor doesn't work for MathML
document.getElementById('cmd_savePage').setAttribute('disabled', 'true');
document.getElementById('cmd_editPage').setAttribute('disabled', 'true');
}
--- a/suite/common/viewZoomOverlay.js
+++ b/suite/common/viewZoomOverlay.js
@@ -327,26 +327,26 @@ var FullZoom = FullZoom || {
if (aValue > ZoomManager.MAX)
return ZoomManager.MAX;
return aValue;
}
};
/***** init and helper functions for viewZoomOverlay.xul *****/
-window.addEventListener("load", registerZoomManager, false);
-window.addEventListener("unload", unregisterZoomManager, false);
+window.addEventListener("load", registerZoomManager);
+window.addEventListener("unload", unregisterZoomManager);
function registerZoomManager() {
FullZoom.init();
var zoomBundle = document.getElementById("bundle_viewZoom");
var zoomMenu = document.getElementById("menu_zoom");
var parentMenu = zoomMenu.parentNode;
- parentMenu.addEventListener("popupshowing", updateViewMenu, false);
+ parentMenu.addEventListener("popupshowing", updateViewMenu);
// initialize menu from toolkit.zoomManager.zoomValues and assign accesskeys
var zoomFactors = ZoomManager.zoomValues;
var freeKeys = [ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' ];
var insertBefore = document.getElementById("menu_zoomInsertBefore");
var popup = insertBefore.parentNode;
for (var i = 0; i < zoomFactors.length; ++i) {
--- a/suite/extensions/debugQA/content/debugQAMenuOverlay.js
+++ b/suite/extensions/debugQA/content/debugQAMenuOverlay.js
@@ -1,22 +1,22 @@
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// "about:bloat" is available only when
// (the application is) compiled with |--enable-logrefcnt|.
if ("@mozilla.org/network/protocol/about;1?what=bloat" in Components.classes)
- window.addEventListener("load", onLoadBloat, false);
+ window.addEventListener("load", onLoadBloat);
// Unhide (and enable) the Bloat menu and its associated separator.
function onLoadBloat()
{
- window.removeEventListener("load", onLoadBloat, false);
+ window.removeEventListener("load", onLoadBloat);
// Ignore windows which don't get the Debug menu, like 'View Source'.
if (!document.getElementById("debugMenu"))
return;
// Enable the menu, only if its feature is currently active.
var envSvc = Components.classes["@mozilla.org/process/environment;1"]
.getService(Components.interfaces.nsIEnvironment);
--- a/suite/feeds/src/FeedWriter.js
+++ b/suite/feeds/src/FeedWriter.js
@@ -924,21 +924,21 @@ FeedWriter.prototype = {
this._setSubscribeUsingLabel();
// "Always use..." checkbox initial state
this._setAlwaysUseCheckedState(feedType);
this._setAlwaysUseLabel();
// We update the "Always use.." checkbox label whenever the selected item
// in the list is changed
- handlersMenuPopup.addEventListener("command", this, false);
+ handlersMenuPopup.addEventListener("command", this);
// Set up the "Subscribe Now" button
this._getUIElement("subscribeButton")
- .addEventListener("command", this, false);
+ .addEventListener("command", this);
// first-run ui
var showFirstRunUI = true;
try {
showFirstRunUI = Services.prefs.getBoolPref(PREF_SHOW_FIRST_RUN_UI);
}
catch (ex) {
}
@@ -1028,18 +1028,18 @@ FeedWriter.prototype = {
Services.prefs.addObserver(PREF_VIDEO_SELECTED_WEB, this, false);
Services.prefs.addObserver(PREF_VIDEO_SELECTED_APP, this, false);
Services.prefs.addObserver(PREF_AUDIO_SELECTED_ACTION, this, false);
Services.prefs.addObserver(PREF_AUDIO_SELECTED_READER, this, false);
Services.prefs.addObserver(PREF_AUDIO_SELECTED_WEB, this, false);
Services.prefs.addObserver(PREF_AUDIO_SELECTED_APP, this, false);
- this._window.addEventListener("load", this, false);
- this._window.addEventListener("unload", this, false);
+ this._window.addEventListener("load", this);
+ this._window.addEventListener("unload", this);
},
_writeContent: function writeContent() {
if (!this._window)
return;
try {
// Set up the feed content
@@ -1052,22 +1052,22 @@ FeedWriter.prototype = {
this._writeFeedContent(container);
}
finally {
this._removeFeedFromCache();
}
},
_close: function close() {
- this._window.removeEventListener("load", this, false);
- this._window.removeEventListener("unload", this, false);
+ this._window.removeEventListener("load", this);
+ this._window.removeEventListener("unload", this);
this._getUIElement("handlersMenuPopup")
- .removeEventListener("command", this, false);
+ .removeEventListener("command", this);
this._getUIElement("subscribeButton")
- .removeEventListener("command", this, false);
+ .removeEventListener("command", this);
this._document = null;
this._window = null;
Services.prefs.removeObserver(PREF_SELECTED_ACTION, this);
Services.prefs.removeObserver(PREF_SELECTED_READER, this);
Services.prefs.removeObserver(PREF_SELECTED_WEB, this);
Services.prefs.removeObserver(PREF_SELECTED_APP, this);
Services.prefs.removeObserver(PREF_VIDEO_SELECTED_ACTION, this);
Services.prefs.removeObserver(PREF_VIDEO_SELECTED_READER, this);
--- a/suite/mailnews/compose/MsgComposeCommands.js
+++ b/suite/mailnews/compose/MsgComposeCommands.js
@@ -1168,18 +1168,18 @@ function ComposeStartup(aParams)
}
// Set the document language to the preference as early as possible.
document.documentElement
.setAttribute("lang", getPref("spellchecker.dictionary"));
var identityList = GetMsgIdentityElement();
- document.addEventListener("paste", onPasteOrDrop, false);
- document.addEventListener("drop", onPasteOrDrop, false);
+ document.addEventListener("paste", onPasteOrDrop);
+ document.addEventListener("drop", onPasteOrDrop);
if (identityList)
FillIdentityList(identityList);
if (!params) {
// This code will go away soon as now arguments are passed to the window
// using a object of type nsMsgComposeParams instead of a string.
params = Components.classes["@mozilla.org/messengercompose/composeparams;1"]
--- a/suite/mailnews/compose/addressingWidgetOverlay.js
+++ b/suite/mailnews/compose/addressingWidgetOverlay.js
@@ -923,28 +923,28 @@ function awGetNextDummyRow()
return null;
}
function awSizerListen()
{
// when splitter is clicked, fill in necessary dummy rows each time the mouse is moved
awCalcContentHeight(); // precalculate
document.addEventListener("mousemove", awSizerMouseMove, true);
- document.addEventListener("mouseup", awSizerMouseUp, false);
+ document.addEventListener("mouseup", awSizerMouseUp);
}
function awSizerMouseMove()
{
awCreateOrRemoveDummyRows(2);
}
function awSizerMouseUp()
{
- document.removeEventListener("mousemove", awSizerMouseMove, false);
- document.removeEventListener("mouseup", awSizerMouseUp, false);
+ document.removeEventListener("mousemove", awSizerMouseMove);
+ document.removeEventListener("mouseup", awSizerMouseUp);
}
function awSizerResized(aSplitter)
{
// set the height on the listbox rather than on the toolbox
var listbox = document.getElementById("addressingWidget");
listbox.height = listbox.boxObject.height;
// remove all the heights set on the splitter's previous siblings
--- a/suite/mailnews/mailWidgets.xml
+++ b/suite/mailnews/mailWidgets.xml
@@ -1775,30 +1775,30 @@
]]>
</destructor>
</implementation>
<handlers>
<handler event="mousemove" action="this.updateHover(event);"/>
<handler event="click" button="0" action="if (this.updateHover(event) >= 0) this.fire();"/>
<handler event="popupshowing">
<![CDATA[
- this.parentNode.addEventListener("blur", this.onBlurMenuList, false);
+ this.parentNode.addEventListener("blur", this.onBlurMenuList);
var box = this.tree.treeBoxObject;
box.focused = true;
var index = this.setInitialSelection();
var height = box.view.rowCount * box.rowHeight;
height += this.boxObject.height - box.treeBody.boxObject.height;
this.height = height;
if (index >= 0)
setTimeout(function() { box.ensureRowIsVisible(index); }, 0);
]]>
</handler>
<handler event="popuphiding">
<![CDATA[
- this.parentNode.removeEventListener("blur", this.onBlurMenuList, false);
+ this.parentNode.removeEventListener("blur", this.onBlurMenuList);
]]>
</handler>
</handlers>
</binding>
<binding id="folderSummary-popup" extends="chrome://global/content/bindings/popup.xml#tooltip">
<content>
<children>
--- a/suite/mailnews/msgHdrViewOverlay.js
+++ b/suite/mailnews/msgHdrViewOverlay.js
@@ -1692,27 +1692,27 @@ function addAttachmentToPopup(popup, att
var openpopup = document.createElement('menupopup');
openpopup = item.appendChild(openpopup);
if (attachment.contentType == "text/x-moz-deleted") {
item.setAttribute('disabled', 'true');
return;
}
openpopup.attachment = attachment;
- openpopup.addEventListener('popupshowing', FillAttachmentItemPopup, false);
+ openpopup.addEventListener('popupshowing', FillAttachmentItemPopup);
setApplicationIconForAttachment(attachment, item);
}
}
}
function FillAttachmentItemPopup(event)
{
var openpopup = event.target;
var canDetach = CanDetachAttachments() && !openpopup.attachment.isExternalAttachment;
- openpopup.removeEventListener('popupshowing', FillAttachmentItemPopup, false);
+ openpopup.removeEventListener('popupshowing', FillAttachmentItemPopup);
var menuitementry = document.getElementById("context-openAttachment").cloneNode(false);
menuitementry.setAttribute('oncommand', 'this.parentNode.attachment.openAttachment();');
menuitementry = openpopup.appendChild(menuitementry);
menuitementry = document.getElementById("context-viewAttachment").cloneNode(false);
menuitementry.setAttribute('oncommand', 'this.parentNode.attachment.viewAttachment();');
menuitementry = openpopup.appendChild(menuitementry);
--- a/suite/mailnews/msgViewPickerOverlay.js
+++ b/suite/mailnews/msgViewPickerOverlay.js
@@ -413,9 +413,9 @@ function RefreshTagsPopup(aMenupopup)
function ViewPickerOnLoad()
{
var viewPickerPopup = document.getElementById("viewPickerPopup");
if (viewPickerPopup)
RefreshAllViewPopups(viewPickerPopup);
}
-window.addEventListener("load", ViewPickerOnLoad, false);
+window.addEventListener("load", ViewPickerOnLoad);
--- a/suite/mailnews/prefs/pref-tags.js
+++ b/suite/mailnews/prefs/pref-tags.js
@@ -94,17 +94,17 @@ function AppendTagEntry(aTagInfo, aRefCh
var colorCell = document.createElement('listcell');
var colorpicker = document.createElement('colorpicker');
colorpicker.setAttribute('type', 'button');
colorpicker.setAttribute('color', aTagInfo.color || 'inherit')
colorCell.appendChild(colorpicker);
var entry = document.createElement('listitem');
entry.addEventListener('focus', OnFocus, true);
- entry.addEventListener('change', OnChange, false);
+ entry.addEventListener('change', OnChange);
entry.setAttribute('allowevents', 'true'); // activate textbox and colorpicker
entry.tagInfo = aTagInfo;
entry.appendChild(tagCell);
entry.appendChild(colorCell);
gTagList.insertBefore(entry, aRefChild);
return entry;
}
--- a/suite/mailnews/tabmail.xml
+++ b/suite/mailnews/tabmail.xml
@@ -1048,40 +1048,40 @@
this.mTabMinWidth = this.mPrefs.getIntPref ("browser.tabs.tabMinWidth");
this.mTabMaxWidth = this.mPrefs.getIntPref ("browser.tabs.tabMaxWidth");
this.mTabClipWidth = this.mPrefs.getIntPref ("browser.tabs.tabClipWidth");
this.mCloseButtons = this.mPrefs.getIntPref ("browser.tabs.closeButtons");
this.firstChild.minWidth = this.mTabMinWidth;
this.firstChild.maxWidth = this.mTabMaxWidth;
this.adjustTabstrip();
this.mPrefs.addObserver("browser.tabs.", this, false);
- window.addEventListener("resize", this, false);
+ window.addEventListener("resize", this);
// Listen to overflow/underflow events on the tabstrip,
// we cannot put these as xbl handlers on the entire binding because
// they would also get called for the all-tabs popup scrollbox.
// Also, we can't rely on event.target because these are all
// anonymous nodes.
- this.mTabstrip.addEventListener("overflow", this, false);
- this.mTabstrip.addEventListener("underflow", this, false);
+ this.mTabstrip.addEventListener("overflow", this);
+ this.mTabstrip.addEventListener("underflow", this);
]]>
</constructor>
<destructor>
<![CDATA[
this.mPrefs.removeObserver("browser.tabs.", this);
// Release timer to avoid reference cycles.
if (this._animateTimer)
{
this._animateTimer.cancel();
this._animateTimer = null;
}
- this.mTabstrip.removeEventListener("overflow", this, false);
- this.mTabstrip.removeEventListener("underflow", this, false);
+ this.mTabstrip.removeEventListener("overflow", this);
+ this.mTabstrip.removeEventListener("underflow", this);
]]>
</destructor>
<field name="mPrefs">
Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefBranch);
</field>
@@ -1398,37 +1398,37 @@
aTabNode.mCorrespondingMenuitem = menuItem;
document.addBroadcastListenerFor(aTabNode, menuItem, "label");
document.addBroadcastListenerFor(aTabNode, menuItem, "crop");
document.addBroadcastListenerFor(aTabNode, menuItem, "image");
document.addBroadcastListenerFor(aTabNode, menuItem, "busy");
document.addBroadcastListenerFor(aTabNode, menuItem, "selected");
document.addBroadcastListenerFor(aTabNode, menuItem, "NewMessages");
document.addBroadcastListenerFor(aTabNode, menuItem, "BiffState");
- aTabNode.addEventListener("TabClose", this, false);
+ aTabNode.addEventListener("TabClose", this);
menuItem.tab = aTabNode;
- menuItem.addEventListener("command", this, false);
+ menuItem.addEventListener("command", this);
this.appendChild(menuItem);
return menuItem;
]]>
</body>
</method>
</implementation>
<handlers>
<handler event="popupshowing">
<![CDATA[
// set up the menu popup
let tabcontainer = document.getBindingParent(this);
let tabs = tabcontainer.childNodes;
// Listen for changes in the tab bar.
let tabbrowser = document.getBindingParent(tabcontainer);
- tabbrowser.addEventListener("TabOpen", this, false);
- tabcontainer.mTabstrip.addEventListener("scroll", this, false);
+ tabbrowser.addEventListener("TabOpen", this);
+ tabcontainer.mTabstrip.addEventListener("scroll", this);
// if an animation is in progress and the user
// clicks on the "all tabs" button, stop the animation
tabcontainer._stopAnimation();
for (let i = 0; i < tabs.length; i++)
this._createTabMenuItem(tabs[i]);
this._updateTabsVisibilityStatus();
@@ -1443,24 +1443,24 @@
let menuItem = this.lastChild;
document.removeBroadcastListenerFor(menuItem.tab, menuItem, "label");
document.removeBroadcastListenerFor(menuItem.tab, menuItem, "crop");
document.removeBroadcastListenerFor(menuItem.tab, menuItem, "image");
document.removeBroadcastListenerFor(menuItem.tab, menuItem, "busy");
document.removeBroadcastListenerFor(menuItem.tab, menuItem, "selected");
document.removeBroadcastListenerFor(menuItem.tab, menuItem, "NewMessages");
document.removeBroadcastListenerFor(menuItem.tab, menuItem, "BiffState");
- menuItem.removeEventListener("command", this, false);
- menuItem.tab.removeEventListener("TabClose", this, false);
+ menuItem.removeEventListener("command", this);
+ menuItem.tab.removeEventListener("TabClose", this);
menuItem.tab.mCorrespondingMenuitem = null;
menuItem.remove();
}
let tabcontainer = document.getBindingParent(this);
- tabcontainer.mTabstrip.removeEventListener("scroll", this, false);
- document.getBindingParent(tabcontainer).removeEventListener("TabOpen", this, false);
+ tabcontainer.mTabstrip.removeEventListener("scroll", this);
+ document.getBindingParent(tabcontainer).removeEventListener("TabOpen", this);
]]>
</handler>
<handler event="command">
<![CDATA[
let tabcontainer = document.getBindingParent(this);
tabcontainer.selectedItem = event.target.tab;
]]>
--- a/suite/modules/DownloadTaskbarProgress.jsm
+++ b/suite/modules/DownloadTaskbarProgress.jsm
@@ -185,17 +185,17 @@ var DownloadTaskbarProgressUpdater =
let taskbarProgress = this._taskbar.getTaskbarProgress(docShell);
this._activeTaskbarProgress = taskbarProgress;
this._updateTaskbar();
// _onActiveWindowUnload is idempotent, so we don't need to check whether
// we've already set this before or not.
aWindow.addEventListener("unload", function() {
DownloadTaskbarProgressUpdater._onActiveWindowUnload(taskbarProgress);
- }, false);
+ });
}
else {
this._activeTaskbarProgress = null;
}
}
},
// / Current state displayed on the active window's taskbar item
--- a/suite/modules/WindowsPreviewPerTab.jsm
+++ b/suite/modules/WindowsPreviewPerTab.jsm
@@ -125,31 +125,31 @@ function getFaviconAsImage(iconurl, priv
* The <tab> that this preview is associated with.
*/
function PreviewController(win, tab) {
this.win = win;
this.tab = tab;
this.linkedBrowser = tab.linkedBrowser;
this.preview = this.win.createTabPreview(this);
- this.tab.addEventListener("TabAttrModified", this, false);
+ this.tab.addEventListener("TabAttrModified", this);
XPCOMUtils.defineLazyGetter(this, "canvasPreview", function () {
let canvas = PageThumbs.createCanvas();
canvas.mozOpaque = true;
return canvas;
});
}
PreviewController.prototype = {
QueryInterface: XPCOMUtils.generateQI([Components.interfaces.nsITaskbarPreviewController,
Components.interfaces.nsIDOMEventListener]),
destroy: function () {
- this.tab.removeEventListener("TabAttrModified", this, false);
+ this.tab.removeEventListener("TabAttrModified", this);
// Break cycles, otherwise we end up leaking the window with everything
// attached to it.
delete this.win;
delete this.preview;
},
get wrappedJSObject() {
@@ -344,20 +344,20 @@ XPCOMUtils.defineLazyGetter(PreviewContr
*/
function TabWindow(win) {
this.win = win;
this.tabbrowser = win.getBrowser();
this.previews = new Map();
for (let i = 0; i < this.tabEvents.length; i++)
- this.tabbrowser.tabContainer.addEventListener(this.tabEvents[i], this, false);
+ this.tabbrowser.tabContainer.addEventListener(this.tabEvents[i], this);
for (let i = 0; i < this.winEvents.length; i++)
- this.win.addEventListener(this.winEvents[i], this, false);
+ this.win.addEventListener(this.winEvents[i], this);
this.tabbrowser.addTabsProgressListener(this);
AeroPeek.windows.push(this);
let tabs = this.tabbrowser.tabs;
for (let i = 0; i < tabs.length; i++)
this.newTab(tabs[i]);
@@ -373,20 +373,20 @@ TabWindow.prototype = {
destroy: function () {
this._destroying = true;
let tabs = this.tabbrowser.tabs;
this.tabbrowser.removeTabsProgressListener(this);
for (let i = 0; i < this.winEvents.length; i++)
- this.win.removeEventListener(this.winEvents[i], this, false);
+ this.win.removeEventListener(this.winEvents[i], this);
for (let i = 0; i < this.tabEvents.length; i++)
- this.tabbrowser.tabContainer.removeEventListener(this.tabEvents[i], this, false);
+ this.tabbrowser.tabContainer.removeEventListener(this.tabEvents[i], this);
for (let i = 0; i < tabs.length; i++)
this.removeTab(tabs[i]);
let idx = AeroPeek.windows.indexOf(this.win.gTaskbarTabGroup);
AeroPeek.windows.splice(idx, 1);
AeroPeek.checkPreviewCount();
},
--- a/suite/smile/test/browser_Application.js
+++ b/suite/smile/test/browser_Application.js
@@ -20,33 +20,33 @@ WindowOpenListener.prototype = {
opencallback: null,
closecallback: null,
window: null,
domwindow: null,
handleEvent: function(event) {
is(this.domwindow.document.location.href, this.url, "Should have opened the correct window");
- this.domwindow.removeEventListener("load", this, false);
+ this.domwindow.removeEventListener("load", this);
// Allow any other load handlers to execute
var self = this;
executeSoon(function() { self.opencallback(self.domwindow); } );
},
onWindowTitleChange: function(window, title) {
},
onOpenWindow: function(window) {
if (this.window)
return;
this.window = window;
this.domwindow = window.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIDOMWindow);
- this.domwindow.addEventListener("load", this, false);
+ this.domwindow.addEventListener("load", this);
},
onCloseWindow: function(window) {
if (this.window != window)
return;
Services.wm.removeListener(this);
this.opencallback = null;