Bug 1938075 - Remove inline event handler from buildOtherBookmarksFolder. r=places-reviewers,mak

Differential Revision: https://phabricator.services.mozilla.com/D232492
This commit is contained in:
Tom Schuster
2024-12-19 16:47:29 +00:00
parent 3f1e1a9678
commit 014e7c25af

View File

@@ -2237,13 +2237,14 @@ var BookmarkingUI = {
let otherBookmarksButton = document.createXULElement("toolbarbutton");
otherBookmarksButton.setAttribute("type", "menu");
otherBookmarksButton.setAttribute("container", "true");
otherBookmarksButton.setAttribute(
"onpopupshowing",
"document.getElementById('PlacesToolbar')._placesView._onOtherBookmarksPopupShowing(event);"
);
otherBookmarksButton.id = "OtherBookmarks";
otherBookmarksButton.className = "bookmark-item";
otherBookmarksButton.hidden = "true";
otherBookmarksButton.addEventListener("popupshowing", event =>
document
.getElementById("PlacesToolbar")
._placesView._onOtherBookmarksPopupShowing(event)
);
MozXULElement.insertFTLIfNeeded("browser/places.ftl");
document.l10n.setAttributes(otherBookmarksButton, "other-bookmarks-folder");