tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 22969334f8d4c67a0a85d7fc8867671b541c9c0a
parent 4ed3c83d456d6487ff97981652c42e39e3c6df6f
Author: Mark Banner <standard8@mozilla.com>
Date:   Tue, 23 Dec 2025 14:36:59 +0000

Bug 2007509 - Fix documentation generation failures due to arrow syntax in BrowserTestUtils.sys.mjs. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D277422

Diffstat:
Mtesting/mochitest/BrowserTestUtils/BrowserTestUtils.sys.mjs | 11++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/testing/mochitest/BrowserTestUtils/BrowserTestUtils.sys.mjs b/testing/mochitest/BrowserTestUtils/BrowserTestUtils.sys.mjs @@ -87,6 +87,15 @@ registerActors(); * @class */ export var BrowserTestUtils = { + // We define the function separately, rather than using an arrow function + // inline due to https://github.com/jsdoc/jsdoc/issues/2143. + /** + * @template T + * @typedef {Function} withNewTabTaskFn + * @param {MozBrowser} browser + * @returns {Promise<T> | T} + */ + /** * Loads a page in a new tab, executes a Task and closes the tab. * @@ -99,7 +108,7 @@ export var BrowserTestUtils = { * be opened, * @param {string} options.url * The URL of the page to load. - * @param {(browser: MozBrowser) => T} taskFn + * @param {withNewTabTaskFn<T>} taskFn * Async function representing that will be executed while * the tab is loaded. The first argument passed to the function is a * reference to the browser object for the new tab.