commit dde0952bd6f442b6891fea91cfba17ee34bf490b parent fde74f7d411e9252826cc3fcba6de89953c2b5fe Author: Mark Banner <standard8@mozilla.com> Date: Fri, 17 Oct 2025 09:52:34 +0000 Bug 1994217 - Enable ESLint rule jsdoc/no-bad-blocks on the rest of the tree. r=frontend-codestyle-reviewers,Gijs This is mainly automatic changes, with some manual fixes to move text off of the first line. Differential Revision: https://phabricator.services.mozilla.com/D268570 Diffstat:
71 files changed, 154 insertions(+), 134 deletions(-)
diff --git a/accessible/tests/browser/caching_granularity/head.js b/accessible/tests/browser/caching_granularity/head.js @@ -56,7 +56,7 @@ function verifyAttributeCachedNoRetry(accessible, attribute) { } } -/* +/** * @callback QueryCallback A function taking no arguments that queries an * attribute that may be cached, e.g., bounds, state */ diff --git a/browser/actors/FormValidationParent.sys.mjs b/browser/actors/FormValidationParent.sys.mjs @@ -139,7 +139,7 @@ export class FormValidationParent extends JSWindowActorParent { this._panel = null; } - /* + /** * Shows the form validation popup at a specified position or updates the * messaging and position if the popup is already displayed. * diff --git a/browser/actors/SearchSERPTelemetryChild.sys.mjs b/browser/actors/SearchSERPTelemetryChild.sys.mjs @@ -1285,7 +1285,8 @@ class DomainExtractor { } } - /* Given a list of elements, examine the text content for each element, which + /** + * Given a list of elements, examine the text content for each element, which * may be 1) a URL from which we can extract a domain or 2) text we can fix * up to create a best guess as to a URL. If either condition is met, we add * the domain to the result set. diff --git a/browser/base/content/browser-siteProtections.js b/browser/base/content/browser-siteProtections.js @@ -215,7 +215,7 @@ class ProtectionCategory { }; } - /* + /** * Return the number items blocked by this blocker. * @returns {Integer} count - The number of items blocked. */ @@ -1360,7 +1360,7 @@ let cookieBannerHandling = new (class { ); } - /* + /** * @returns {string} - Base domain (eTLD + 1) used for clearing site data. */ get #currentBaseDomain() { diff --git a/browser/components/asrouter/modules/ASRouterTriggerListeners.sys.mjs b/browser/components/asrouter/modules/ASRouterTriggerListeners.sys.mjs @@ -319,7 +319,8 @@ export const ASRouterTriggerListeners = new Map([ } }, - /* _updateVisits - Record visit timestamps for websites that match `this._hosts` and only + /** + * _updateVisits - Record visit timestamps for websites that match `this._hosts` and only * if it's been more than FEW_MINUTES since the last visit. * @param {string} host - Location host of current selected tab * @returns {boolean} - If the new visit has been recorded diff --git a/browser/components/tabbrowser/SmartTabGrouping.sys.mjs b/browser/components/tabbrowser/SmartTabGrouping.sys.mjs @@ -350,7 +350,7 @@ export class SmartTabGroupingManager { .filter(i => !excludedTabIndices.includes(i)); } - /* + /** * Generates similar tabs a grouped list of tabs * @param {array} allTabs all tabs that are part of the window * @param {array} groupedIndices indices of tabs that are already part of the group @@ -990,7 +990,7 @@ export class SmartTabGroupingManager { }); } - /*** + /** * Utility function that loads all required engines for Smart Tab Grouping and any dependent models * @param {(progress: { percentage: number }) => void} progressCallback callback function to call. * Callback passes a dict with percentage indicating best effort 0.0-100.0 progress in model download. diff --git a/browser/modules/FaviconLoader.sys.mjs b/browser/modules/FaviconLoader.sys.mjs @@ -339,7 +339,7 @@ class FaviconLoad { } } -/* +/** * Extract the icon width from the size attribute. It also sends the telemetry * about the size type and size dimension info. * @@ -382,7 +382,7 @@ function extractIconSize(aSizes) { return width; } -/* +/** * Get link icon URI from a link dom node. * * @param {DOMNode} aLink A link dom node. @@ -423,7 +423,7 @@ function guessType(icon) { return icon.type == "image/vnd.microsoft.icon" ? TYPE_ICO : icon.type || ""; } -/* +/** * Selects the best rich icon and tab icon from a list of IconInfo objects. * * @param {Array} iconInfos A list of IconInfo objects. diff --git a/browser/modules/URILoadingHelper.sys.mjs b/browser/modules/URILoadingHelper.sys.mjs @@ -345,7 +345,8 @@ function _createNullPrincipalFromTabUserContextId(tab = null) { } export const URILoadingHelper = { - /* openLinkIn opens a URL in a place specified by the parameter |where|. + /** + * openLinkIn opens a URL in a place specified by the parameter |where|. * * The params object is the same as for `openLinkIn` and documented below. * @@ -666,7 +667,7 @@ export const URILoadingHelper = { targetBrowser.focus(); } }, - /* + /** * Resolve the initial browser window to use for a load, based on `where`. * * @param {string} where diff --git a/browser/modules/WindowsPreviewPerTab.sys.mjs b/browser/modules/WindowsPreviewPerTab.sys.mjs @@ -133,7 +133,7 @@ function getFaviconAsImage(iconurl, privateMode, callback) { // PreviewController -/* +/** * This class manages the behavior of thumbnails and previews. It has the following * responsibilities: * 1) responding to requests from Windows taskbar for a thumbnail or window @@ -349,7 +349,7 @@ PreviewController.prototype = { // TabWindow -/* +/** * This class monitors a browser window for changes to its tabs * * @param win diff --git a/devtools/client/debugger/src/actions/sources/blackbox.js b/devtools/client/debugger/src/actions/sources/blackbox.js @@ -168,7 +168,7 @@ async function toggleBreakpointsInBlackboxedSources({ } } -/* +/** * Blackboxes a group of sources together * * @param {Array} sourcesToBlackBox - The list of sources to blackbox diff --git a/devtools/client/debugger/src/utils/memoizableAction.js b/devtools/client/debugger/src/utils/memoizableAction.js @@ -5,7 +5,7 @@ import { asSettled } from "./async-value"; import { validateContext } from "./context"; -/* +/** * memoizableActon is a utility for actions that should only be performed * once per key. It is useful for loading sources * diff --git a/devtools/client/debugger/src/utils/source.js b/devtools/client/debugger/src/utils/source.js @@ -219,7 +219,8 @@ export function getTruncatedFileName(source) { return truncateMiddleText(source.longName, 30); } -/* Gets path for files with same filename for editor tabs, breakpoints, etc. +/** + * Gets path for files with same filename for editor tabs, breakpoints, etc. * Pass the source, and list of other sources * * @memberof utils/source diff --git a/devtools/client/debugger/src/utils/tabs.js b/devtools/client/debugger/src/utils/tabs.js @@ -2,7 +2,7 @@ * 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/>. */ -/* +/** * Finds the hidden tabs by comparing the tabs' top offset. * hidden tabs will have a great top offset. * diff --git a/devtools/client/debugger/test/mochitest/browser_dbg-tabs-without-urls.js b/devtools/client/debugger/test/mochitest/browser_dbg-tabs-without-urls.js @@ -35,7 +35,7 @@ add_task(async function () { is(countTabs(dbg), 1, "The eval source tab is no longer available"); }); -/* +/** * Get the tab content for the specific tab * * @param {Number} index - index of the tab to get the source content diff --git a/devtools/client/debugger/test/mochitest/shared-head.js b/devtools/client/debugger/test/mochitest/shared-head.js @@ -857,7 +857,7 @@ function waitForLoadedSource(dbg, url) { ); } -/* +/** * Selects the source node for a specific source * from the source tree. * @@ -896,7 +896,7 @@ async function selectSourceFromSourceTreeWithIndex( ); } -/* +/** * Trigger a context menu in the debugger source tree * * @param {Object} dbg @@ -1548,7 +1548,7 @@ function type(dbg, string) { string.split("").forEach(char => EventUtils.synthesizeKey(char, {}, dbg.win)); } -/* +/** * Checks to see if the inner element is visible inside the editor. * * @memberof mochitest/helpers @@ -1562,7 +1562,7 @@ function isVisibleInEditor(dbg, element) { return isVisible(findElement(dbg, "codeMirror"), element); } -/* +/** * Checks to see if the inner element is visible inside the * outer element. * @@ -1739,7 +1739,7 @@ function assertTextContentOnLine(dbg, line, expectedTextContent) { is(textContent, expectedTextContent, `Expected text content on line ${line}`); } -/* +/** * Assert that no breakpoint is set on a given line of * the currently selected source in the editor. * @@ -1755,7 +1755,7 @@ async function assertNoBreakpoint(dbg, line) { ok(!exists, `Breakpoint doesn't exists on line ${line}`); } -/* +/** * Assert that a regular breakpoint is set in the currently * selected source in the editor. (no conditional, nor log breakpoint) * @@ -1781,7 +1781,7 @@ async function assertBreakpoint(dbg, line) { ok(!hasLogClass, `Regular breakpoint doesn't have log on line ${line}`); } -/* +/** * Assert that a conditionnal breakpoint is set. * * @memberof mochitest/helpers @@ -1807,7 +1807,7 @@ async function assertConditionBreakpoint(dbg, line) { ); } -/* +/** * Assert that a log breakpoint is set. * * @memberof mochitest/helpers diff --git a/devtools/client/framework/test/head.js b/devtools/client/framework/test/head.js @@ -85,7 +85,8 @@ function synthesizeKeyElement(el) { EventUtils.synthesizeKey(key, mod, el.ownerDocument.defaultView); } -/* Check the toolbox host type and prefs to make sure they match the +/** + * Check the toolbox host type and prefs to make sure they match the * expected values * @param {Toolbox} * @param {HostType} hostType diff --git a/devtools/client/framework/toolbox-tabs-order-manager.js b/devtools/client/framework/toolbox-tabs-order-manager.js @@ -224,7 +224,7 @@ function sortPanelDefinitions(definitions) { }); } -/* +/** * This function returns absolute tab ids that were merged the both ids that are in * preference and tabs. * Some tabs added with add-ons etc show/hide depending on conditions. diff --git a/devtools/client/fronts/root.js b/devtools/client/fronts/root.js @@ -299,7 +299,7 @@ class RootFront extends FrontClassWithSpec(rootSpec) { return this.request(packet); } - /* + /** * This function returns a protocol.js Front for any root actor. * i.e. the one directly served from RootActor.listTabs or getRoot. * @@ -317,7 +317,7 @@ class RootFront extends FrontClassWithSpec(rootSpec) { return front; } - /* + /** * This function returns true if the root actor has a registered global actor * with a given name. * @param {String} actorName diff --git a/devtools/client/inspector/animation/components/keyframes-graph/ComputedStylePath.js b/devtools/client/inspector/animation/components/keyframes-graph/ComputedStylePath.js @@ -17,7 +17,7 @@ const { toPathString, } = require("resource://devtools/client/inspector/animation/utils/graph-helper.js"); -/* +/** * This class is an abstraction for computed style path of keyframes. * Subclass of this should implement the following methods: * diff --git a/devtools/client/inspector/computed/computed.js b/devtools/client/inspector/computed/computed.js @@ -989,7 +989,7 @@ class CssComputedView { } class PropertyInfo { - /* + /** * @param {CssComputedView} tree * The CssComputedView instance we are working with. * @param {String} name @@ -1023,7 +1023,7 @@ class PropertyInfo { * A container to give easy access to property data from the template engine. */ class PropertyView { - /* + /** * @param {CssComputedView} tree * The CssComputedView instance we are working with. * @param {String} name diff --git a/devtools/client/inspector/markup/views/markup-container.js b/devtools/client/inspector/markup/views/markup-container.js @@ -48,7 +48,7 @@ MarkupContainer.prototype = { return this.markup.undo; }, - /* + /** * Initialize the MarkupContainer. Should be called while one * of the other contain classes is instantiated. * diff --git a/devtools/client/inspector/rules/views/class-list-previewer.js b/devtools/client/inspector/rules/views/class-list-previewer.js @@ -18,7 +18,7 @@ const { debounce } = require("resource://devtools/shared/debounce.js"); * used to toggle classes on the current node selection, and add new classes. */ class ClassListPreviewer { - /* + /** * @param {Inspector} inspector * The current inspector instance. * @param {DomNode} containerEl diff --git a/devtools/client/shared/key-shortcuts.js b/devtools/client/shared/key-shortcuts.js @@ -81,7 +81,7 @@ function KeyShortcuts({ window, target }) { this.target.addEventListener("keydown", this); } -/* +/** * Parse an electron-like key string and return a normalized object which * allow efficient match on DOM key event. The normalized object matches DOM * API. @@ -195,7 +195,7 @@ KeyShortcuts.stringifyShortcut = function (shortcut) { return list.join("+"); }; -/* +/** * Converts an Electron accelerator string into * a pretty Unicode-based hotkey string * diff --git a/devtools/client/shared/stylesheet-utils.js b/devtools/client/shared/stylesheet-utils.js @@ -11,7 +11,7 @@ function stylesheetLoadPromise(styleSheet) { }); } -/* +/** * Put the DevTools theme stylesheet into the provided chrome document. * * @param {Document} doc diff --git a/devtools/client/shared/test/shared-head.js b/devtools/client/shared/test/shared-head.js @@ -1523,7 +1523,7 @@ function createTestHTTPServer() { return server; } -/* +/** * Register an actor in the content process of the current tab. * * Calling ActorRegistry.registerModule only registers the actor in the current process. @@ -2533,7 +2533,7 @@ function getNetmonitorContextMenuItem(monitor, id) { return Menu.getMenuElementById(id, monitor.panelWin.document); } -/* +/** * Selects and clicks the context menu item of the netmonitor, it should * also wait for the popup to close. * @param {Object} monitor diff --git a/devtools/client/shared/widgets/tooltip/ImageTooltipHelper.js b/devtools/client/shared/widgets/tooltip/ImageTooltipHelper.js @@ -123,7 +123,7 @@ function setImageTooltip(tooltip, doc, imageUrl, options) { tooltip.setContentSize({ width, height }); } -/* +/** * Set the tooltip content of a provided HTMLTooltip instance to display a * fallback error message when an image preview tooltip can not be displayed. * diff --git a/devtools/client/styleeditor/test/browser_styleeditor_media_sidebar_links.js b/devtools/client/styleeditor/test/browser_styleeditor_media_sidebar_links.js @@ -3,8 +3,10 @@ "use strict"; -/* Tests responsive mode links for - * @media sidebar width and height related conditions */ +/** + * Tests responsive mode links for `@media` sidebar width and height related + * conditions. + */ loader.lazyRequireGetter( this, diff --git a/devtools/client/webconsole/browser-console.js b/devtools/client/webconsole/browser-console.js @@ -35,7 +35,7 @@ class BrowserConsole extends WebConsole { #bcInitializer = null; #bcDestroyer = null; #telemetry; - /* + /** * @constructor * @param object commands * The commands object with all interfaces defined from devtools/shared/commands/ diff --git a/devtools/client/webconsole/webconsole.js b/devtools/client/webconsole/webconsole.js @@ -49,7 +49,7 @@ const isMacOS = Services.appinfo.OS === "Darwin"; * UI and features. */ class WebConsole { - /* + /** * @constructor * @param object toolbox * The toolbox where the web console is displayed. diff --git a/devtools/server/actors/source.js b/devtools/server/actors/source.js @@ -611,7 +611,7 @@ class SourceActor extends Actor { this.pausePoints = uncompressed; } - /* + /** * Ensure the given BreakpointActor is set as a breakpoint handler on all * scripts that match its location in the generated source. * diff --git a/devtools/server/actors/watcher.js b/devtools/server/actors/watcher.js @@ -218,7 +218,7 @@ exports.WatcherActor = class WatcherActor extends Actor { super.destroy(); } - /* + /** * Get the list of the currently watched resources for this watcher. * * @return Array<String> diff --git a/devtools/server/actors/webbrowser.js b/devtools/server/actors/webbrowser.js @@ -469,7 +469,7 @@ BrowserTabList.prototype._checkListening = function () { ); }; -/* +/** * Add or remove event listeners for all XUL windows. * * @param shouldListen boolean diff --git a/devtools/server/actors/webconsole/commands/manager.js b/devtools/server/actors/webconsole/commands/manager.js @@ -890,7 +890,7 @@ WebConsoleCommandsManager.register({ validArguments: ["url"], }); -/* +/** * Unblock a blocked a resource * * @param object filter @@ -920,7 +920,7 @@ WebConsoleCommandsManager.register({ validArguments: ["url"], }); -/* +/** * Toggle JavaScript tracing * * @param object args diff --git a/devtools/server/devtools-server-connection.js b/devtools/server/devtools-server-connection.js @@ -280,7 +280,7 @@ DevToolsServerConnection.prototype = { /* Forwarding packets to other transports based on actor name prefixes. */ - /* + /** * Arrange to forward packets to another server. This is how we * forward debugging connections to child processes. * diff --git a/devtools/shared/commands/network/network-command.js b/devtools/shared/commands/network/network-command.js @@ -42,7 +42,7 @@ class NetworkCommand { return { channelId }; } - /* + /** * Get the list of blocked URL filters. * * A URL filter is a RegExp string so that one filter can match many URLs. diff --git a/devtools/shared/layout/utils.js b/devtools/shared/layout/utils.js @@ -454,7 +454,7 @@ exports.isTemplateElement = isTemplateElement; const isShadowRoot = node => node.containingShadowRoot == node; exports.isShadowRoot = isShadowRoot; -/* +/** * Gets the shadow root mode (open or closed). * * @param {DOMNode} node diff --git a/devtools/shared/loader/browser-loader.sys.mjs b/devtools/shared/loader/browser-loader.sys.mjs @@ -68,7 +68,7 @@ const REACT_ESM_MODULES = new Set([ const browserBasedDirsRegExp = /^resource\:\/\/devtools\/client\/\S*\/components\//; -/* +/** * Create a loader to be used in a browser environment. This evaluates * modules in their own environment, but sets window (the normal * global object) as the sandbox prototype, so when a variable is not diff --git a/devtools/shared/protocol/Front.js b/devtools/shared/protocol/Front.js @@ -171,7 +171,7 @@ class Front extends Pool { } } - /* + /** * Listen for the creation and/or destruction of fronts matching one of the provided types. * * @param {String} typeName diff --git a/dom/animation/test/testcommon.js b/dom/animation/test/testcommon.js @@ -427,7 +427,7 @@ function addSVGElement(target, tag, attrs) { return element; } -/* +/** * Get Animation distance between two specified values for a specific property. * * @param target The target element. diff --git a/dom/media/webrtc/tests/mochitests/parser_rtp.js b/dom/media/webrtc/tests/mochitests/parser_rtp.js @@ -4,7 +4,7 @@ "use strict"; -/* +/** * Parses an RTP packet * @param buffer an ArrayBuffer that contains the packet * @return { type: "rtp", header: {...}, payload: a DataView } diff --git a/dom/push/PushDB.sys.mjs b/dom/push/PushDB.sys.mjs @@ -79,7 +79,7 @@ PushDB.prototype = { } }, - /* + /** * @param aRecord * The record to be added. */ @@ -116,7 +116,7 @@ PushDB.prototype = { ); }, - /* + /** * @param aKeyID * The ID of record to be deleted. */ diff --git a/dom/smil/test/smilTestUtils.js b/dom/smil/test/smilTestUtils.js @@ -587,7 +587,7 @@ AnimTestcaseFrom.prototype = { }; extend(AnimTestcaseFrom, AnimTestcase); -/* +/** * A testcase for a simple "from-to" animation * @param aFrom The 'from' value * @param aTo The 'to' value @@ -628,7 +628,7 @@ AnimTestcaseFromTo.prototype = { }; extend(AnimTestcaseFromTo, AnimTestcaseFrom); -/* +/** * A testcase for a simple "from-by" animation. * * @param aFrom The 'from' value @@ -695,7 +695,7 @@ AnimTestcaseFromBy.prototype = { }; extend(AnimTestcaseFromBy, AnimTestcaseFrom); -/* +/** * A testcase for a "paced-mode" animation * @param aValues An array of values, to be used as the "Values" list * @param aComputedValMap A hash-map that contains some computed values, @@ -838,7 +838,7 @@ AnimTestcasePaced.prototype = { }; extend(AnimTestcasePaced, AnimTestcase); -/* +/** * A testcase for an <animateMotion> animation. * * @param aAttrValueHash A hash-map mapping attribute names to values. diff --git a/eslint-rollouts.config.mjs b/eslint-rollouts.config.mjs @@ -304,7 +304,19 @@ export default [ "widget/tests/window_composition_text_querycontent.xhtml", ], ignores: ["devtools/startup/**"], - rules: mozilla.turnOff(mozilla.configs["flat/valid-jsdoc"].rules), + rules: { + "jsdoc/check-access": "off", + "jsdoc/check-param-names": "off", + "jsdoc/check-property-names": "off", + "jsdoc/check-tag-names": "off", + "jsdoc/check-types": "off", + "jsdoc/empty-tags": "off", + "jsdoc/no-multi-asterisks": "off", + "jsdoc/require-param-type": "off", + "jsdoc/require-returns-type": "off", + "jsdoc/tag-lines": ["off", "any", { startLines: 1 }], + "jsdoc/valid-types": "off", + }, }, { name: "rollout-require-jsdoc", diff --git a/layout/style/test/test_flexbox_child_display_values.xhtml b/layout/style/test/test_flexbox_child_display_values.xhtml @@ -28,7 +28,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=783415 * specified display-value.) */ -/* +/** * Utility function for getting computed style of "display". * * @arg aElem The element to query for its computed "display" value. @@ -38,7 +38,7 @@ function getComputedDisplay(aElem) { return window.getComputedStyle(aElem).display; } -/* +/** * Function used for testing a given specified "display" value and checking * its computed value against expectations. * diff --git a/services/common/hawkclient.sys.mjs b/services/common/hawkclient.sys.mjs @@ -73,7 +73,7 @@ ChromeUtils.defineLazyGetter(lazy, "logPII", function () { } }); -/* +/** * A general purpose client for making HAWK authenticated requests to a single * host. Keeps track of the clock offset between the client and the host for * computation of the timestamp in the HAWK Authorization header. @@ -93,7 +93,7 @@ export var HawkClient = function (host) { }; HawkClient.prototype = { - /* + /** * Construct an error message for a response. Private. * * @param restResponse @@ -130,7 +130,7 @@ HawkClient.prototype = { return errorObj; }, - /* + /** * * Update clock offset by determining difference from date gives in the (RFC * 1123) Date header of a server response. Because HAWK tolerates a window @@ -175,7 +175,8 @@ HawkClient.prototype = { return Date.now(); }, - /* A general method for sending raw RESTRequest calls authorized using HAWK + /** + * A general method for sending raw RESTRequest calls authorized using HAWK. * * @param path * API endpoint path diff --git a/services/fxaccounts/FxAccountsOAuth.sys.mjs b/services/fxaccounts/FxAccountsOAuth.sys.mjs @@ -65,7 +65,7 @@ export class FxAccountsOAuth { this.#flow = {}; } - /* + /** * Gets a stored flow * @param { string } state: The base-64 URL-safe state string that was created at the start of the flow * @returns { Object }: The values initially stored when startign th eoauth flow diff --git a/services/sync/modules/bridged_engine.sys.mjs b/services/sync/modules/bridged_engine.sys.mjs @@ -108,7 +108,7 @@ class BridgedRecord extends RawCryptoWrapper { return cleartext; } - /* + /** * Converts this incoming record into an envelope to pass to a bridged engine. * This object must be kept in sync with `sync15::IncomingBso`. * diff --git a/services/sync/modules/engines.sys.mjs b/services/sync/modules/engines.sys.mjs @@ -2120,7 +2120,7 @@ SyncEngine.prototype = { return changes; }, - /* + /** * Returns a changeset containing entries for all currently tracked items. * The default implementation returns a changeset with timestamps indicating * when the item was added to the tracker. diff --git a/testing/docs/eventutils.rst b/testing/docs/eventutils.rst @@ -13,33 +13,33 @@ functions. Mouse input ----------- -.. js:autofunction:: sendMouseEvent +.. js:autofunction:: EventUtils.sendMouseEvent .. js:autofunction:: EventUtils.synthesizeMouse -.. js:autofunction:: synthesizeMouseAtCenter -.. js:autofunction:: synthesizeNativeMouseEvent -.. js:autofunction:: synthesizeMouseExpectEvent +.. js:autofunction:: EventUtils.synthesizeMouseAtCenter +.. js:autofunction:: EventUtils.synthesizeNativeMouseEvent +.. js:autofunction:: EventUtils.synthesizeMouseExpectEvent -.. js:autofunction:: synthesizeWheel +.. js:autofunction:: EventUtils.synthesizeWheel .. js:autofunction:: EventUtils.synthesizeWheelAtPoint -.. js:autofunction:: sendWheelAndPaint -.. js:autofunction:: sendWheelAndPaintNoFlush +.. js:autofunction:: EventUtils.sendWheelAndPaint +.. js:autofunction:: EventUtils.sendWheelAndPaintNoFlush Keyboard input -------------- -.. js:autofunction:: sendKey +.. js:autofunction:: EventUtils.sendKey .. js:autofunction:: EventUtils.sendChar -.. js:autofunction:: sendString +.. js:autofunction:: EventUtils.sendString .. js:autofunction:: EventUtils.synthesizeKey -.. js:autofunction:: synthesizeNativeKey -.. js:autofunction:: synthesizeKeyExpectEvent +.. js:autofunction:: EventUtils.synthesizeNativeKey +.. js:autofunction:: EventUtils.synthesizeKeyExpectEvent Drag and drop ------------- -.. js:autofunction:: synthesizeDragOver -.. js:autofunction:: synthesizeDrop -.. js:autofunction:: synthesizeDropAfterDragOver -.. js:autofunction:: synthesizePlainDragAndDrop -.. js:autofunction:: synthesizePlainDragAndCancel -.. js:autofunction:: sendDragEvent +.. js:autofunction:: EventUtils.synthesizeDragOver +.. js:autofunction:: EventUtils.synthesizeDrop +.. js:autofunction:: EventUtils.synthesizeDropAfterDragOver +.. js:autofunction:: EventUtils.synthesizePlainDragAndDrop +.. js:autofunction:: EventUtils.synthesizePlainDragAndCancel +.. js:autofunction:: EventUtils.sendDragEvent diff --git a/testing/mochitest/tests/SimpleTest/EventUtils.js b/testing/mochitest/tests/SimpleTest/EventUtils.js @@ -694,7 +694,7 @@ function synthesizeMouse( ); } -/* +/** * Synthesize a mouse event in `aWindow` at a point. * * `nsIDOMWindowUtils.sendMouseEvent` takes floats for the coordinates. @@ -898,7 +898,7 @@ function synthesizeMouseAtPoint( return defaultPrevented; } -/* +/** * Synthesize a mouse event at the center of `aTarget`. * * Note that additional events may be fired as a result of this call. For diff --git a/testing/mochitest/tests/SimpleTest/SimpleTest.js b/testing/mochitest/tests/SimpleTest/SimpleTest.js @@ -1081,7 +1081,7 @@ const kTextHtmlPrefixClipboardDataWindows = const kTextHtmlSuffixClipboardDataWindows = "<!--EndFragment-->\n</body>\n</html>"; -/* +/** * Polls the clipboard waiting for the expected value. A known value different than * the expected value is put on the clipboard first (and also polled for) so we * can be sure the value we get isn't just the expected value because it was already diff --git a/toolkit/actors/ContentMetaChild.sys.mjs b/toolkit/actors/ContentMetaChild.sys.mjs @@ -24,7 +24,7 @@ const PREVIEW_IMAGE_RULES = [ "og:image:secure_url", ]; -/* +/** * Checks if the incoming meta tag has a greater score than the current best * score by checking the index of the meta tag in the list of rules provided. * @@ -42,7 +42,7 @@ function shouldExtractMetadata(aRules, aTag, aEntry) { return aRules.indexOf(aTag) > aEntry.currMaxScore; } -/* +/** * Ensure that the preview image URL is safe and valid before storing * * @param {URL} aURL diff --git a/toolkit/components/aboutmemory/content/aboutMemory.js b/toolkit/components/aboutmemory/content/aboutMemory.js @@ -2276,7 +2276,7 @@ function formatPercentage(aPerc100x) { return formatNum(aPerc100x / 10000, kPercFormatter); } -/* +/** * Converts a tree fraction to an appropriate string representation. * * @param aNum diff --git a/toolkit/components/downloads/DownloadCore.sys.mjs b/toolkit/components/downloads/DownloadCore.sys.mjs @@ -887,7 +887,7 @@ Download.prototype = { return this._promiseConfirmBlock; }, - /* + /** * Launches the file after download has completed. This can open * the file with the default application for the target MIME type * or file extension, or with a custom application if launcherPath @@ -921,7 +921,7 @@ Download.prototype = { return lazy.DownloadIntegration.launchDownload(this, options); }, - /* + /** * Shows the folder containing the target file, or where the target file * will be saved. This may be called at any time, even if the download * failed or is currently in progress. diff --git a/toolkit/components/nimbus/test/unit/test_ExperimentManager_prefs.js b/toolkit/components/nimbus/test/unit/test_ExperimentManager_prefs.js @@ -2772,7 +2772,7 @@ async function test_restorePrefs_manifestChanged() { }); } - /* + /** * Test that enrollments end when the manifest is sufficiently changed and * that the appropriate telemetry is submitted. * diff --git a/toolkit/components/passwordmgr/test/mochitest/pwmgr_common.js b/toolkit/components/passwordmgr/test/mochitest/pwmgr_common.js @@ -1126,7 +1126,7 @@ function setContentForTask(html) { return content.firstElementChild; } -/* +/** * Set preferences via SpecialPowers.pushPrefEnv and reset them after current * task has finished. * diff --git a/toolkit/components/telemetry/dap/DAPTelemetrySender.sys.mjs b/toolkit/components/telemetry/dap/DAPTelemetrySender.sys.mjs @@ -239,7 +239,7 @@ export const DAPTelemetrySender = new (class { } } - /* + /** * @typedef {object} AggregatorKeys * @property {Uint8Array} leader_hpke - The leader's DAP HPKE key. * @property {Uint8Array} helper_hpke - The helper's DAP HPKE key. diff --git a/toolkit/content/aboutTelemetry.js b/toolkit/content/aboutTelemetry.js @@ -1442,7 +1442,7 @@ var Search = { }, }; -/* +/** * Helper function to render JS objects with white space between top level elements * so that they look better in the browser * @param aObject JavaScript object or array to render diff --git a/toolkit/content/customElements.js b/toolkit/content/customElements.js @@ -236,7 +236,7 @@ } } } - /* + /** * A declarative way to wire up attribute inheritance and automatically generate * the `observedAttributes` getter. For example, if you returned: * { @@ -346,7 +346,7 @@ } } - /* + /** * Implements attribute value inheritance by child elements. * * @param {array} list diff --git a/toolkit/crashreporter/test/unit/head_crashreporter.js b/toolkit/crashreporter/test/unit/head_crashreporter.js @@ -15,7 +15,7 @@ function sendCommandAsync(command) { }); } -/* +/** * Run an xpcshell subprocess and crash it. * * @param setup @@ -254,7 +254,7 @@ async function do_triggered_content_crash(trigger, callback) { } } -/* +/** * Run the `crash` backgroundtask subprocess, crashing it in the * specified manner. * diff --git a/toolkit/modules/NewTabUtils.sys.mjs b/toolkit/modules/NewTabUtils.sys.mjs @@ -956,7 +956,7 @@ var ActivityStreamProvider = { ); }, - /* + /** * Gets the top frecent sites for Activity Stream. * * @param {Object} aOptions diff --git a/toolkit/modules/subprocess/subprocess_unix.worker.js b/toolkit/modules/subprocess/subprocess_unix.worker.js @@ -481,7 +481,7 @@ class Process extends BaseProcess { * process termination. * */ class ManagedProcess extends BaseProcess { - /* + /** * Connect to an already running process that was spawned externally, * through numeric stdin/stdout/stderr file descriptors. * @@ -542,7 +542,7 @@ class ManagedProcess extends BaseProcess { } } - /* + /** * A ManagedProcess is already running, so here the spawn just performs the * connection of the file descriptors received. * diff --git a/toolkit/modules/tests/xpcshell/test_GMPInstallManager.js b/toolkit/modules/tests/xpcshell/test_GMPInstallManager.js @@ -1893,7 +1893,7 @@ function setupContentSigTestPrefs() { return Preferences.get(GMPPrefs.KEY_URL_OVERRIDE, ""); } -/*** +/** * Revert prefs used for content signature tests. * * @param previousUrlOverride - The GMP URL override value prior to test being @@ -1909,7 +1909,7 @@ function revertContentSigTestPrefs(previousUrlOverride) { Preferences.set("media.gmp-manager.checkContentSignature", false); } -/*** +/** * A helper to check that glean metrics have expected counts. * @param expectedGleanValues a object that has properties with names set to glean metrics to be checked * and the values are the expected count. Eg { cert_pin_success: 1 }. @@ -1932,7 +1932,7 @@ function checkGleanMetricCounts(expectedGleanValues) { } } -/*** +/** * Sets up a `HttpServer` for use in content singature checking tests. This * server will expose different endpoints that can be used to simulate different * pass and failure scenarios when fetching an update.xml file. diff --git a/toolkit/mozapps/downloads/HelperAppDlg.sys.mjs b/toolkit/mozapps/downloads/HelperAppDlg.sys.mjs @@ -115,20 +115,20 @@ import { FileUtils } from "resource://gre/modules/FileUtils.sys.mjs"; export class nsUnknownContentTypeDialog { // Todo (bug 1986787): these should be private, but some are used from tests. - /* @type {?nsIHelperAppLauncher} */ + /** @type {?nsIHelperAppLauncher} */ mLauncher = null; - /* @type {?nsIInterfaceRequestor} */ + /** @type {?nsIInterfaceRequestor} */ mContext = null; // This should be one of the 3 reason constants on nsIHelperAppDialog. // Right now our automated XPIDL ts generation does not generate the // correct enum for this. Bug 1986020 covers fixing this. - /* @type {number} */ + /** @type {number} */ mReason = null; - /* @type {?nsIDOMWindow} */ + /** @type {?nsIDOMWindow} */ mDialog = null; - /* @type {nsILocalHandlerApp | nsIGIOHandlerApp | null } */ + /** @type {nsILocalHandlerApp | nsIGIOHandlerApp | null } */ chosenApp = null; givenDefaultApp = false; updateSelf = true; diff --git a/toolkit/mozapps/extensions/internal/AddonRepository.sys.mjs b/toolkit/mozapps/extensions/internal/AddonRepository.sys.mjs @@ -406,7 +406,7 @@ export var AddonRepository = { return addon; }, - /* + /** * Clear and delete the AddonRepository database * @return Promise{null} resolves when the database is deleted */ @@ -416,7 +416,7 @@ export var AddonRepository = { ); }, - /* + /** * Create a ServiceRequest instance. * @return ServiceRequest returns a ServiceRequest instance. */ @@ -700,7 +700,7 @@ export var AddonRepository = { lazy.AddonManager.beforeShutdown.removeBlocker(shutter); }, - /* + /** * Creates an AddonSearchResult by parsing an entry from the AMO API. * * @param aEntry @@ -1099,7 +1099,7 @@ var AddonDatabase = { this.save(); }, - /* + /** * Creates an AddonSearchResult by parsing an object structure * retrieved from the DB JSON representation. * diff --git a/toolkit/mozapps/extensions/internal/XPIInstall.sys.mjs b/toolkit/mozapps/extensions/internal/XPIInstall.sys.mjs @@ -2533,7 +2533,7 @@ var DownloadAddonInstall = class extends AddonInstall { } } - /* + /** * Update the crypto hasher with the new data and call the progress listeners. * * @see nsIStreamListener @@ -2546,7 +2546,7 @@ var DownloadAddonInstall = class extends AddonInstall { } } - /* + /** * Check the redirect response for a hash of the target XPI and verify that * we don't end up on an insecure channel. * @@ -2584,7 +2584,7 @@ var DownloadAddonInstall = class extends AddonInstall { this.channel = aNewChannel; } - /* + /** * This is the first chance to get at real headers on the channel. * * @see nsIStreamListener @@ -2628,7 +2628,7 @@ var DownloadAddonInstall = class extends AddonInstall { } } - /* + /** * The download is complete. * * @see nsIStreamListener diff --git a/toolkit/mozapps/extensions/internal/XPIProvider.sys.mjs b/toolkit/mozapps/extensions/internal/XPIProvider.sys.mjs @@ -3585,7 +3585,7 @@ export var XPIProvider = { return XPIExports.XPIDatabase.getBlocklistAttentionInfo(); }, - /* + /** * Notified when a preference we're interested in has changed. * * @see nsIObserver diff --git a/toolkit/mozapps/extensions/test/xpcshell/test_AddonRepository_cache.js b/toolkit/mozapps/extensions/test/xpcshell/test_AddonRepository_cache.js @@ -418,7 +418,7 @@ const WITH_EXTENSION_CACHE = [ var gDBFile = gProfD.clone(); gDBFile.append(FILE_DATABASE); -/* +/** * Check the actual add-on results against the expected add-on results * * @param aActualAddons @@ -444,7 +444,7 @@ function check_results(aActualAddons, aExpectedAddons, aFromRepository) { }); } -/* +/** * Check the add-ons in the cache. This function also tests * AddonRepository.getCachedAddonByID() * @@ -489,7 +489,7 @@ function check_cache(aExpectedToFind, aExpectedImmediately) { return Promise.all(lookups); } -/* +/** * Task to check an initialized cache by checking the cache, then restarting the * manager, and checking the cache. This checks that the cache is consistent * across manager restarts. diff --git a/toolkit/mozapps/extensions/test/xpcshell/test_XPIStates.js b/toolkit/mozapps/extensions/test/xpcshell/test_XPIStates.js @@ -36,7 +36,7 @@ add_task(async function setup() { // timestamp we may not consider the change significant) var lastTimestamp = Date.now(); -/* +/** * Helper function to touch a file and then test whether we detect the change. * @param XS The XPIState object. * @param aPath File path to touch. diff --git a/toolkit/mozapps/update/UpdateService.sys.mjs b/toolkit/mozapps/update/UpdateService.sys.mjs @@ -826,7 +826,7 @@ function getCanStageUpdates(transient = true) { return lazy.gCanStageUpdatesSession; } -/* +/** * Whether or not the application can use BITS to download updates. * * @param {boolean} [transient] Whether transient factors such as the update diff --git a/toolkit/mozapps/update/tests/browser/head.js b/toolkit/mozapps/update/tests/browser/head.js @@ -246,7 +246,7 @@ function setUpdateTimerPrefs() { Services.prefs.setIntPref(PREF_APP_UPDATE_INTERVAL, 43200); } -/* +/** * Sets the value of the App Auto Update setting and sets it back to the * original value at the start of the test when the test finishes. *