From 99b59852d22c91a9451c52a30dcae494abb7b289 Mon Sep 17 00:00:00 2001 From: Simon Friedberger Date: Wed, 20 Nov 2024 11:10:43 +0000 Subject: [PATCH] Bug 1932329. Describe small logic error. r=arai Differential Revision: https://phabricator.services.mozilla.com/D229456 --- browser/modules/BrowserWindowTracker.sys.mjs | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/browser/modules/BrowserWindowTracker.sys.mjs b/browser/modules/BrowserWindowTracker.sys.mjs index 987a7b092039..3ce789694bef 100644 --- a/browser/modules/BrowserWindowTracker.sys.mjs +++ b/browser/modules/BrowserWindowTracker.sys.mjs @@ -175,11 +175,17 @@ export const BrowserWindowTracker = { /** * Get the most recent browser window. * - * @param options an object accepting the arguments for the search. - * * private: true to restrict the search to private windows - * only, false to restrict the search to non-private only. - * Omit the property to search in both groups. - * * allowPopups: true if popup windows are permissable. + * @param {Object} options - An object accepting the arguments for the search. + * @param {boolean} [options.private] + * true to only search for private windows. + * false to restrict the search to non-private windows. + * If the property is not provided, search for either. If permanent private + * browsing is enabled this option will be ignored! + * @param {boolean} [options.allowPopups]: true if popup windows are + * permitted. + * + * @returns {Window | null} The current top/selected window. + * Can return null on MacOS when there is no open window. */ getTopWindow(options = {}) { for (let win of _trackedWindows) {