tor-browser

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

commit d8abd37c3849693cbac603a2256bf3cd2bcc5ff6
parent b38cd3110bddb6972adf11d9cf897c1a19ff0cc7
Author: Mark Banner <standard8@mozilla.com>
Date:   Fri, 21 Nov 2025 16:13:47 +0000

Bug 1999554 - Automatically fix ESLint rule jsdoc/check-types for remaining code. r=frontend-codestyle-reviewers,mtigley,perftest-reviewers,home-newtab-reviewers,valentin,sparky,mossop,thecount

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

Diffstat:
Maccessible/tests/browser/Common.sys.mjs | 2+-
Maccessible/tests/browser/caching_granularity/head.js | 8++++----
Maccessible/tests/browser/head.js | 6+++---
Maccessible/tests/browser/name_and_description/browser_name_markup.js | 22+++++++++++-----------
Maccessible/tests/browser/relations/head.js | 8++++----
Maccessible/tests/browser/shared-head.js | 46+++++++++++++++++++++++-----------------------
Maccessible/tests/mochitest/common.js | 2+-
Maccessible/tests/mochitest/promisified-events.js | 12++++++------
Maccessible/tests/mochitest/textselection/test_general.html | 8++++----
Mbrowser/actors/ContentSearchParent.sys.mjs | 2+-
Mbrowser/actors/ContextMenuChild.sys.mjs | 6+++---
Mbrowser/actors/PromptParent.sys.mjs | 8++++----
Mbrowser/actors/ScreenshotsComponentChild.sys.mjs | 8++++----
Mbrowser/actors/SearchSERPTelemetryChild.sys.mjs | 4++--
Mbrowser/actors/WebRTCParent.sys.mjs | 2+-
Mbrowser/base/content/browser-addons.js | 4++--
Mbrowser/base/content/browser-places.js | 2+-
Mbrowser/base/content/browser-sitePermissionPanel.js | 2+-
Mbrowser/base/content/browser-siteProtections.js | 30+++++++++++++++---------------
Mbrowser/base/content/browser-trustPanel.js | 4++--
Mbrowser/base/content/browser.js | 22+++++++++++-----------
Mbrowser/base/content/contentTheme.js | 4++--
Mbrowser/base/content/nsContextMenu.sys.mjs | 8++++----
Mbrowser/base/content/test/contextMenu/browser_contextmenu.js | 2+-
Mbrowser/base/content/test/contextMenu/contextmenu_common.js | 4++--
Mbrowser/base/content/test/fullscreen/DOMFullscreenTestUtils.sys.mjs | 2+-
Mbrowser/base/content/test/general/browser_datachoices_notification.js | 4++--
Mbrowser/base/content/test/general/browser_private_browsing_window.js | 2+-
Mbrowser/base/content/test/performance/browser_preferences_usage.js | 4++--
Mbrowser/base/content/test/performance/head.js | 4++--
Mbrowser/base/content/test/protectionsUI/browser_protectionsUI_cookie_banner.js | 8++++----
Mbrowser/base/content/test/protectionsUI/browser_protectionsUI_email_trackers_subview.js | 6+++---
Mbrowser/base/content/test/protectionsUI/browser_protectionsUI_subview_shim.js | 2+-
Mbrowser/base/content/test/protectionsUI/browser_protectionsUI_suspicious_fingerprinters_subview.js | 4++--
Mbrowser/base/content/test/sanitize/browser_sanitizeDialog_v2.js | 8++++----
Mbrowser/base/content/test/sanitize/browser_sanitizeDialog_v2_dataSizes.js | 2+-
Mbrowser/base/content/test/sanitize/head.js | 8++++----
Mbrowser/base/content/test/sidebar/browser_sidebar_switcher.js | 6+++---
Mbrowser/base/content/test/static/browser_sentence_case_strings.js | 8++++----
Mbrowser/base/content/test/static/browser_title_case_menus.js | 4++--
Mbrowser/base/content/test/static/head.js | 2+-
Mbrowser/base/content/test/tabPrompts/browser_auth_spoofing_protection.js | 6+++---
Mbrowser/base/content/test/tabPrompts/browser_auth_spoofing_url_drag_and_drop.js | 2+-
Mbrowser/base/content/test/tabPrompts/browser_confirmFolderUpload.js | 2+-
Mbrowser/base/content/test/tabPrompts/browser_multiplePrompts.js | 2+-
Mbrowser/base/content/test/tabdialogs/browser_tabdialogbox_content_prompts.js | 4++--
Mbrowser/base/content/test/webextensions/head.js | 4++--
Mbrowser/base/content/test/webrtc/browser_devices_get_user_media_camera_preview.js | 2+-
Mbrowser/base/content/test/webrtc/browser_global_mute_toggles.js | 4++--
Mbrowser/base/content/test/webrtc/browser_macos_indicator_hiding.js | 2+-
Mbrowser/base/content/test/webrtc/head.js | 8++++----
Mbrowser/base/content/test/zoom/browser_zoom_commands.js | 2+-
Mbrowser/components/aboutlogins/tests/browser/AboutLoginsTestUtils.sys.mjs | 6+++---
Mbrowser/components/aboutlogins/tests/browser/browser_openImportCSV.js | 8++++----
Mbrowser/components/asrouter/modules/ASRouter.sys.mjs | 4++--
Mbrowser/components/asrouter/modules/ASRouterTargeting.sys.mjs | 4++--
Mbrowser/components/asrouter/modules/FeatureCallout.sys.mjs | 116++++++++++++++++++++++++++++++++++++++++----------------------------------------
Mbrowser/components/asrouter/modules/FeatureCalloutBroker.sys.mjs | 18+++++++++---------
Mbrowser/components/asrouter/modules/FeatureCalloutMessages.sys.mjs | 6+++---
Mbrowser/components/asrouter/modules/InfoBar.sys.mjs | 2+-
Mbrowser/components/asrouter/modules/PageEventManager.sys.mjs | 22+++++++++++-----------
Mbrowser/components/asrouter/tests/unit/utils.js | 2+-
Mbrowser/components/attribution/AttributionCode.sys.mjs | 2+-
Mbrowser/components/downloads/DownloadSpamProtection.sys.mjs | 18+++++++++---------
Mbrowser/components/preferences/dialogs/browserLanguages.js | 2+-
Mbrowser/components/preferences/dialogs/permissions.js | 2+-
Mbrowser/components/preferences/main.js | 2+-
Mbrowser/components/preferences/search.js | 4++--
Mbrowser/components/preferences/tests/head.js | 2+-
Mbrowser/components/preferences/translations.js | 2+-
Mbrowser/components/preferences/widgets/setting-control/setting-control.mjs | 6+++---
Mbrowser/components/preferences/widgets/setting-element/setting-element.mjs | 2+-
Mbrowser/components/screenshots/ScreenshotsOverlayChild.sys.mjs | 66+++++++++++++++++++++++++++++++++---------------------------------
Mbrowser/components/screenshots/ScreenshotsUtils.sys.mjs | 4++--
Mbrowser/components/screenshots/overlayHelpers.mjs | 8++++----
Mbrowser/components/screenshots/screenshots-buttons.js | 2+-
Mbrowser/components/screenshots/screenshots-preview.mjs | 4++--
Mbrowser/components/screenshots/tests/browser/head.js | 14+++++++-------
Mbrowser/components/sessionstore/PageWireframes.sys.mjs | 12++++++------
Mbrowser/components/sessionstore/SessionStore.sys.mjs | 40++++++++++++++++++++--------------------
Mbrowser/components/storybook/.storybook/addon-fluent/withPseudoLocalization.mjs | 4++--
Mbrowser/components/storybook/.storybook/chrome-styles-loader.js | 2+-
Mbrowser/components/storybook/.storybook/markdown-story-indexer.js | 2+-
Mbrowser/components/storybook/.storybook/preview.mjs | 2+-
Mbrowser/components/tabbrowser/SmartTabGrouping.sys.mjs | 42+++++++++++++++++++++---------------------
Mbrowser/components/tabbrowser/content/browser-ctrlTab.js | 4++--
Mbrowser/components/tabbrowser/test/browser/smarttabgrouping/browser_tab_grouping.js | 12++++++------
Mbrowser/components/tabbrowser/test/browser/tabMediaIndicator/head.js | 4++--
Mbrowser/components/tabbrowser/test/browser/tabs/browser_bug_1387976_restore_lazy_tab_browser_muted_state.js | 2+-
Mbrowser/components/tabbrowser/test/browser/tabs/browser_tabSpinnerProbe.js | 4++--
Mbrowser/components/tabbrowser/test/browser/tabs/browser_tab_manager_groups.js | 2+-
Mbrowser/extensions/newtab/bin/render-activity-stream-html.js | 2+-
Mbrowser/extensions/newtab/content-src/lib/perf-service.mjs | 14+++++++-------
Mbrowser/extensions/newtab/content-src/lib/utils.jsx | 4++--
Mbrowser/extensions/newtab/data/content/activity-stream.bundle.js | 18+++++++++---------
Mbrowser/extensions/newtab/lib/AdsFeed.sys.mjs | 4++--
Mbrowser/extensions/newtab/lib/DiscoveryStreamFeed.sys.mjs | 14+++++++-------
Mbrowser/extensions/newtab/lib/InferredModel/FeatureModel.sys.mjs | 42+++++++++++++++++++++---------------------
Mbrowser/extensions/newtab/lib/NewTabContentPing.sys.mjs | 2+-
Mbrowser/extensions/newtab/lib/NewTabGleanUtils.sys.mjs | 8++++----
Mbrowser/extensions/newtab/lib/NewTabMessaging.sys.mjs | 2+-
Mbrowser/extensions/newtab/lib/PlacesFeed.sys.mjs | 4++--
Mbrowser/extensions/newtab/lib/TelemetryFeed.sys.mjs | 10+++++-----
Mbrowser/extensions/newtab/lib/TopSitesFeed.sys.mjs | 6+++---
Mbrowser/extensions/newtab/lib/TopStoriesFeed.sys.mjs | 4++--
Mbrowser/extensions/newtab/test/unit/utils.js | 2+-
Mbrowser/extensions/newtab/test/xpcshell/test_InferredFeatureModel.js | 4++--
Mbrowser/modules/AboutNewTab.sys.mjs | 6+++---
Mbrowser/modules/BrowserUIUtils.sys.mjs | 4++--
Mbrowser/modules/BrowserUsageTelemetry.sys.mjs | 2+-
Mbrowser/modules/BrowserWindowTracker.sys.mjs | 10+++++-----
Mbrowser/modules/FaviconLoader.sys.mjs | 2+-
Mbrowser/modules/HomePage.sys.mjs | 2+-
Mbrowser/modules/LinksCache.sys.mjs | 2+-
Mbrowser/modules/PermissionUI.sys.mjs | 4++--
Mbrowser/modules/Sanitizer.sys.mjs | 2+-
Mbrowser/modules/SiteDataManager.sys.mjs | 16++++++++--------
Mbrowser/modules/SitePermissions.sys.mjs | 22+++++++++++-----------
Mbrowser/modules/URILoadingHelper.sys.mjs | 24++++++++++++------------
Mbrowser/modules/test/browser/head.js | 6+++---
Mbrowser/modules/webrtcUI.sys.mjs | 2+-
Mdocshell/base/URIFixup.sys.mjs | 6+++---
Mdom/base/test/browser_promiseDocumentFlushed.js | 2+-
Mdom/base/test/test_document_wireframe.html | 12++++++------
Mdom/events/test/browser_dragdrop_impl.js | 10+++++-----
Mdom/indexedDB/test/file.js | 2+-
Mdom/ipc/ManifestMessagesChild.sys.mjs | 4++--
Mdom/manifest/ManifestFinder.sys.mjs | 2+-
Mdom/manifest/ManifestObtainer.sys.mjs | 16++++++++--------
Mdom/media/autoplay/test/browser/head.js | 4++--
Mdom/media/test/browser/browser_telemetry_video_hardware_decoding_support.js | 2+-
Mdom/media/test/browser/wmfme/head.js | 4++--
Mdom/media/webrtc/tests/mochitests/head.js | 18+++++++++---------
Mdom/media/webrtc/tests/mochitests/mediaStreamPlayback.js | 6+++---
Mdom/media/webrtc/tests/mochitests/pc.js | 26+++++++++++++-------------
Mdom/midi/tests/browser_midi_permission_gated.js | 2+-
Mdom/notification/test/browser/browser_permission_dismiss.js | 4++--
Mdom/push/PushBroadcastService.sys.mjs | 8++++----
Mdom/push/PushCrypto.sys.mjs | 16++++++++--------
Mdom/push/PushDB.sys.mjs | 6+++---
Mdom/push/PushService.sys.mjs | 22+++++++++++-----------
Mdom/push/test/xpcshell/head.js | 16++++++++--------
Mdom/quota/test/modules/system/QuotaUtils.sys.mjs | 2+-
Mdom/serviceworkers/test/error_reporting_helpers.js | 6+++---
Mdom/simpledb/test/modules/system/SimpleDBUtils.sys.mjs | 2+-
Mdom/xhr/tests/test_XHR_timeout.js | 12++++++------
Mnetwerk/base/EssentialDomainsRemoteSettings.sys.mjs | 2+-
Mnetwerk/base/SimpleURIUnknownSchemesRemoteObserver.sys.mjs | 2+-
Mnetwerk/cookie/test/browser/browser_3pcb_expection.js | 8++++----
Mnetwerk/test/unit/head_telemetry.js | 8++++----
Mnetwerk/test/unit/test_network_connectivity_service.js | 2+-
Mnetwerk/test/unit/test_trr_nat64.js | 2+-
Mnetwerk/url-classifier/UrlClassifierExceptionListService.sys.mjs | 2+-
Mservices/common/async.sys.mjs | 4++--
Mservices/common/kinto-storage-adapter.sys.mjs | 14+++++++-------
Mservices/common/uptake-telemetry.sys.mjs | 4++--
Mservices/crypto/modules/jwcrypto.sys.mjs | 6+++---
Mservices/crypto/modules/utils.sys.mjs | 6+++---
Mservices/fxaccounts/Credentials.sys.mjs | 6+++---
Mservices/fxaccounts/FxAccounts.sys.mjs | 10+++++-----
Mservices/fxaccounts/FxAccountsClient.sys.mjs | 16++++++++--------
Mservices/fxaccounts/FxAccountsCommands.sys.mjs | 6+++---
Mservices/fxaccounts/FxAccountsDevice.sys.mjs | 4++--
Mservices/fxaccounts/FxAccountsKeys.sys.mjs | 16++++++++--------
Mservices/fxaccounts/FxAccountsOAuth.sys.mjs | 10+++++-----
Mservices/fxaccounts/FxAccountsPairing.sys.mjs | 12++++++------
Mservices/fxaccounts/FxAccountsProfileClient.sys.mjs | 34+++++++++++++++++-----------------
Mservices/fxaccounts/FxAccountsWebChannel.sys.mjs | 18+++++++++---------
Mservices/fxaccounts/tests/xpcshell/test_profile_client.js | 6+++---
Mservices/settings/Attachments.sys.mjs | 46+++++++++++++++++++++++-----------------------
Mservices/settings/Database.sys.mjs | 10+++++-----
Mservices/settings/IDBHelpers.sys.mjs | 6+++---
Mservices/settings/RemoteSettings.worker.mjs | 24++++++++++++------------
Mservices/settings/RemoteSettingsClient.sys.mjs | 18+++++++++---------
Mservices/settings/SharedUtils.sys.mjs | 8++++----
Mservices/settings/SyncHistory.sys.mjs | 14+++++++-------
Mservices/settings/Utils.sys.mjs | 24++++++++++++------------
Mservices/settings/remote-settings.sys.mjs | 12++++++------
Mservices/sync/modules/UIState.sys.mjs | 2+-
Mservices/sync/modules/bridged_engine.sys.mjs | 8++++----
Mservices/sync/modules/engines.sys.mjs | 2+-
Mservices/sync/modules/record.sys.mjs | 16++++++++--------
Mservices/sync/modules/service.sys.mjs | 10+++++-----
Mservices/sync/tps/extensions/tps/resource/tps.sys.mjs | 2+-
Mstorage/test/unit/VacuumParticipant.sys.mjs | 2+-
Mtesting/mochitest/BrowserTestUtils/BrowserTestUtils.sys.mjs | 64++++++++++++++++++++++++++++++++--------------------------------
Mtesting/mochitest/tests/SimpleTest/AccessibilityUtils.js | 8++++----
Mtesting/mochitest/tests/SimpleTest/EventUtils.js | 62+++++++++++++++++++++++++++++++-------------------------------
Mtesting/mochitest/tests/SimpleTest/SimpleTest.js | 12++++++------
Mtesting/modules/Assert.sys.mjs | 60++++++++++++++++++++++++++++++------------------------------
Mtesting/specialpowers/content/ContentTaskUtils.sys.mjs | 2+-
Mtesting/talos/talos/tests/devtools/addon/content/tests/debugger/debugger-helpers.js | 8++++----
Mtesting/talos/talos/tests/devtools/addon/content/tests/webconsole/webconsole-helpers.js | 4++--
Mtoolkit/actors/AutoCompleteParent.sys.mjs | 4++--
Mtoolkit/actors/ContentMetaChild.sys.mjs | 8++++----
Mtoolkit/actors/PictureInPictureChild.sys.mjs | 62+++++++++++++++++++++++++++++++-------------------------------
Mtoolkit/actors/PopupAndRedirectBlockingChild.sys.mjs | 2+-
Mtoolkit/actors/SelectParent.sys.mjs | 26+++++++++++++-------------
Mtoolkit/actors/UserCharacteristicsChild.sys.mjs | 2+-
Mtoolkit/components/aboutprocesses/content/aboutProcesses.js | 6+++---
Mtoolkit/components/antitracking/bouncetrackingprotection/test/browser/browser_bouncetracking_cookie_behavior.js | 4++--
Mtoolkit/components/antitracking/bouncetrackingprotection/test/browser/browser_bouncetracking_mode_prefs.js | 2+-
Mtoolkit/components/antitracking/bouncetrackingprotection/test/browser/browser_bouncetracking_remoteExceptions.js | 8++++----
Mtoolkit/components/antitracking/bouncetrackingprotection/test/browser/browser_bouncetracking_webAuthUserActivation.js | 2+-
Mtoolkit/components/antitracking/bouncetrackingprotection/test/browser/head.js | 2+-
Mtoolkit/components/antitracking/test/browser/browser_allowListPreference.js | 6+++---
Mtoolkit/components/antitracking/test/browser/browser_contentBlockingAllowListPrincipal.js | 10+++++-----
Mtoolkit/components/antitracking/test/browser/browser_partitionedClearSiteDataHeader.js | 40++++++++++++++++++++--------------------
Mtoolkit/components/antitracking/test/browser/head.js | 16++++++++--------
Mtoolkit/components/backgroundtasks/BackgroundTasksManager.sys.mjs | 2+-
Mtoolkit/components/cleardata/ClearDataService.sys.mjs | 4++--
Mtoolkit/components/cleardata/PrincipalsCollector.sys.mjs | 2+-
Mtoolkit/components/cleardata/SiteDataTestUtils.sys.mjs | 46+++++++++++++++++++++++-----------------------
Mtoolkit/components/cleardata/tests/unit/test_network_cache.js | 4++--
Mtoolkit/components/cleardata/tests/unit/test_quota.js | 8++++----
Mtoolkit/components/cookiebanners/test/browser/browser_cookiebanner_telemetry.js | 12++++++------
Mtoolkit/components/cookiebanners/test/browser/head.js | 10+++++-----
Mtoolkit/components/crashes/CrashManager.in.sys.mjs | 14+++++++-------
Mtoolkit/components/downloads/DownloadCore.sys.mjs | 2+-
Mtoolkit/components/downloads/DownloadHistory.sys.mjs | 20++++++++++----------
Mtoolkit/components/glean/tests/browser/browser_fog_gmp.js | 2+-
Mtoolkit/components/glean/tests/browser/browser_fog_rdd.js | 2+-
Mtoolkit/components/messaging-system/lib/SpecialMessageActions.sys.mjs | 2+-
Mtoolkit/components/mozintl/mozIntl.sys.mjs | 14+++++++-------
Mtoolkit/components/nimbus/lib/ExperimentManager.sys.mjs | 2+-
Mtoolkit/components/nimbus/lib/ExperimentStore.sys.mjs | 2+-
Mtoolkit/components/nimbus/lib/RemoteSettingsExperimentLoader.sys.mjs | 2+-
Mtoolkit/components/nimbus/test/NimbusTestUtils.sys.mjs | 4++--
Mtoolkit/components/normandy/actions/BranchedAddonStudyAction.sys.mjs | 4++--
Mtoolkit/components/normandy/actions/PreferenceExperimentAction.sys.mjs | 4++--
Mtoolkit/components/normandy/actions/ShowHeartbeatAction.sys.mjs | 4++--
Mtoolkit/components/normandy/content/AboutPages.sys.mjs | 8++++----
Mtoolkit/components/normandy/content/ShieldFrameChild.sys.mjs | 4++--
Mtoolkit/components/normandy/content/about-studies/about-studies.js | 4++--
Mtoolkit/components/normandy/lib/AddonRollouts.sys.mjs | 2+-
Mtoolkit/components/normandy/lib/AddonStudies.sys.mjs | 16++++++++--------
Mtoolkit/components/normandy/lib/ClientEnvironment.sys.mjs | 2+-
Mtoolkit/components/normandy/lib/Heartbeat.sys.mjs | 20++++++++++----------
Mtoolkit/components/normandy/lib/LogManager.sys.mjs | 4++--
Mtoolkit/components/normandy/lib/NormandyApi.sys.mjs | 10+++++-----
Mtoolkit/components/normandy/lib/PreferenceExperiments.sys.mjs | 14+++++++-------
Mtoolkit/components/normandy/lib/PreferenceRollouts.sys.mjs | 2+-
Mtoolkit/components/normandy/lib/RecipeRunner.sys.mjs | 4++--
Mtoolkit/components/normandy/test/browser/browser_PreferenceExperiments.js | 2+-
Mtoolkit/components/passwordmgr/InsecurePasswordUtils.sys.mjs | 2+-
Mtoolkit/components/passwordmgr/LoginCSVImport.sys.mjs | 2+-
Mtoolkit/components/passwordmgr/LoginHelper.sys.mjs | 22+++++++++++-----------
Mtoolkit/components/passwordmgr/LoginManager.shared.sys.mjs | 10+++++-----
Mtoolkit/components/passwordmgr/LoginManager.sys.mjs | 4++--
Mtoolkit/components/passwordmgr/LoginManagerChild.sys.mjs | 20++++++++++----------
Mtoolkit/components/passwordmgr/LoginManagerContextMenu.sys.mjs | 4++--
Mtoolkit/components/passwordmgr/LoginManagerParent.sys.mjs | 6+++---
Mtoolkit/components/passwordmgr/LoginManagerPrompter.sys.mjs | 20++++++++++----------
Mtoolkit/components/passwordmgr/LoginRecipes.sys.mjs | 22+++++++++++-----------
Mtoolkit/components/passwordmgr/LoginRelatedRealms.sys.mjs | 2+-
Mtoolkit/components/passwordmgr/shared/PasswordGenerator.sys.mjs | 2+-
Mtoolkit/components/passwordmgr/storage-json.sys.mjs | 6+++---
Mtoolkit/components/passwordmgr/test/browser/browser_basicAuth_multiTab.js | 14+++++++-------
Mtoolkit/components/passwordmgr/test/browser/browser_context_menu.js | 2+-
Mtoolkit/components/passwordmgr/test/browser/browser_telemetry_SignUpFormRuleset.js | 6+++---
Mtoolkit/components/passwordmgr/test/browser/head.js | 30+++++++++++++++---------------
Mtoolkit/components/passwordmgr/test/mochitest/pwmgr_common.js | 16++++++++--------
Mtoolkit/components/passwordmgr/test/unit/test_logins_change.js | 4++--
Mtoolkit/components/passwordmgr/test/unit/test_module_LoginCSVImport.js | 6+++---
Mtoolkit/components/passwordmgr/test/unit/test_search_schemeUpgrades.js | 6+++---
Mtoolkit/components/pdfjs/content/PdfStreamConverter.sys.mjs | 2+-
Mtoolkit/components/pdfjs/test/browser_pdfjs_editing_contextmenu.js | 8++++----
Mtoolkit/components/pdfjs/test/browser_pdfjs_filters.js | 4++--
Mtoolkit/components/pdfjs/test/browser_pdfjs_hcm.js | 4++--
Mtoolkit/components/pdfjs/test/browser_pdfjs_jpeg2000.js | 4++--
Mtoolkit/components/pdfjs/test/head.js | 20++++++++++----------
Mtoolkit/components/pictureinpicture/PictureInPicture.sys.mjs | 8++++----
Mtoolkit/components/pictureinpicture/content/player.js | 24++++++++++++------------
Mtoolkit/components/pictureinpicture/tests/browser_changePiPSrcInFullscreen.js | 6+++---
Mtoolkit/components/pictureinpicture/tests/browser_contextMenu.js | 4++--
Mtoolkit/components/pictureinpicture/tests/browser_reversePiP.js | 2+-
Mtoolkit/components/pictureinpicture/tests/browser_text_tracks_webvtt_3.js | 4++--
Mtoolkit/components/pictureinpicture/tests/head.js | 54+++++++++++++++++++++++++++---------------------------
Mtoolkit/components/processtools/tests/browser/browser_test_powerMetrics.js | 2+-
Mtoolkit/components/prompts/src/Prompter.sys.mjs | 318++++++++++++++++++++++++++++++++++++++++----------------------------------------
Mtoolkit/components/prompts/test/PromptTestUtils.sys.mjs | 20++++++++++----------
Mtoolkit/components/prompts/test/prompt_common.js | 2+-
Mtoolkit/components/prompts/test/test_subresources_prompts.html | 4++--
Mtoolkit/components/taskscheduler/TaskScheduler.sys.mjs | 8++++----
Mtoolkit/components/taskscheduler/TaskSchedulerWinImpl.sys.mjs | 2+-
Mtoolkit/components/telemetry/app/ClientID.sys.mjs | 32++++++++++++++++----------------
Mtoolkit/components/telemetry/app/TelemetryArchive.sys.mjs | 4++--
Mtoolkit/components/telemetry/app/TelemetryControllerBase.sys.mjs | 2+-
Mtoolkit/components/telemetry/app/TelemetryControllerContent.sys.mjs | 2+-
Mtoolkit/components/telemetry/app/TelemetryControllerParent.sys.mjs | 112++++++++++++++++++++++++++++++++++++++++----------------------------------------
Mtoolkit/components/telemetry/app/TelemetryEnvironment.sys.mjs | 16++++++++--------
Mtoolkit/components/telemetry/app/TelemetryReportingPolicy.sys.mjs | 14+++++++-------
Mtoolkit/components/telemetry/app/TelemetryScheduler.sys.mjs | 16++++++++--------
Mtoolkit/components/telemetry/app/TelemetrySend.sys.mjs | 36++++++++++++++++++------------------
Mtoolkit/components/telemetry/app/TelemetryStorage.sys.mjs | 48++++++++++++++++++++++++------------------------
Mtoolkit/components/telemetry/app/TelemetryUtils.sys.mjs | 26+++++++++++++-------------
Mtoolkit/components/telemetry/pings/EventPing.sys.mjs | 2+-
Mtoolkit/components/telemetry/pings/HealthPing.sys.mjs | 18+++++++++---------
Mtoolkit/components/telemetry/pings/TelemetrySession.sys.mjs | 14+++++++-------
Mtoolkit/components/telemetry/pings/UpdatePing.sys.mjs | 8++++----
Mtoolkit/components/telemetry/tests/unit/head.js | 4++--
Mtoolkit/components/telemetry/tests/unit/test_PingAPI.js | 2+-
Mtoolkit/components/telemetry/tests/unit/test_UserInteraction_annotations.js | 12++++++------
Mtoolkit/components/telemetry/tests/utils/TelemetryTestUtils.sys.mjs | 68++++++++++++++++++++++++++++++++++----------------------------------
Mtoolkit/components/thumbnails/test/head.js | 6+++---
Mtoolkit/components/url-classifier/tests/UrlClassifierTestUtils.sys.mjs | 4++--
Mtoolkit/components/url-classifier/tests/performance/perftest_exceptionListLookup.js | 2+-
Mtoolkit/components/url-classifier/tests/unit/test_urlClassifierExceptionList.js | 2+-
Mtoolkit/components/utils/FilterExpressions.sys.mjs | 4++--
Mtoolkit/components/utils/Sampling.sys.mjs | 4++--
Mtoolkit/components/utils/WindowsInstallsInfo.sys.mjs | 2+-
Mtoolkit/content/aboutLogging/profileSaveUploadLogic.mjs | 2+-
Mtoolkit/content/aboutLogging/profileStorage.mjs | 4++--
Mtoolkit/content/customElements.js | 2+-
Mtoolkit/content/preferences/Setting.mjs | 2+-
Mtoolkit/content/tests/browser/browser_crash_previous_frameloader.js | 2+-
Mtoolkit/content/tests/browser/datetime/head.js | 40++++++++++++++++++++--------------------
Mtoolkit/content/widgets/browser-custom-element.mjs | 12++++++------
Mtoolkit/content/widgets/calendar.js | 18+++++++++---------
Mtoolkit/content/widgets/datekeeper.js | 52++++++++++++++++++++++++++--------------------------
Mtoolkit/content/widgets/datepicker.js | 8++++----
Mtoolkit/content/widgets/findbar.js | 34+++++++++++++++++-----------------
Mtoolkit/content/widgets/moz-reorderable-list/moz-reorderable-list.mjs | 2+-
Mtoolkit/content/widgets/moz-select/moz-select.mjs | 2+-
Mtoolkit/content/widgets/notificationbox.js | 6+++---
Mtoolkit/content/widgets/spinner.js | 34+++++++++++++++++-----------------
Mtoolkit/content/widgets/tabbox.js | 6+++---
Mtoolkit/content/widgets/timekeeper.js | 78+++++++++++++++++++++++++++++++++++++++---------------------------------------
Mtoolkit/content/widgets/timepicker.js | 8++++----
Mtoolkit/content/widgets/videocontrols.js | 10+++++-----
Mtoolkit/crashreporter/content/crashes.js | 14+++++++-------
Mtoolkit/modules/Color.sys.mjs | 20++++++++++----------
Mtoolkit/modules/Console.sys.mjs | 2+-
Mtoolkit/modules/ContentDOMReference.sys.mjs | 2+-
Mtoolkit/modules/DateTimePickerPanel.sys.mjs | 2+-
Mtoolkit/modules/E10SUtils.sys.mjs | 20++++++++++----------
Mtoolkit/modules/FinderHighlighter.sys.mjs | 60++++++++++++++++++++++++++++++------------------------------
Mtoolkit/modules/FinderIterator.sys.mjs | 88++++++++++++++++++++++++++++++++++++++++----------------------------------------
Mtoolkit/modules/FormLikeFactory.sys.mjs | 4++--
Mtoolkit/modules/JSONFile.sys.mjs | 2+-
Mtoolkit/modules/LogManager.sys.mjs | 4++--
Mtoolkit/modules/NLP.sys.mjs | 12++++++------
Mtoolkit/modules/NewTabUtils.sys.mjs | 24++++++++++++------------
Mtoolkit/modules/PopupNotifications.sys.mjs | 2+-
Mtoolkit/modules/Preferences.sys.mjs | 6+++---
Mtoolkit/modules/ServiceRequest.sys.mjs | 8++++----
Mtoolkit/modules/ShortcutUtils.sys.mjs | 2+-
Mtoolkit/modules/SubDialog.sys.mjs | 24++++++++++++------------
Mtoolkit/modules/WebChannel.sys.mjs | 4++--
Mtoolkit/modules/subprocess/subprocess_unix.worker.js | 2+-
Mtoolkit/mozapps/extensions/AddonManager.sys.mjs | 20++++++++++----------
Mtoolkit/mozapps/extensions/Blocklist.sys.mjs | 16++++++++--------
Mtoolkit/mozapps/extensions/amWebAPI.sys.mjs | 2+-
Mtoolkit/mozapps/extensions/internal/AddonRepository.sys.mjs | 16++++++++--------
Mtoolkit/mozapps/extensions/internal/AddonTestUtils.sys.mjs | 14+++++++-------
Mtoolkit/mozapps/extensions/internal/ProductAddonChecker.sys.mjs | 2+-
Mtoolkit/mozapps/extensions/internal/SitePermsAddonProvider.sys.mjs | 20++++++++++----------
Mtoolkit/mozapps/extensions/internal/XPIDatabase.sys.mjs | 18+++++++++---------
Mtoolkit/mozapps/extensions/internal/XPIInstall.sys.mjs | 22+++++++++++-----------
Mtoolkit/mozapps/extensions/internal/XPIProvider.sys.mjs | 34+++++++++++++++++-----------------
Mtoolkit/mozapps/extensions/internal/siteperms-addon-utils.sys.mjs | 4++--
Mtoolkit/mozapps/extensions/test/browser/browser_html_sitepermission_addons.js | 2+-
Mtoolkit/mozapps/extensions/test/xpcshell/head_system_addons.js | 12++++++------
Mtoolkit/mozapps/extensions/test/xpcshell/test_webextension_theme.js | 4++--
Mtoolkit/mozapps/extensions/test/xpinstall/browser_block_fullscreen_prompt.js | 2+-
Mtoolkit/mozapps/handling/ContentDispatchChooser.sys.mjs | 2+-
Mtools/profiler/tests/ProfilerTestUtils.sys.mjs | 12++++++------
Mtools/profiler/tests/browser/browser_test_feature_jstracing.js | 2+-
Mtools/profiler/tests/browser/head.js | 6+++---
Mtools/profiler/tests/xpcshell/head.js | 2+-
Mtools/profiler/tests/xpcshell/test_feature_fileioall.js | 2+-
Muriloader/exthandler/tests/mochitest/browser_protocol_ask_dialog_permission.js | 8++++----
Muriloader/exthandler/tests/mochitest/head.js | 2+-
373 files changed, 2173 insertions(+), 2173 deletions(-)

diff --git a/accessible/tests/browser/Common.sys.mjs b/accessible/tests/browser/Common.sys.mjs @@ -132,7 +132,7 @@ export const CommonUtils = { * like ::details-content. * * @param {nsIAccessible} accessible accessible - * @return {String?} DOMNode id if available + * @return {string?} DOMNode id if available */ getAccessibleDOMNodeID(accessible) { try { diff --git a/accessible/tests/browser/caching_granularity/head.js b/accessible/tests/browser/caching_granularity/head.js @@ -27,7 +27,7 @@ loadScripts( * * @param {nsIAccessible} accessible the accessible where the attribute to query * should be cached - * @param {String} attribute the attribute to query in the cache + * @param {string} attribute the attribute to query in the cache */ async function verifyAttributeCached(accessible, attribute) { // Wait until the attribute is present in the cache. @@ -47,7 +47,7 @@ async function verifyAttributeCached(accessible, attribute) { * * @param {nsIAccessible} accessible the accessible where the attribute to query * should be cached - * @param {String} attribute the attribute to query in the cache + * @param {string} attribute the attribute to query in the cache */ function verifyAttributeCachedNoRetry(accessible, attribute) { try { @@ -71,7 +71,7 @@ function verifyAttributeCachedNoRetry(accessible, attribute) { * * @param {nsIAccessible} accessible the accessible where the attribute to * query should be cached - * @param {String} attribute the attribute to query in the cache + * @param {string} attribute the attribute to query in the cache * @param {QueryCallback} queryCb the callback that this function will * invoke to query the given attribute */ @@ -101,7 +101,7 @@ async function testAttributeCachePresence(accessible, attribute, queryCb) { * * @param {nsIAccessible} accessible the accessible where the attribute to * query should be cached - * @param {String} attribute the attribute to query in the cache + * @param {string} attribute the attribute to query in the cache * @param {QueryCallback} queryCb the callback that this function will * invoke to query the given attribute */ diff --git a/accessible/tests/browser/head.js b/accessible/tests/browser/head.js @@ -19,7 +19,7 @@ const { CommonUtils } = ChromeUtils.importESModule( /** * Capture when 'a11y-consumers-changed' event is fired. * - * @param {?Object} target + * @param {?object} target * [optional] browser object that indicates that accessibility service * is in content process. * @return {Array} @@ -45,7 +45,7 @@ function accConsumersChanged(target) { /** * Capture when accessibility service is initialized. * - * @param {?Object} target + * @param {?object} target * [optional] browser object that indicates that accessibility service * is expected to be initialized in content process. * @return {Array} @@ -71,7 +71,7 @@ function initAccService(target) { /** * Capture when accessibility service is shutdown. * - * @param {?Object} target + * @param {?object} target * [optional] browser object that indicates that accessibility service * is expected to be shutdown in content process. * @return {Array} diff --git a/accessible/tests/browser/name_and_description/browser_name_markup.js b/accessible/tests/browser/name_and_description/browser_name_markup.js @@ -376,11 +376,11 @@ const markupTests = [ * becomes defunct, update its reference using the one that is attached to one * of the above events. * - * @param {Object} browser current "tabbrowser" element - * @param {Object} target { acc, id } structure that contains an + * @param {object} browser current "tabbrowser" element + * @param {object} target { acc, id } structure that contains an * accessible and its content element * id. - * @param {Object} rule current attr rule for name calculation + * @param {object} rule current attr rule for name calculation * @param {[type]} expected expected name value */ async function testAttrRule(browser, target, rule, expected) { @@ -405,11 +405,11 @@ async function testAttrRule(browser, target, rule, expected) { * in a reorder event - wait for it. If accessible becomes defunct, update its * reference using the one that is attached to a possible reorder event. * - * @param {Object} browser current "tabbrowser" element - * @param {Object} target { acc, id } structure that contains an + * @param {object} browser current "tabbrowser" element + * @param {object} target { acc, id } structure that contains an * accessible and its content element * id. - * @param {Object} rule current elm rule for name calculation + * @param {object} rule current elm rule for name calculation * @param {[type]} expected expected name value */ async function testElmRule(browser, target, rule, expected) { @@ -434,11 +434,11 @@ async function testElmRule(browser, target, rule, expected) { * accessible becomes defunct, update its reference using the one that is * attached to a reorder event. * - * @param {Object} browser current "tabbrowser" element - * @param {Object} target { acc, id } structure that contains an + * @param {object} browser current "tabbrowser" element + * @param {object} target { acc, id } structure that contains an * accessible and its content element * id. - * @param {Object} rule current subtree rule for name calculation + * @param {object} rule current subtree rule for name calculation * @param {[type]} expected expected name value */ async function testSubtreeRule(browser, target, rule, expected) { @@ -463,8 +463,8 @@ async function testSubtreeRule(browser, target, rule, expected) { * Iterate over a list of rules and test accessible names for each one of the * rules. * - * @param {Object} browser current "tabbrowser" element - * @param {Object} target { acc, id } structure that contains an + * @param {object} browser current "tabbrowser" element + * @param {object} target { acc, id } structure that contains an * accessible and its content element * id. * @param {Array} ruleset A list of rules to test a target with diff --git a/accessible/tests/browser/relations/head.js b/accessible/tests/browser/relations/head.js @@ -91,10 +91,10 @@ async function testCachedRelation( * Asynchronously set or remove content element's reflected elements attribute * (in content process if e10s is enabled). * - * @param {Object} browser current "tabbrowser" element - * @param {String} id content element id - * @param {String} attr attribute name - * @param {String?} value optional attribute value, if not present, remove + * @param {object} browser current "tabbrowser" element + * @param {string} id content element id + * @param {string} attr attribute name + * @param {string?} value optional attribute value, if not present, remove * attribute * @return {Promise} promise indicating that attribute is set/removed */ diff --git a/accessible/tests/browser/shared-head.js b/accessible/tests/browser/shared-head.js @@ -82,7 +82,7 @@ function currentContentDoc() { * @param {nsIAccessibleEvent} event * Accessible event to be tested for a match. * - * @return {Boolean} + * @return {boolean} * True if accessible event's accessible object ID matches current * document accessible ID. */ @@ -144,10 +144,10 @@ let Logger = { * Asynchronously set or remove content element's attribute (in content process * if e10s is enabled). * - * @param {Object} browser current "tabbrowser" element - * @param {String} id content element id - * @param {String} attr attribute name - * @param {String?} value optional attribute value, if not present, remove + * @param {object} browser current "tabbrowser" element + * @param {string} id content element id + * @param {string} attr attribute name + * @param {string?} value optional attribute value, if not present, remove * attribute * @return {Promise} promise indicating that attribute is set/removed */ @@ -177,10 +177,10 @@ function invokeSetAttribute(browser, id, attr, value = null) { * e10s is enabled, or in fission process if fission is enabled and a fission * frame is present). * - * @param {Object} browser current "tabbrowser" element - * @param {String} id content element id - * @param {String} aStyle style property name - * @param {String?} aValue optional style property value, if not present, + * @param {object} browser current "tabbrowser" element + * @param {string} id content element id + * @param {string} aStyle style property name + * @param {string?} aValue optional style property value, if not present, * remove style * @return {Promise} promise indicating that style is set/removed */ @@ -210,8 +210,8 @@ function invokeSetStyle(browser, id, style, value) { * enabled, or in fission process if fission is enabled and a fission frame is * present). * - * @param {Object} browser current "tabbrowser" element - * @param {String} id content element id + * @param {object} browser current "tabbrowser" element + * @param {string} id content element id * @return {Promise} promise indicating that focus is set */ function invokeFocus(browser, id) { @@ -246,7 +246,7 @@ function getContentDPR(browser) { * enabled, or in fission process if fission is enabled and a fission frame is * present). * - * @param {Object} browser current "tabbrowser" element + * @param {object} browser current "tabbrowser" element * @param {Array} args arguments for the content task * @param {Function} task content task function * @@ -275,9 +275,9 @@ function invokeContentTask(browser, args, task) { * Compare process ID's between the top level content process and possible * remote/local iframe proccess. * - * @param {Object} browser + * @param {object} browser * Top level browser object for a tab. - * @param {Boolean} isRemote + * @param {boolean} isRemote * Indicates if we expect the iframe content process to be remote or not. */ async function comparePIDs(browser, isRemote) { @@ -314,7 +314,7 @@ function loadScripts(...scripts) { /** * Load a list of scripts into target's content. * - * @param {Object} target + * @param {object} target * target for loading scripts into * @param {Array} scripts * a list of scripts to load into content @@ -418,11 +418,11 @@ function wrapWithIFrame(doc, options = {}) { * Takes an HTML snippet or HTML doc url and returns an encoded URI for a full * document with the snippet or the URL as a source for the IFRAME. * - * @param {String} doc + * @param {string} doc * a markup snippet or url. - * @param {Object} options (see options in addAccessibleTask). + * @param {object} options (see options in addAccessibleTask). * - * @return {String} + * @return {string} * a base64 encoded data url of the document container the snippet. */ function snippetToURL(doc, options = {}) { @@ -685,12 +685,12 @@ function accessibleTask(doc, task, options = {}) { * A wrapper around browser test add_task that triggers an accessible test task * as a new browser test task with given document, data URL or markup snippet. * - * @param {String} doc + * @param {string} doc * URL (relative to current directory) or data URL or markup snippet * that is used to test content with * @param {Function|AsyncFunction} task * a generator or a function with tests to run - * @param {null|Object} options + * @param {null | object} options * Options for running accessibility test tasks: * - {Boolean} topLevel * Flag to run the test with content in the top level content process. @@ -797,7 +797,7 @@ function addAccessibleTask(doc, task, options = {}) { * Check if an accessible object has a defunct test. * * @param {nsIAccessible} accessible object to test defunct state for - * @return {Boolean} flag indicating defunct state + * @return {boolean} flag indicating defunct state */ function isDefunct(accessible) { let defunct = false; @@ -819,7 +819,7 @@ function isDefunct(accessible) { * Get the DOM tag name for a given accessible. * * @param {nsIAccessible} accessible accessible - * @return {String?} tag name of associated DOM node, or null. + * @return {string?} tag name of associated DOM node, or null. */ function getAccessibleTagName(acc) { try { @@ -834,7 +834,7 @@ function getAccessibleTagName(acc) { * looks for an accessible that matches based on its DOMNode id. * * @param {nsIAccessible} accessible root accessible - * @param {String} id id to look up accessible for + * @param {string} id id to look up accessible for * @param {Array?} interfaces the interface or an array interfaces * to query it/them from obtained accessible * @return {nsIAccessible?} found accessible if any diff --git a/accessible/tests/mochitest/common.js b/accessible/tests/mochitest/common.js @@ -873,7 +873,7 @@ function getTextFromClipboard() { * accessible has died. * * @param {nsIAccessible} accessible accessible - * @return {String?} DOMNode id if available + * @return {string?} DOMNode id if available */ function getAccessibleDOMNodeID(accessible) { try { diff --git a/accessible/tests/mochitest/promisified-events.js b/accessible/tests/mochitest/promisified-events.js @@ -137,12 +137,12 @@ function matchEvent(event, matchCriteria) { * event of the given type with the given target (defined by its id or * accessible) is observed. * - * @param {Number} eventType expected accessible event + * @param {number} eventType expected accessible event * type - * @param {String|nsIAccessible|Function} matchCriteria expected content + * @param {string | nsIAccessible | Function} matchCriteria expected content * element id * for the event - * @param {String} message Message to prepend to logging. + * @param {string} message Message to prepend to logging. * @return {Promise} promise that resolves to an * event */ @@ -223,9 +223,9 @@ class UnexpectedEvents { * * @param {Array} events a list of events to wait (same format as * waitForEvent arguments) - * @param {String} message Message to prepend to logging. - * @param {Boolean} ordered Events need to be received in given order. - * @param {Object} invokerOrWindow a local window or a special content invoker + * @param {string} message Message to prepend to logging. + * @param {boolean} ordered Events need to be received in given order. + * @param {object} invokerOrWindow a local window or a special content invoker * it takes a list of arguments and a task * function. */ diff --git a/accessible/tests/mochitest/textselection/test_general.html b/accessible/tests/mochitest/textselection/test_general.html @@ -20,7 +20,7 @@ * @param {string} aID The ID to test. * @param {nsIAccessibleText} acc The accessible to test. * @param {int} index The selection's index to test. - * @param {array} offsets The start and end offset to test against. + * @param {Array} offsets The start and end offset to test against. * @param {string} msgStart The start of the message to return in test * messages. */ @@ -39,7 +39,7 @@ * Test adding selections to accessibles. * * @param {string} aID The ID of the element to test. - * @param {array} aSelections Array of selection start and end indices. + * @param {Array} aSelections Array of selection start and end indices. */ async function addSelections(aID, aSelections) { info("Test adding selections to " + aID); @@ -71,7 +71,7 @@ * * @param {string} aID The ID of the element to test. * @param {int} aIndex The index of the selection to change. - * @param {array} aSelection Array of the selection's new start and end + * @param {Array} aSelection Array of the selection's new start and end * indices. */ async function changeSelection(aID, aIndex, aSelection) { @@ -118,7 +118,7 @@ * @param {int} aNodeOffset1 The offset where the selection should start * @param {string} aNodeID2 The node in which the selection should end * @param {int} aNodeOffset2 The index at which the selection should end - * @param {array} aTests An array of accessibles and their start and end + * @param {Array} aTests An array of accessibles and their start and end * offsets to test. */ async function changeDOMSelection(aID, aNodeID1, aNodeOffset1, diff --git a/browser/actors/ContentSearchParent.sys.mjs b/browser/actors/ContentSearchParent.sys.mjs @@ -335,7 +335,7 @@ export let ContentSearch = { /** * Construct a state object representing the search engine state. * - * @returns {Object} state + * @returns {object} state */ async currentStateObj() { let state = { diff --git a/browser/actors/ContextMenuChild.sys.mjs b/browser/actors/ContextMenuChild.sys.mjs @@ -312,9 +312,9 @@ export class ContextMenuChild extends JSWindowActorChild { * reference if possible. If not, and aMessage.objects is defined, * aMessage.objects[aKey] is returned. Otherwise null. * - * @param {Object} aMessage Message with a objects property - * @param {String} aKey Key for the target on aMessage.objects - * @return {Object} Context menu target + * @param {object} aMessage Message with a objects property + * @param {string} aKey Key for the target on aMessage.objects + * @return {object} Context menu target */ getTarget(aMessage, aKey = "target") { return this.target || (aMessage.objects && aMessage.objects[aKey]); diff --git a/browser/actors/PromptParent.sys.mjs b/browser/actors/PromptParent.sys.mjs @@ -15,7 +15,7 @@ ChromeUtils.defineLazyGetter(lazy, "gTabBrowserLocalization", function () { }); /** - * @typedef {Object} Dialog + * @typedef {object} Dialog */ /** @@ -127,12 +127,12 @@ export class PromptParent extends JSWindowActorParent { * for a BrowsingContext, and puts the associated browser in the modal state * until the prompt is closed. * - * @param {Object} args + * @param {object} args * The arguments passed up from the BrowsingContext to be passed * directly to the modal prompt. * @return {Promise} * Resolves when the modal prompt is dismissed. - * @resolves {Object} + * @resolves {object} * The arguments returned from the modal prompt. */ async openPromptWithTabDialogBox(args) { @@ -329,7 +329,7 @@ export class PromptParent extends JSWindowActorParent { * * @param {TabDialogBox} dialogBox * The dialog to show the tab-switch checkbox for. - * @param {Object} args + * @param {object} args * The `args` object to set tab switching permission info on. */ addTabSwitchCheckboxToArgs(dialogBox, args) { diff --git a/browser/actors/ScreenshotsComponentChild.sys.mjs b/browser/actors/ScreenshotsComponentChild.sys.mjs @@ -177,7 +177,7 @@ export class ScreenshotsComponentChild extends JSWindowActorChild { /** * Send a request to copy the screenshots * - * @param {Object} region The region dimensions of the screenshot to be copied + * @param {object} region The region dimensions of the screenshot to be copied */ requestCopyScreenshot(region) { region.devicePixelRatio = this.contentWindow.devicePixelRatio; @@ -188,7 +188,7 @@ export class ScreenshotsComponentChild extends JSWindowActorChild { /** * Send a request to download the screenshots * - * @param {Object} region The region dimensions of the screenshot to be downloaded + * @param {object} region The region dimensions of the screenshot to be downloaded */ requestDownloadScreenshot(region) { region.devicePixelRatio = this.contentWindow.devicePixelRatio; @@ -222,7 +222,7 @@ export class ScreenshotsComponentChild extends JSWindowActorChild { * Resolves when the document is ready to have an overlay injected into it. * * @returns {Promise} - * @resolves {Boolean} true when document is ready or rejects + * @resolves {boolean} true when document is ready or rejects */ documentIsReady() { const document = this.document; @@ -281,7 +281,7 @@ export class ScreenshotsComponentChild extends JSWindowActorChild { /** * Wait until the document is ready and then show the screenshots overlay * - * @returns {Boolean} true when document is ready and the overlay is shown + * @returns {boolean} true when document is ready and the overlay is shown * otherwise false */ async startScreenshotsOverlay() { diff --git a/browser/actors/SearchSERPTelemetryChild.sys.mjs b/browser/actors/SearchSERPTelemetryChild.sys.mjs @@ -210,7 +210,7 @@ class ListenerHelper { * @param {EventListenerParam} eventListenerParam * @param {string} target * @param {Function} callback - * @returns {Array<function>} Array of remove event listener functions. + * @returns {Array<Function>} Array of remove event listener functions. */ static addListener(elements, eventListenerParam, target, callback) { let { action, eventType, target: customTarget } = eventListenerParam; @@ -1432,7 +1432,7 @@ export class SearchSERPTelemetryChild extends JSWindowActorChild { * the information associated with that provider. * * @param {string} url The url to check - * @returns {array|null} Returns null if there's no match, otherwise an array + * @returns {Array | null} Returns null if there's no match, otherwise an array * of provider name and the provider information. */ _getProviderInfoForUrl(url) { diff --git a/browser/actors/WebRTCParent.sys.mjs b/browser/actors/WebRTCParent.sys.mjs @@ -827,7 +827,7 @@ function prompt(aActor, aBrowser, aRequest) { /** * Prepare the device selector for one kind of device. * - * @param {Object[]} devices - available devices of this kind. + * @param {object[]} devices - available devices of this kind. * @param {string} IDPrefix - indicating kind of device and so * associated UI elements. * @param {string[]} describedByIDs - an array to which might be diff --git a/browser/base/content/browser-addons.js b/browser/base/content/browser-addons.js @@ -1911,10 +1911,10 @@ var BrowserAddonUI = { /** * Open about:addons page by given view id. * - * @param {String} aView + * @param {string} aView * View id of page that will open. * e.g. "addons://discover/" - * @param {Object} options + * @param {object} options * { * selectTabByViewId: If true, if there is the tab opening page having * same view id, select the tab. Else if the current diff --git a/browser/base/content/browser-places.js b/browser/base/content/browser-places.js @@ -536,7 +536,7 @@ var PlacesCommandHook = { /** * Opens the Places Organizer. * - * @param {String} item The item to select in the organizer window, + * @param {string} item The item to select in the organizer window, * options are (case sensitive): * BookmarksMenu, BookmarksToolbar, UnfiledBookmarks, * AllBookmarks, History, Downloads. diff --git a/browser/base/content/browser-sitePermissionPanel.js b/browser/base/content/browser-sitePermissionPanel.js @@ -982,7 +982,7 @@ var gPermissionPanel = { * Create a permission item for a WebRTC permission. May return null if there * already is a suitable permission item for this device type. * - * @param {Object} permission - Permission object. + * @param {object} permission - Permission object. * @param {string} id - Permission ID without suffix. * @param {string} [key] - Secondary permission key. * @returns {xul:hbox|null} - Element for permission or null if permission diff --git a/browser/base/content/browser-siteProtections.js b/browser/base/content/browser-siteProtections.js @@ -29,19 +29,19 @@ class ProtectionCategory { * * @param {string} id - Identifier of the category. Used to query the category * UI elements in the DOM. - * @param {Object} options - Category options. + * @param {object} options - Category options. * @param {string} options.prefEnabled - ID of pref which controls the * category enabled state. - * @param {Object} flags - Flags for this category to look for in the content + * @param {object} flags - Flags for this category to look for in the content * blocking event and content blocking log. - * @param {Number} [flags.load] - Load flag for this protection category. If + * @param {number} [flags.load] - Load flag for this protection category. If * omitted, we will never match a isAllowing check for this category. - * @param {Number} [flags.block] - Block flag for this protection category. If + * @param {number} [flags.block] - Block flag for this protection category. If * omitted, we will never match a isBlocking check for this category. - * @param {Number} [flags.shim] - Shim flag for this protection category. This + * @param {number} [flags.shim] - Shim flag for this protection category. This * flag is set if we replaced tracking content with a non-tracking shim * script. - * @param {Number} [flags.allow] - Allow flag for this protection category. + * @param {number} [flags.allow] - Allow flag for this protection category. * This flag is set if we explicitly allow normally blocked tracking content. * The webcompat extension can do this if it needs to unblock content on user * opt-in. @@ -193,7 +193,7 @@ class ProtectionCategory { /** * Create a list of items, each representing a tracker. * - * @returns {Object} result - An object containing the results. + * @returns {object} result - An object containing the results. * @returns {HTMLDivElement[]} result.items - Generated tracker items. May be * empty. * @returns {boolean} result.anyShimAllowed - Flag indicating if any of the @@ -236,7 +236,7 @@ class ProtectionCategory { * @param {string} origin - Origin of the tracker. * @param {Array} actions - Array of actions from the content blocking log * associated with the tracking origin. - * @returns {Object} result - An object containing the results. + * @returns {object} result - An object containing the results. * @returns {HTMLDListElement} [options.item] - Generated item or null if we * don't have an item for this origin based on the actions log. * @returns {boolean} options.shimAllowed - Flag indicating whether the @@ -300,7 +300,7 @@ class ProtectionCategory { } /** - * @param {Number} state - Content blocking event flags. + * @param {number} state - Content blocking event flags. * @returns {boolean} - Whether the protection has blocked a tracker. */ isBlocking(state) { @@ -308,7 +308,7 @@ class ProtectionCategory { } /** - * @param {Number} state - Content blocking event flags. + * @param {number} state - Content blocking event flags. * @returns {boolean} - Whether the protection has allowed a tracker. */ isAllowing(state) { @@ -316,7 +316,7 @@ class ProtectionCategory { } /** - * @param {Number} state - Content blocking event flags. + * @param {number} state - Content blocking event flags. * @returns {boolean} - Whether the protection has detected (blocked or * allowed) a tracker. */ @@ -325,7 +325,7 @@ class ProtectionCategory { } /** - * @param {Number} state - Content blocking event flags. + * @param {number} state - Content blocking event flags. * @returns {boolean} - Whether the protections has allowed a tracker that * would have normally been blocked. */ @@ -2856,7 +2856,7 @@ var gProtectionsHandler = { /** * Showing the protections popup. * - * @param {Object} options + * @param {object} options * The object could have two properties. * event: * The event triggers the protections popup to be opened. @@ -2955,7 +2955,7 @@ var gProtectionsHandler = { /** * Sends a message to webcompat extension to unblock content and remove placeholders * - * @param {String} shimId - the id of the shim blocking the content + * @param {string} shimId - the id of the shim blocking the content */ _sendUnblockMessageToSmartblock(shimId) { Services.obs.notifyObservers( @@ -2968,7 +2968,7 @@ var gProtectionsHandler = { /** * Sends a message to webcompat extension to reblock content * - * @param {String} shimId - the id of the shim blocking the content + * @param {string} shimId - the id of the shim blocking the content */ _sendReblockMessageToSmartblock(shimId) { Services.obs.notifyObservers( diff --git a/browser/base/content/browser-trustPanel.js b/browser/base/content/browser-trustPanel.js @@ -1318,7 +1318,7 @@ class TrustPanel { /** * Sends a message to webcompat extension to unblock content and remove placeholders * - * @param {String} shimId - the id of the shim blocking the content + * @param {string} shimId - the id of the shim blocking the content */ #sendUnblockMessageToSmartblock(shimId) { Services.obs.notifyObservers( @@ -1331,7 +1331,7 @@ class TrustPanel { /** * Sends a message to webcompat extension to reblock content * - * @param {String} shimId - the id of the shim blocking the content + * @param {string} shimId - the id of the shim blocking the content */ #sendReblockMessageToSmartblock(shimId) { Services.obs.notifyObservers( diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js @@ -1943,9 +1943,9 @@ var XULBrowserWindow = { /** * Tells the UI what link we are currently over. * - * @param {String} url + * @param {string} url * The URL of the link. - * @param {Object} [options] + * @param {object} [options] * This is an extension of nsIXULBrowserWindow for JS callers, will be * passed on to LinkTargetDisplay. */ @@ -4291,28 +4291,28 @@ class TabDialogBox { /** * Open a dialog on tab or content level. * - * @param {String} aURL - URL of the dialog to load in the tab box. - * @param {Object} [aOptions] - * @param {String} [aOptions.features] - Comma separated list of window + * @param {string} aURL - URL of the dialog to load in the tab box. + * @param {object} [aOptions] + * @param {string} [aOptions.features] - Comma separated list of window * features. - * @param {Boolean} [aOptions.allowDuplicateDialogs] - Whether to allow + * @param {boolean} [aOptions.allowDuplicateDialogs] - Whether to allow * showing multiple dialogs with aURL at the same time. If false calls for * duplicate dialogs will be dropped. - * @param {String} [aOptions.sizeTo] - Pass "available" to stretch dialog to + * @param {string} [aOptions.sizeTo] - Pass "available" to stretch dialog to * roughly content size. Any max-width or max-height style values on the document root * will also be applied to the dialog box. - * @param {Boolean} [aOptions.keepOpenSameOriginNav] - By default dialogs are + * @param {boolean} [aOptions.keepOpenSameOriginNav] - By default dialogs are * aborted on any navigation. * Set to true to keep the dialog open for same origin navigation. - * @param {Number} [aOptions.modalType] - The modal type to create the dialog for. + * @param {number} [aOptions.modalType] - The modal type to create the dialog for. * By default, we show the dialog for tab prompts. - * @param {Boolean} [aOptions.hideContent] - When true, we are about to show a prompt that is requesting the + * @param {boolean} [aOptions.hideContent] - When true, we are about to show a prompt that is requesting the * users credentials for a toplevel load of a resource from a base domain different from the base domain of the currently loaded page. * To avoid auth prompt spoofing (see bug 791594) we hide the current sites content * (among other protection mechanisms, that are not handled here, see the bug for reference). * @param {nsIWebProgress} [aOptions.webProgress] - If passed, use to detect when a site is being * navigated to in order to close the dialog. By default, this.browser.webProgress is used. - * @returns {Object} [result] Returns an object { closedPromise, dialog }. + * @returns {object} [result] Returns an object { closedPromise, dialog }. * @returns {Promise} [result.closedPromise] Resolves once the dialog has been closed. * @returns {SubDialog} [result.dialog] A reference to the opened SubDialog. */ diff --git a/browser/base/content/contentTheme.js b/browser/base/content/contentTheme.js @@ -148,7 +148,7 @@ * Handle theme updates from the LightweightThemeChild actor or due to * changes to the prefers-color-scheme media query. * - * @param {Object} event object containing the theme or query update. + * @param {object} event object containing the theme or query update. */ handleEvent(event) { if (event.type == "LightweightTheme:Set") { @@ -181,7 +181,7 @@ /** * Apply theme data to an element * - * @param {Object} themeData The theme data. + * @param {object} themeData The theme data. */ _setProperties(themeData) { const root = document.documentElement; diff --git a/browser/base/content/nsContextMenu.sys.mjs b/browser/base/content/nsContextMenu.sys.mjs @@ -2334,9 +2334,9 @@ export class nsContextMenu { * Show/hide one item (specified via name or the item element itself). * If the element is not found, then this function finishes silently. * - * @param {Element|String} aItemOrId The item element or the name of the element + * @param {Element | string} aItemOrId The item element or the name of the element * to show. - * @param {Boolean} aShow Set to true to show the item, false to hide it. + * @param {boolean} aShow Set to true to show the item, false to hide it. */ showItem(aItemOrId, aShow) { var item = @@ -2416,7 +2416,7 @@ export class nsContextMenu { /** * Checks if there is a query parameter that can be stripped * - * @returns {Boolean} + * @returns {boolean} */ #canStripParams(uri = this.linkURI) { if (!uri) { @@ -2433,7 +2433,7 @@ export class nsContextMenu { /** * Checks if a webpage is a secure interal webpage * - * @returns {Boolean} + * @returns {boolean} */ isSecureAboutPage() { let { currentURI } = this.browser; diff --git a/browser/base/content/test/contextMenu/browser_contextmenu.js b/browser/base/content/test/contextMenu/browser_contextmenu.js @@ -2591,7 +2591,7 @@ add_task(async function test_strip_on_share_on_secure_about_page() { /** * Selects the text of the element that matches the provided `selector` * - * @param {String} selector + * @param {string} selector * A selector passed to querySelector to find * the element that will be referenced. */ diff --git a/browser/base/content/test/contextMenu/contextmenu_common.js b/browser/base/content/test/contextMenu/contextmenu_common.js @@ -301,14 +301,14 @@ let lastElementSelector = null; * Right-clicks on the element that matches `selector` and checks the * context menu that appears against the `menuItems` array. * - * @param {String} selector + * @param {string} selector * A selector passed to querySelector to find * the element that will be referenced. * @param {Array} menuItems * An array of menuitem ids and their associated enabled state. A state * of null means that it will be ignored. Ids of '---' are used for * menuseparators. - * @param {Object} options, optional + * @param {object} options, optional * skipFocusChange: don't move focus to the element before test, useful * if you want to delay spell-check initialization * offsetX: horizontal mouse offset from the top-left corner of diff --git a/browser/base/content/test/fullscreen/DOMFullscreenTestUtils.sys.mjs b/browser/base/content/test/fullscreen/DOMFullscreenTestUtils.sys.mjs @@ -62,7 +62,7 @@ export var DOMFullscreenTestUtils = { * Spawns content task in browser to enter / leave fullscreen * * @param browser - Browser to use for JS fullscreen requests - * @param {Boolean} fullscreenState - true to enter fullscreen, false to leave + * @param {boolean} fullscreenState - true to enter fullscreen, false to leave * @returns {Promise} - Resolves once fullscreen change is applied */ async changeFullscreen(browser, fullScreenState) { diff --git a/browser/base/content/test/general/browser_datachoices_notification.js b/browser/base/content/test/general/browser_datachoices_notification.js @@ -54,7 +54,7 @@ function promiseNextTick() { /** * Wait for a notification to be shown in a notification box. * - * @param {Object} aNotificationBox The notification box. + * @param {object} aNotificationBox The notification box. * @return {Promise} Resolved when the notification is displayed. */ function promiseWaitForAlertActive(aNotificationBox) { @@ -72,7 +72,7 @@ function promiseWaitForAlertActive(aNotificationBox) { /** * Wait for a notification to be closed. * - * @param {Object} aNotification The notification. + * @param {object} aNotification The notification. * @return {Promise} Resolved when the notification is closed. */ function promiseWaitForNotificationClose(aNotification) { diff --git a/browser/base/content/test/general/browser_private_browsing_window.js b/browser/base/content/test/general/browser_private_browsing_window.js @@ -58,7 +58,7 @@ add_task(async function testOpenBrowserWindow() { * * @param {Element} newWindowItem - The "new window" item to check. * @param {Element} privateWindowItem - The "new private window" item to check. - * @param {Object} expect - The expected properties. + * @param {object} expect - The expected properties. * @param {boolean} expect.privateVisible - Whether we expect the private item * to be visible or not. * @param {string} expect.newWindowL10nId - The expected string ID used by the diff --git a/browser/base/content/test/performance/browser_preferences_usage.js b/browser/base/content/test/performance/browser_preferences_usage.js @@ -14,9 +14,9 @@ const DEFAULT_PROCESS_COUNT = Services.prefs * of stats was called more often than the max parameter. * * @param {Array} stats - an array of [prefName, accessCount] tuples - * @param {Number} max - the maximum number of times any of the prefs should + * @param {number} max - the maximum number of times any of the prefs should * have been called. - * @param {Object} knownProblematicPrefs (optional) - an object that defines + * @param {object} knownProblematicPrefs (optional) - an object that defines * prefs that should be exempt from checking the * maximum access. It looks like the following: * diff --git a/browser/base/content/test/performance/head.js b/browser/base/content/test/performance/head.js @@ -747,9 +747,9 @@ async function withPerfObserver(testFn, exceptions = {}, win = window) { * * @param {bool} keyed * Pass true to synthesize typing the search string one key at a time. - * @param {array} expectedReflowsFirstOpen + * @param {Array} expectedReflowsFirstOpen * The array of expected reflow stacks when the panel is first opened. - * @param {array} [expectedReflowsSecondOpen] + * @param {Array} [expectedReflowsSecondOpen] * The array of expected reflow stacks when the panel is subsequently * opened, if you're testing opening the panel twice. */ diff --git a/browser/base/content/test/protectionsUI/browser_protectionsUI_cookie_banner.js b/browser/base/content/test/protectionsUI/browser_protectionsUI_cookie_banner.js @@ -34,9 +34,9 @@ const exampleRules = JSON.stringify([ * be visible with the given configuration. * * @param {*} options - Configuration to test. - * @param {Number} options.featureMode - nsICookieBannerService::Modes value for + * @param {number} options.featureMode - nsICookieBannerService::Modes value for * normal browsing. - * @param {Number} options.featureModePBM - nsICookieBannerService::Modes value + * @param {number} options.featureModePBM - nsICookieBannerService::Modes value * for private browsing. * @param {boolean} options.visibilityPref - State of the cookie banner UI * visibility pref. @@ -71,9 +71,9 @@ function cookieBannerSectionIsVisible({ * @param {*} options - Test options. * @param {Window} options.win - Browser window to use for testing. It's * browsing mode should match the testPBM variable. - * @param {Number} options.featureMode - nsICookieBannerService::Modes value for + * @param {number} options.featureMode - nsICookieBannerService::Modes value for * normal browsing. - * @param {Number} options.featureModePBM - nsICookieBannerService::Modes value + * @param {number} options.featureModePBM - nsICookieBannerService::Modes value * for private browsing. * @param {boolean} options.visibilityPref - State of the cookie banner UI * visibility pref. diff --git a/browser/base/content/test/protectionsUI/browser_protectionsUI_email_trackers_subview.js b/browser/base/content/test/protectionsUI/browser_protectionsUI_email_trackers_subview.js @@ -23,8 +23,8 @@ const EMAIL_TP_PREF = "privacy.trackingprotection.emailtracking.enabled"; /** * A helper function to check whether or not an element has "notFound" class. * - * @param {String} id The id of the testing element. - * @returns {Boolean} true when the element has "notFound" class. + * @param {string} id The id of the testing element. + * @returns {boolean} true when the element has "notFound" class. */ function notFound(id) { return document.getElementById(id).classList.contains("notFound"); @@ -33,7 +33,7 @@ function notFound(id) { /** * A helper function to test the protection UI tracker category. * - * @param {Boolean} blocked - true if the email tracking protection is enabled. + * @param {boolean} blocked - true if the email tracking protection is enabled. */ async function assertSitesListed(blocked) { let tab = await BrowserTestUtils.openNewForegroundTab({ diff --git a/browser/base/content/test/protectionsUI/browser_protectionsUI_subview_shim.js b/browser/base/content/test/protectionsUI/browser_protectionsUI_subview_shim.js @@ -248,7 +248,7 @@ async function runTestForCategoryAndState(category, action) { /** * Test mixed allow/block/replace states for the tracking protection category. * - * @param {Object} options - States to test. + * @param {object} options - States to test. * @param {boolean} options.block - Test tracker block state. * @param {boolean} options.allow - Test tracker allow state. * @param {boolean} options.replace - Test tracker replace state. diff --git a/browser/base/content/test/protectionsUI/browser_protectionsUI_suspicious_fingerprinters_subview.js b/browser/base/content/test/protectionsUI/browser_protectionsUI_suspicious_fingerprinters_subview.js @@ -34,8 +34,8 @@ const FINGERPRINT_PROTECTION_PBM_PREF = /** * A helper function to check whether or not an element has "notFound" class. * - * @param {String} id The id of the testing element. - * @returns {Boolean} true when the element has "notFound" class. + * @param {string} id The id of the testing element. + * @returns {boolean} true when the element has "notFound" class. */ function notFound(id) { return document.getElementById(id).classList.contains("notFound"); diff --git a/browser/base/content/test/sanitize/browser_sanitizeDialog_v2.js b/browser/base/content/test/sanitize/browser_sanitizeDialog_v2.js @@ -47,11 +47,11 @@ async function promiseHistoryClearedState(aURIs, aShouldBeCleared) { /** * Ensures that the given pref is the expected value. * - * @param {String} aPrefName + * @param {string} aPrefName * The pref's sub-branch under the privacy branch - * @param {Boolean} aExpectedVal + * @param {boolean} aExpectedVal * The pref's expected value - * @param {String} aMsg + * @param {string} aMsg * Passed to is() */ function boolPrefIs(aPrefName, aExpectedVal, aMsg) { @@ -188,7 +188,7 @@ function visitTimeForMinutesAgo(aMinutesAgo) { * Opens dialog in the provided context and selects the checkboxes * as sent in the parameters * - * @param {Object} context the dialog is opened in, timespan to select, + * @param {object} context the dialog is opened in, timespan to select, * if browsingHistoryAndDownloads, cookiesAndStorage, cache or siteSettings * are checked */ diff --git a/browser/base/content/test/sanitize/browser_sanitizeDialog_v2_dataSizes.js b/browser/base/content/test/sanitize/browser_sanitizeDialog_v2_dataSizes.js @@ -84,7 +84,7 @@ async function validateDataSizes(ClearHistoryDialogHelper) { * Helper function to simulate switching timespan selections and * validate data sizes before and after clearing * - * @param {Object} + * @param {object} * clearCookies - boolean * clearDownloads - boolean * clearCaches - boolean diff --git a/browser/base/content/test/sanitize/head.js b/browser/base/content/test/sanitize/head.js @@ -399,7 +399,7 @@ async function createDummyDataForHost(host) { /** * Helper function to create file URL to open * - * @returns {Object} a file URL + * @returns {object} a file URL */ function createFileURL() { if (!fileURL) { @@ -506,7 +506,7 @@ function promiseSanitizationComplete() { * @param {Window} browserWin (optional) * The browser window that the dialog is expected to open in. If not * supplied, the initial browser window of the test run is used. - * @param {Object} {mode, checkingDataSizes} + * @param {object} {mode, checkingDataSizes} * mode: context to open the dialog in * One of * clear on shutdown settings context ("clearOnShutdown"), @@ -571,9 +571,9 @@ ClearHistoryDialogHelper.prototype = { }, /** - * @param {String} aCheckboxId + * @param {string} aCheckboxId * The checkbox id name - * @param {Boolean} aCheckState + * @param {boolean} aCheckState * True if the checkbox should be checked, false otherwise */ validateCheckbox(aCheckboxId, aCheckState) { diff --git a/browser/base/content/test/sidebar/browser_sidebar_switcher.js b/browser/base/content/test/sidebar/browser_sidebar_switcher.js @@ -51,7 +51,7 @@ async function waitForSwitcherPopupShown() { * event to a active menu item of the sidebar switcher menu popup. Provide a * querySelector parameter when a click behavior is needed. * - * @param {String} [querySelector=null] An HTML attribute of the menu item + * @param {string} [querySelector=null] An HTML attribute of the menu item * to be clicked * @returns Promise that resolves when both the menu popup is hidden and * the sidebar itself is focused @@ -74,8 +74,8 @@ function pickSwitcherMenuitem(querySelector = null) { * Helper function to test a key handling of sidebar menu popup items used to * access a specific sidebar * - * @param {String} key Event.key to open the switcher menu popup - * @param {String} sidebarTitle Title of the sidebar that is to be activated + * @param {string} key Event.key to open the switcher menu popup + * @param {string} sidebarTitle Title of the sidebar that is to be activated * during the test (capitalized one word versions), * i.e. "History" or "Tabs" */ diff --git a/browser/base/content/test/static/browser_sentence_case_strings.js b/browser/base/content/test/static/browser_sentence_case_strings.js @@ -138,8 +138,8 @@ async function checkUpdateBanner(view) { /** * Asserts whether or not a string matches sentence case. * - * @param {String} string The string to check for sentence case. - * @param {String} elementID The ID of the element being tested. This is + * @param {string} string The string to check for sentence case. + * @param {string} elementID The ID of the element being tested. This is * mainly used for the assertion message to make it easier to debug * failures, but items without IDs will not be checked (as these are * likely using dynamic strings, like bookmarked page titles). @@ -185,9 +185,9 @@ function checkSentenceCase(string, elementID) { * to see if the word is indeed part of the phrase in context. * * @param {Array} words The full array of words being checked by the caller. - * @param {Number} wordIndex The index of the word being checked within the + * @param {number} wordIndex The index of the word being checked within the * words array. - * @return {Boolean} + * @return {boolean} */ function isPartOfPhrase(words, wordIndex) { let word = words[wordIndex]; diff --git a/browser/base/content/test/static/browser_title_case_menus.js b/browser/base/content/test/static/browser_title_case_menus.js @@ -92,8 +92,8 @@ function checkMenuItems(menupopup) { /** * Given a string, checks that the string is in Title Case. * - * @param {String} string The string to check. - * @param {String} elementID The ID of the element associated with the string. + * @param {string} string The string to check. + * @param {string} elementID The ID of the element associated with the string. * This is included in the assertion message. */ function checkTitleCase(string, elementID) { diff --git a/browser/base/content/test/static/head.js b/browser/base/content/test/static/head.js @@ -192,7 +192,7 @@ function fetchFile(uri) { * Returns whether or not a word (presumably in en-US) is capitalized per * expectations. * - * @param {String} word The single word to check. + * @param {string} word The single word to check. * @param {boolean} expectCapitalized True if the word should be capitalized. * @returns {boolean} True if the word matches the expected capitalization. */ diff --git a/browser/base/content/test/tabPrompts/browser_auth_spoofing_protection.js b/browser/base/content/test/tabPrompts/browser_auth_spoofing_protection.js @@ -26,11 +26,11 @@ const AUTH_URL = TEST_PATH_AUTH + "auth-route.sjs"; /** * Opens a new tab with a url that ether redirects us cross or same domain * - * @param {Boolean} doConfirmPrompt - true if we want to test the case when the user accepts the prompt, + * @param {boolean} doConfirmPrompt - true if we want to test the case when the user accepts the prompt, * false if we want to test the case when the user cancels the prompt. - * @param {Boolean} crossDomain - if true we will open a url that redirects us to a cross domain url, + * @param {boolean} crossDomain - if true we will open a url that redirects us to a cross domain url, * if false, we will open a url that redirects us to a same domain url - * @param {Boolean} prefEnabled true will enable "privacy.authPromptSpoofingProtection", + * @param {boolean} prefEnabled true will enable "privacy.authPromptSpoofingProtection", * false will disable the pref */ async function trigger401AndHandle(doConfirmPrompt, crossDomain, prefEnabled) { diff --git a/browser/base/content/test/tabPrompts/browser_auth_spoofing_url_drag_and_drop.js b/browser/base/content/test/tabPrompts/browser_auth_spoofing_url_drag_and_drop.js @@ -22,7 +22,7 @@ const AUTH_URL = TEST_PATH_AUTH + "auth-route.sjs"; /** * Opens a new tab with a url that ether redirects us cross or same domain * - * @param {Boolean} crossDomain - if true we will open a url that redirects us to a cross domain url, + * @param {boolean} crossDomain - if true we will open a url that redirects us to a cross domain url, * if false, we will open a url that redirects us to a same domain url */ async function trigger401AndHandle(crossDomain) { diff --git a/browser/base/content/test/tabPrompts/browser_confirmFolderUpload.js b/browser/base/content/test/tabPrompts/browser_confirmFolderUpload.js @@ -10,7 +10,7 @@ const { PromptTestUtils } = ChromeUtils.importESModule( /** * Create a temporary test directory that will be cleaned up on test shutdown. * - * @returns {String} - absolute directory path. + * @returns {string} - absolute directory path. */ function getTestDirectory() { let tmpDir = Services.dirsvc.get("TmpD", Ci.nsIFile); diff --git a/browser/base/content/test/tabPrompts/browser_multiplePrompts.js b/browser/base/content/test/tabPrompts/browser_multiplePrompts.js @@ -7,7 +7,7 @@ * * @param {Element} tab The <tab> that has had content dialogs opened * for it. - * @param {Number} promptCount How many dialogs we expected to have been + * @param {number} promptCount How many dialogs we expected to have been * opened. * * @return {Promise} diff --git a/browser/base/content/test/tabdialogs/browser_tabdialogbox_content_prompts.js b/browser/base/content/test/tabdialogs/browser_tabdialogbox_content_prompts.js @@ -133,9 +133,9 @@ add_task(async function test_tabdialog_page_title() { /** * Test helper for checking the origin header of a dialog. * - * @param {Object} browser + * @param {object} browser * The browser the dialog was opened from. - * @param {String|null} origin + * @param {string | null} origin * The page origin that should be displayed in the header, if any. */ async function checkOriginText(browser, origin = null) { diff --git a/browser/base/content/test/webextensions/head.js b/browser/base/content/test/webextensions/head.js @@ -125,7 +125,7 @@ function promiseInstallEvent(addon, event) { * * @param {string} url * URL of the .xpi file to install - * @param {Object?} installTelemetryInfo + * @param {object?} installTelemetryInfo * an optional object that contains additional details used by the telemetry events. * * @returns {Promise} @@ -212,7 +212,7 @@ function isDefaultIcon(icon) { * regular expression it is tested against the icon url, and if * it is a function, it is called with the icon url and returns * true if the url is correct. - * @param {array} permissions + * @param {Array} permissions * The expected entries in the permissions list. Each element * in this array is itself a 2-element array with the string key * for the item (e.g., "webext-perms-description-foo") and an diff --git a/browser/base/content/test/webrtc/browser_devices_get_user_media_camera_preview.js b/browser/base/content/test/webrtc/browser_devices_get_user_media_camera_preview.js @@ -12,7 +12,7 @@ const TEST_PAGE = TEST_ROOT + "get_user_media.html"; /** * Run a preview test with the given options. * - * @param {Object} options + * @param {object} options * @param {boolean} options.requestCamera - Whether to request camera * @param {boolean} options.requestMicrophone - Whether to request microphone * @param {boolean} options.expectCameraPreview - Whether to expect camera diff --git a/browser/base/content/test/webrtc/browser_global_mute_toggles.js b/browser/base/content/test/webrtc/browser_global_mute_toggles.js @@ -38,7 +38,7 @@ add_setup(async function () { * * @param {<xul:browser>} browser - The browser running in the content process * to be monitored. - * @param {Boolean} isMuted - True if the muted topic should be fired. + * @param {boolean} isMuted - True if the muted topic should be fired. * @return {Promise} * @resolves {undefined} When the notification fires. */ @@ -58,7 +58,7 @@ function waitForCameraMuteState(browser, isMuted) { * * @param {<xul:browser>} browser - The browser running in the content process * to be monitored. - * @param {Boolean} isMuted - True if the muted topic should be fired. + * @param {boolean} isMuted - True if the muted topic should be fired. * @return {Promise} * @resolves {undefined} When the notification fires. */ diff --git a/browser/base/content/test/webrtc/browser_macos_indicator_hiding.js b/browser/base/content/test/webrtc/browser_macos_indicator_hiding.js @@ -42,7 +42,7 @@ var systemStatusBarService = { /** * Helper to test if the indicators are shown based on the params * - * @param {Object} + * @param {object} * expectedCount (number) - expected number of indicators turned on * cameraState (boolean) - if the camera indicator should be shown * microphoneState (boolean) - if the microphone indicator should be shown diff --git a/browser/base/content/test/webrtc/head.js b/browser/base/content/test/webrtc/head.js @@ -936,10 +936,10 @@ function checkDeviceSelectors(aExpectedTypes, aWindow = window) { * Tests the siteIdentity icons, the permission panel and the global indicator * UI state. * - * @param {Object} aExpected - Expected state for the current tab. + * @param {object} aExpected - Expected state for the current tab. * @param {window} [aWin] - Top level chrome window to test state of. - * @param {Object} [aExpectedGlobal] - Expected state for all tabs. - * @param {Object} [aExpectedPerm] - Expected permission states keyed by device + * @param {object} [aExpectedGlobal] - Expected state for all tabs. + * @param {object} [aExpectedPerm] - Expected permission states keyed by device * type. */ async function checkSharingUI( @@ -1305,7 +1305,7 @@ async function runTests(tests, options = {}) { * @param {<xul:browser} browser - The browser to share devices with. * @param {boolean} camera - True to share a camera device. * @param {boolean} mic - True to share a microphone device. - * @param {Number} [screenOrWin] - One of either SHARE_WINDOW or SHARE_SCREEN + * @param {number} [screenOrWin] - One of either SHARE_WINDOW or SHARE_SCREEN * to share a window or screen. Defaults to neither. * @param {boolean} remember - True to persist the permission to the * SitePermissions database as SitePermissions.SCOPE_PERSISTENT. Note that diff --git a/browser/base/content/test/zoom/browser_zoom_commands.js b/browser/base/content/test/zoom/browser_zoom_commands.js @@ -10,7 +10,7 @@ const TEST_PAGE_URL = * Waits for the zoom commands in the window to have the expected enabled * state. * - * @param {Object} expectedState + * @param {object} expectedState * An object where each key represents one of the zoom commands, * and the value is a boolean that is true if the command should * be enabled, and false if it should be disabled. diff --git a/browser/components/aboutlogins/tests/browser/AboutLoginsTestUtils.sys.mjs b/browser/components/aboutlogins/tests/browser/AboutLoginsTestUtils.sys.mjs @@ -14,7 +14,7 @@ export class AboutLoginsTestUtils { * The content object. * @param {ContentTaskUtils} ContentTaskUtils * The ContentTaskUtils object. - * @returns {Promise<Object>} A promise that contains added, modified, noChange and errors count. + * @returns {Promise<object>} A promise that contains added, modified, noChange and errors count. */ static async getCsvImportSuccessDialogData(content, ContentTaskUtils) { let dialog = Cu.waiveXrays( @@ -51,7 +51,7 @@ export class AboutLoginsTestUtils { * * @param {content} content * The content object. - * @returns {Promise<Object>} A promise that contains the hidden state and l10n id for title, description and focused element. + * @returns {Promise<object>} A promise that contains the hidden state and l10n id for title, description and focused element. */ static async getCsvImportErrorDialogData(content) { const dialog = Cu.waiveXrays( @@ -77,7 +77,7 @@ export class AboutLoginsTestUtils { * * @param {content} content * The content object. - * @returns {Promise<Object>} A promise that contains the detailed report data like added, modified, noChange, errors and rows. + * @returns {Promise<object>} A promise that contains the detailed report data like added, modified, noChange, errors and rows. */ static async getCsvImportReportData(content) { const rows = []; diff --git a/browser/components/aboutlogins/tests/browser/browser_openImportCSV.js b/browser/components/aboutlogins/tests/browser/browser_openImportCSV.js @@ -98,7 +98,7 @@ class CsvImportHelper { * * @param {browser} browser * The browser object. - * @returns {Promise<Object>} A promise that contains added, modified, noChange and errors count. + * @returns {Promise<object>} A promise that contains added, modified, noChange and errors count. */ static async getCsvImportSuccessDialogData(browser) { return SpecialPowers.spawn(browser, [], async () => { @@ -141,7 +141,7 @@ class CsvImportHelper { * * @param {browser} browser * The browser object. - * @returns {Promise<Object>} A promise that contains the hidden state and l10n id for title, description and focused element. + * @returns {Promise<object>} A promise that contains the hidden state and l10n id for title, description and focused element. */ static async getCsvImportErrorDialogData(browser) { return SpecialPowers.spawn(browser, [], async () => { @@ -184,7 +184,7 @@ class CsvImportHelper { * * @param {browser} browser * The browser object. - * @returns {Promise<Object>} A promise that contains the about:loginsimportreport tab. + * @returns {Promise<object>} A promise that contains the about:loginsimportreport tab. */ static async clickDetailedReport(browser) { let loadedReportTab = BrowserTestUtils.waitForNewTab( @@ -212,7 +212,7 @@ class CsvImportHelper { /** * An utility method to fetch data from the about:loginsimportreport page. * - * @returns {Promise<Object>} A promise that contains the detailed report data like added, modified, noChange, errors and rows. + * @returns {Promise<object>} A promise that contains the detailed report data like added, modified, noChange, errors and rows. */ static async getDetailedReportData() { const data = await SpecialPowers.spawn( diff --git a/browser/components/asrouter/modules/ASRouter.sys.mjs b/browser/components/asrouter/modules/ASRouter.sys.mjs @@ -1770,7 +1770,7 @@ export class _ASRouter { * for the given items, then store it and return it. * * @param {obj} state Reference to ASRouter internal state - * @param {array} items Can be messages, providers or groups that we count impressions for + * @param {Array} items Can be messages, providers or groups that we count impressions for * @param {string} impressionsString Key name for entry in state where impressions are stored */ _cleanupImpressionsForItems(state, items, impressionsString) { @@ -1821,7 +1821,7 @@ export class _ASRouter { * - Updates the shared database after each cleanup operation * * @param {obj} state Reference to ASRouter internal state - * @param {array} items are messages that we count impressions for + * @param {Array} items are messages that we count impressions for * @param {string} impressionsString Key name for entry in state where impressions are stored * @returns {obj} Updated impressions object with cleaned data */ diff --git a/browser/components/asrouter/modules/ASRouterTargeting.sys.mjs b/browser/components/asrouter/modules/ASRouterTargeting.sys.mjs @@ -585,7 +585,7 @@ function parseAboutPageURL(url) { /** * Get the number of records in autofill storage, e.g. credit cards/addresses. * - * @param {Object} [data] + * @param {object} [data] * @param {string} [data.collectionName] * The name used to specify which collection to retrieve records. * @param {string} [data.searchString] @@ -1276,7 +1276,7 @@ const TargetingGetters = { * web content. The available height and width are each calculated taking * into account the presence of menu bars, docks, and other similar OS elements * - * @returns {Object} resolution The resolution object containing width and height + * @returns {object} resolution The resolution object containing width and height * @returns {number} resolution.width The available width of the primary monitor * @returns {number} resolution.height The available height of the primary monitor */ diff --git a/browser/components/asrouter/modules/FeatureCallout.sys.mjs b/browser/components/asrouter/modules/FeatureCallout.sys.mjs @@ -31,18 +31,18 @@ ChromeUtils.defineLazyGetter(lazy, "log", () => { */ export class FeatureCallout { /** - * @typedef {Object} FeatureCalloutOptions + * @typedef {object} FeatureCalloutOptions * @property {Window} win window in which messages will be rendered. - * @property {{name: String, defaultValue?: String}} [pref] optional pref used + * @property {{name: string, defaultValue?: string}} [pref] optional pref used * to track progress through a given feature tour. for example: * { * name: "browser.pdfjs.feature-tour", * defaultValue: '{ screen: "FEATURE_CALLOUT_1", complete: false }', * } * or { name: "browser.pdfjs.feature-tour" } (defaultValue is optional) - * @property {String} [location] string to pass as the page when requesting + * @property {string} [location] string to pass as the page when requesting * messages from ASRouter and sending telemetry. - * @property {String} context either "chrome" or "content". "chrome" is used + * @property {string} context either "chrome" or "content". "chrome" is used * when the callout is shown in the browser chrome, and "content" is used * when the callout is shown in a content page like Firefox View. * @property {MozBrowser} [browser] <browser> element responsible for the @@ -192,15 +192,15 @@ export class FeatureCallout { } /** - * @typedef {Object} AdvanceScreensOptions - * @property {Boolean|"actionResult"} [behavior] Set to true to take effect + * @typedef {object} AdvanceScreensOptions + * @property {boolean | "actionResult"} [behavior] Set to true to take effect * immediately, or set to "actionResult" to only advance screens after the * special message action has resolved successfully. "actionResult" requires * `action.needsAwait` to be true. Defaults to true. - * @property {String} [id] The id of the screen to advance to. If both id and + * @property {string} [id] The id of the screen to advance to. If both id and * direction are provided (which they shouldn't be), the id takes priority. * Either `id` or `direction` is required. Passing `%end%` ends the tour. - * @property {Number} [direction] How many screens, and in which direction, to + * @property {number} [direction] How many screens, and in which direction, to * advance. Positive integers advance forward, negative integers advance * backward. Must be an integer. If advancing by the specified number of * screens would take you beyond the last screen, it will end the tour, just @@ -571,18 +571,18 @@ export class FeatureCallout { */ /** - * @typedef {Object} PanelPosition Specifies how the callout panel should be + * @typedef {object} PanelPosition Specifies how the callout panel should be * positioned relative to the anchor element, by providing which point on * the callout should be aligned with which point on the anchor element. * @property {PopupAttachmentPoint} anchor_attachment * @property {PopupAttachmentPoint} callout_attachment - * @property {String} [panel_position_string] The attachments joined into a + * @property {string} [panel_position_string] The attachments joined into a * string, e.g. "bottomleft topright". Passed to XULPopupElement::openPopup. * This is not provided by JSON, but generated from anchor_attachment and * callout_attachment. - * @property {Number} [offset_x] Offset in pixels to apply to the callout + * @property {number} [offset_x] Offset in pixels to apply to the callout * position in the horizontal direction. - * @property {Number} [offset_y] The same in the vertical direction. + * @property {number} [offset_y] The same in the vertical direction. * * This is used when you want the callout to be displayed as a <panel> * element. A panel is critical when the callout is displayed in the browser @@ -618,35 +618,35 @@ export class FeatureCallout { */ /** - * @typedef {Object} PositionOverride CSS properties to override + * @typedef {object} PositionOverride CSS properties to override * the callout's position relative to the anchor element. Although the * callout is not actually a child of the anchor element, this allows * absolute positioning of the callout relative to the anchor element. In * other words, { top: "0px", left: "0px" } will position the callout in the * top left corner of the anchor element, in the same way these properties * would position a child element. - * @property {String} [top] - * @property {String} [left] - * @property {String} [right] - * @property {String} [bottom] + * @property {string} [top] + * @property {string} [left] + * @property {string} [right] + * @property {string} [bottom] */ /** - * @typedef {Object} AutoFocusOptions For the optional autofocus feature. - * @property {String} [selector] A preferred CSS selector, if you want a + * @typedef {object} AutoFocusOptions For the optional autofocus feature. + * @property {string} [selector] A preferred CSS selector, if you want a * specific element to be focused. If omitted, the default prioritization * listed below will be used, based on `use_defaults`. * Default prioritization: primary_button, secondary_button, additional_button * (excluding pseudo-links), dismiss_button, <input>, any button. - * @property {Boolean} [use_defaults] Whether to use the default element + * @property {boolean} [use_defaults] Whether to use the default element * prioritization. If `selector` is provided and the element can't be found, * and this is set to false, nothing will be selected. If `selector` is not * provided, this must be true. Defaults to true. */ /** - * @typedef {Object} Anchor - * @property {String} selector CSS selector for the anchor node. + * @typedef {object} Anchor + * @property {string} selector CSS selector for the anchor node. * @property {Element} [element] The anchor node resolved from the selector. * Not provided by JSON, but generated dynamically. * @property {PanelPosition} [panel_position] Used to show the callout in a @@ -656,12 +656,12 @@ export class FeatureCallout { * @property {PositionOverride} [absolute_position] Only used for HTML * callouts, i.e. when panel_position is not specified. Allows absolute * positioning of the callout relative to the anchor element. - * @property {Boolean} [hide_arrow] Whether to hide the arrow. - * @property {Boolean} [no_open_on_anchor] Whether to set the [open] style on + * @property {boolean} [hide_arrow] Whether to hide the arrow. + * @property {boolean} [no_open_on_anchor] Whether to set the [open] style on * the anchor element when the callout is shown. False to set it, true to * not set it. This only works for panel callouts. Not all elements have an * [open] style. Buttons do, for example. It's usually similar to :active. - * @property {Number} [arrow_width] The desired width of the arrow in a number + * @property {number} [arrow_width] The desired width of the arrow in a number * of pixels. 33.94113 by default (this corresponds to 24px edges). * @property {AutoFocusOptions} [autofocus] Options for the optional autofocus * feature. Typically omitted, but if provided, an element inside the @@ -930,7 +930,7 @@ export class FeatureCallout { * form "anchor_attachment callout_attachment". * * @param {PanelPosition} panelPosition - * @returns {String|null} A string like "bottomcenter topright", or null if + * @returns {string | null} A string like "bottomcenter topright", or null if * the panelPosition object is invalid. */ _getPanelPositionString(panelPosition) { @@ -1171,7 +1171,7 @@ export class FeatureCallout { * Horizontally align a top/bottom-positioned callout according to the * passed position. * - * @param {String} position one of... + * @param {string} position one of... * - "center": for use with top/bottom. arrow is in the center, and the * center of the callout aligns with the parent center. * - "center-arrow-start": for use with center-arrow-top-start. arrow is @@ -1624,7 +1624,7 @@ export class FeatureCallout { /** * Emit an event to the broker, if one is present. * - * @param {String} name + * @param {string} name * @param {any} data */ _emitEvent(name, data) { @@ -1753,8 +1753,8 @@ export class FeatureCallout { * in this.config, which is returned by AWGetFeatureConfig. The aboutwelcome * bundle will use that function to get the content when it executes. * - * @param {Object} [message] ASRouter message. Omit to request a new one. - * @param {Number} [screenIndex] Index of the screen to render. + * @param {object} [message] ASRouter message. Omit to request a new one. + * @param {number} [screenIndex] Index of the screen to render. * @returns {Promise<boolean>} true if a message is loaded, false if not. */ async _updateConfig(message, screenIndex) { @@ -1828,7 +1828,7 @@ export class FeatureCallout { * Request a message from ASRouter, targeting the `browser` and `page` values * passed to the constructor. * - * @returns {Promise<Object>} the requested message. + * @returns {Promise<object>} the requested message. */ async _loadConfig() { this.loadingConfig = true; @@ -1846,7 +1846,7 @@ export class FeatureCallout { /** * Try to render the callout in the current document. * - * @returns {Promise<Boolean>} whether the callout was rendered. + * @returns {Promise<boolean>} whether the callout was rendered. */ async _renderCallout() { this._setupWindowFunctions(); @@ -1869,32 +1869,32 @@ export class FeatureCallout { * * @param {Array<PageEventListenerConfig>} listeners * - * @typedef {Object} PageEventListenerConfig + * @typedef {object} PageEventListenerConfig * @property {PageEventListenerParams} params Event listener parameters * @property {PageEventListenerAction} action Sent when the event fires * - * @typedef {Object} PageEventListenerParams See PageEventManager.sys.mjs - * @property {String} type Event type string e.g. `click` - * @property {String} [selectors] Target selector, e.g. `tag.class, #id[attr]` + * @typedef {object} PageEventListenerParams See PageEventManager.sys.mjs + * @property {string} type Event type string e.g. `click` + * @property {string} [selectors] Target selector, e.g. `tag.class, #id[attr]` * @property {PageEventListenerOptions} [options] addEventListener options * - * @typedef {Object} PageEventListenerOptions - * @property {Boolean} [capture] Use event capturing phase - * @property {Boolean} [once] Remove listener after first event - * @property {Boolean} [preventDefault] Prevent default action - * @property {Number} [interval] Used only for `timeout` and `interval` event + * @typedef {object} PageEventListenerOptions + * @property {boolean} [capture] Use event capturing phase + * @property {boolean} [once] Remove listener after first event + * @property {boolean} [preventDefault] Prevent default action + * @property {number} [interval] Used only for `timeout` and `interval` event * types. These don't set up real event listeners, but instead invoke the * action on a timer. - * @property {Boolean} [every_window] Extend addEventListener to all windows. + * @property {boolean} [every_window] Extend addEventListener to all windows. * Not compatible with `interval`. * - * @typedef {Object} PageEventListenerAction Action sent to AboutWelcomeParent - * @property {String} [type] Action type, e.g. `OPEN_URL` - * @property {Object} [data] Extra data, properties depend on action type + * @typedef {object} PageEventListenerAction Action sent to AboutWelcomeParent + * @property {string} [type] Action type, e.g. `OPEN_URL` + * @property {object} [data] Extra data, properties depend on action type * @property {AdvanceScreensOptions} [advance_screens] Jump to a new screen - * @property {Boolean|"actionResult"} [dismiss] Dismiss callout - * @property {Boolean|"actionResult"} [reposition] Reposition callout - * @property {Boolean} [needsAwait] Wait for any special message actions + * @property {boolean | "actionResult"} [dismiss] Dismiss callout + * @property {boolean | "actionResult"} [reposition] Reposition callout + * @property {boolean} [needsAwait] Wait for any special message actions * (given by the type property above) to resolve before advancing screens, * dismissing, or repositioning the callout, if those actions are set to * "actionResult". @@ -1984,7 +1984,7 @@ export class FeatureCallout { * For a given element, calculate a unique string that identifies it. * * @param {Element} target Element to calculate the selector for - * @returns {String} Computed event target selector, e.g. `button#next` + * @returns {string} Computed event target selector, e.g. `button#next` */ _getUniqueElementIdentifier(target) { let source; @@ -2066,8 +2066,8 @@ export class FeatureCallout { * Show a feature callout message, either by requesting one from ASRouter or * by showing a message passed as an argument. * - * @param {Object} [message] optional message to show instead of requesting one - * @returns {Promise<Boolean>} true if a message was shown + * @param {object} [message] optional message to show instead of requesting one + * @returns {Promise<boolean>} true if a message was shown */ async showFeatureCallout(message) { let updated = await this._updateConfig(message); @@ -2157,17 +2157,17 @@ export class FeatureCallout { } /** - * @typedef {Object} FeatureCalloutTheme An object with a set of custom color + * @typedef {object} FeatureCalloutTheme An object with a set of custom color * schemes and/or a preset key. If both are provided, the preset will be * applied first, then the custom themes will override the preset values. - * @property {String} [preset] Key of {@link FeatureCallout.themePresets} + * @property {string} [preset] Key of {@link FeatureCallout.themePresets} * @property {ColorScheme} [light] Custom light scheme * @property {ColorScheme} [dark] Custom dark scheme * @property {ColorScheme} [hcm] Custom high contrast scheme * @property {ColorScheme} [all] Custom scheme that will be applied in all * cases, but overridden by the other schemes if they are present. This is * useful if the values are already controlled by the browser theme. - * @property {Boolean} [simulateContent] Set to true if the feature callout + * @property {boolean} [simulateContent] Set to true if the feature callout * exists in the browser chrome but is meant to be displayed over the * content area to appear as if it is part of the page. This will cause the * styles to use a media query targeting the content instead of the chrome, @@ -2177,7 +2177,7 @@ export class FeatureCallout { */ /** - * @typedef {Object} ColorScheme An object with key-value pairs, with keys + * @typedef {object} ColorScheme An object with key-value pairs, with keys * from {@link FeatureCallout.themePropNames}, mapped to CSS color values */ @@ -2235,8 +2235,8 @@ export class FeatureCallout { /** * Set or remove a CSS custom property on the feature callout container * - * @param {String} name Name of the CSS custom property - * @param {String|void} [value] Value of the property, or omit to remove it + * @param {string} name Name of the CSS custom property + * @param {string | void} [value] Value of the property, or omit to remove it */ _setThemeVariable(name, value) { if (value) { @@ -2279,7 +2279,7 @@ export class FeatureCallout { "dismiss-button-background-active", ]; - /** @type {Object<String, FeatureCalloutTheme>} */ + /** @type {Object<string, FeatureCalloutTheme>} */ static themePresets = { // For themed system pages like New Tab and Firefox View. Themed content // colors inherit from the user's theme through contentTheme.js. diff --git a/browser/components/asrouter/modules/FeatureCalloutBroker.sys.mjs b/browser/components/asrouter/modules/FeatureCalloutBroker.sys.mjs @@ -9,16 +9,16 @@ ChromeUtils.defineESModuleGetters(lazy, { }); /** - * @typedef {Object} FeatureCalloutOptions + * @typedef {object} FeatureCalloutOptions * @property {Window} win window in which messages will be rendered. - * @property {{name: String, defaultValue?: String}} [pref] optional pref used + * @property {{name: string, defaultValue?: string}} [pref] optional pref used * to track progress through a given feature tour. for example: * { * name: "browser.pdfjs.feature-tour", * defaultValue: '{ screen: "FEATURE_CALLOUT_1", complete: false }', * } * or { name: "browser.pdfjs.feature-tour" } (defaultValue is optional) - * @property {String} [location] string to pass as the page when requesting + * @property {string} [location] string to pass as the page when requesting * messages from ASRouter and sending telemetry. * @property {MozBrowser} [browser] <browser> element responsible for the * feature callout. for content pages, this is the browser element that the @@ -31,10 +31,10 @@ ChromeUtils.defineESModuleGetters(lazy, { /** @typedef {import("resource:///modules/asrouter/FeatureCallout.sys.mjs").FeatureCalloutTheme} FeatureCalloutTheme */ /** - * @typedef {Object} FeatureCalloutItem + * @typedef {object} FeatureCalloutItem * @property {lazy.FeatureCallout} callout instance of FeatureCallout. * @property {Function} [cleanup] cleanup callback. - * @property {Boolean} showing whether the callout is currently showing. + * @property {boolean} showing whether the callout is currently showing. */ export class _FeatureCalloutBroker { @@ -76,9 +76,9 @@ export class _FeatureCalloutBroker { * trigger has matched to a feature_callout message. * * @param {MozBrowser} browser <browser> element associated with the trigger. - * @param {Object} message feature_callout message from ASRouter. + * @param {object} message feature_callout message from ASRouter. * @see {@link FeatureCalloutMessages.sys.mjs} - * @returns {Promise<Boolean>} whether the callout was shown. + * @returns {Promise<boolean>} whether the callout was shown. */ async showFeatureCallout(browser, message) { // Only show one callout at a time, across all windows. @@ -154,7 +154,7 @@ export class _FeatureCalloutBroker { * with chrome feature callouts. * * @param {FeatureCalloutOptions} config - * @param {Object} message feature_callout message from ASRouter. + * @param {object} message feature_callout message from ASRouter. * @see {@link FeatureCalloutMessages.sys.mjs} * @returns {FeatureCalloutItem|null} the callout item, if one was created. */ @@ -207,7 +207,7 @@ export class _FeatureCalloutBroker { } } - /** @returns {Boolean} whether a callout is currently showing. */ + /** @returns {boolean} whether a callout is currently showing. */ get isCalloutShowing() { return [...this.#calloutMap.values()].some(({ showing }) => showing); } diff --git a/browser/components/asrouter/modules/FeatureCalloutMessages.sys.mjs b/browser/components/asrouter/modules/FeatureCalloutMessages.sys.mjs @@ -41,10 +41,10 @@ const matchCurrentScreenTargeting = (prefName, screenIdRegEx = ".*") => { * Creates a "hasn't been viewed in > 24 hours" * JEXL string and adds it to each message specified * - * @param {array} messageIds - IDs of messages that the targeting string will be added to + * @param {Array} messageIds - IDs of messages that the targeting string will be added to * @param {string} prefix - The prefix of messageIDs that will used to create the JEXL string - * @param {array} messages - The array of messages that will be edited - * @returns {array} - The array of messages with the appropriate targeting strings edited + * @param {Array} messages - The array of messages that will be edited + * @returns {Array} - The array of messages with the appropriate targeting strings edited */ function add24HourImpressionJEXLTargeting( messageIds, diff --git a/browser/components/asrouter/modules/InfoBar.sys.mjs b/browser/components/asrouter/modules/InfoBar.sys.mjs @@ -346,7 +346,7 @@ class InfoBarNotification { * Callback fired when a button in the infobar is clicked. * * @param {Element} notificationBox - The `<notification-message>` element representing the infobar. - * @param {Object} btnDescription - An object describing the button, includes the label, the action with an optional dismiss property, and primary button styling. + * @param {object} btnDescription - An object describing the button, includes the label, the action with an optional dismiss property, and primary button styling. * @param {Element} target - The <button> DOM element that was clicked. * @returns {boolean} `true` to keep the infobar open, `false` to dismiss it. */ diff --git a/browser/components/asrouter/modules/PageEventManager.sys.mjs b/browser/components/asrouter/modules/PageEventManager.sys.mjs @@ -13,25 +13,25 @@ export class PageEventManager { /** * A set of parameters defining a page event listener. * - * @typedef {Object} PageEventListenerParams - * @property {String} type Event type string e.g. `click` - * @property {String} [selectors] Target selector, e.g. `tag.class, #id[attr]` + * @typedef {object} PageEventListenerParams + * @property {string} type Event type string e.g. `click` + * @property {string} [selectors] Target selector, e.g. `tag.class, #id[attr]` * @property {PageEventListenerOptions} [options] addEventListener options * - * @typedef {Object} PageEventListenerOptions - * @property {Boolean} [capture] Use event capturing phase? - * @property {Boolean} [once] Remove listener after first event? - * @property {Boolean} [preventDefault] Inverted value for `passive` option - * @property {Number} [interval] Used only for `timeout` and `interval` event + * @typedef {object} PageEventListenerOptions + * @property {boolean} [capture] Use event capturing phase? + * @property {boolean} [once] Remove listener after first event? + * @property {boolean} [preventDefault] Inverted value for `passive` option + * @property {number} [interval] Used only for `timeout` and `interval` event * types. These don't set up real event listeners, but instead invoke the * action on a timer. * - * @typedef {Object} PageEventListener + * @typedef {object} PageEventListener * @property {Function} callback Function to call when event is triggered * @property {AbortController} controller Handle for aborting the listener * - * @typedef {Object} PageEvent - * @property {String} type Event type string e.g. `click` + * @typedef {object} PageEvent + * @property {string} type Event type string e.g. `click` * @property {Element} [target] Event target */ diff --git a/browser/components/asrouter/tests/unit/utils.js b/browser/components/asrouter/tests/unit/utils.js @@ -75,7 +75,7 @@ export const FAKE_GLOBAL_PREFS = new Map(); * Very simple fake for the most basic semantics of nsIPrefBranch. Lots of * things aren't yet supported. Feel free to add them in. * - * @param {Object} args - optional arguments + * @param {object} args - optional arguments * @param {Function} args.initHook - if present, will be called back * inside the constructor. Typically used from tests * to save off a pointer to the created instance so that diff --git a/browser/components/attribution/AttributionCode.sys.mjs b/browser/components/attribution/AttributionCode.sys.mjs @@ -92,7 +92,7 @@ export var AttributionCode = { /** * Write the given attribution code to the attribution file. * - * @param {String} code to write. + * @param {string} code to write. */ async writeAttributionFile(code) { // Writing attribution files is only used as part of test code diff --git a/browser/components/downloads/DownloadSpamProtection.sys.mjs b/browser/components/downloads/DownloadSpamProtection.sys.mjs @@ -36,7 +36,7 @@ class WindowSpamProtection { * download's source URL. This is done so we can track the number of times a * given download has been blocked. * - * @type {Map<String, DownloadSpam>} + * @type {Map<string, DownloadSpam>} */ _downloadSpamForUrl = new Map(); @@ -45,7 +45,7 @@ class WindowSpamProtection { * listeners attached. They will be attached when the spamList is created * (i.e. when the first spam download is blocked). * - * @type {Set<Object>} + * @type {Set<object>} */ _pendingViews = new Set(); @@ -55,7 +55,7 @@ class WindowSpamProtection { * sessions will have no blocked downloads. So we don't want to create a * DownloadList unless we actually need it. * - * @type {Boolean} + * @type {boolean} */ _blocking = false; @@ -95,7 +95,7 @@ class WindowSpamProtection { * Add a blocked download to the spamList or increment the count of an * existing blocked download, then notify listeners about this. * - * @param {String} url + * @param {string} url */ addDownloadSpam(url) { this._blocking = true; @@ -143,7 +143,7 @@ class WindowSpamProtection { /** * Remove the download spam data for a given source URL. * - * @param {String} url + * @param {string} url */ removeDownloadSpamForUrl(url) { if (this._downloadSpamForUrl.has(url)) { @@ -158,7 +158,7 @@ class WindowSpamProtection { * Set up a downloads view (e.g. the downloads panel) to receive notifications * about downloads in the spamList. * - * @param {Object} view An object that implements handlers for download + * @param {object} view An object that implements handlers for download * related notifications, like onDownloadAdded. */ registerView(view) { @@ -216,7 +216,7 @@ export class DownloadSpamProtection { * download was blocked. This is invoked when a download is blocked by * nsExternalAppHandler::IsDownloadSpam * - * @param {String} url + * @param {string} url * @param {Window} window */ update(url, window) { @@ -250,7 +250,7 @@ export class DownloadSpamProtection { * Remove the download spam data for a given source URL in the passed window, * if any exists. * - * @param {String} url + * @param {string} url * @param {Window} window */ removeDownloadSpamForWindow(url, window) { @@ -264,7 +264,7 @@ export class DownloadSpamProtection { * downloads view. The bulk of resources won't be expended until a download is * blocked. To add multiple views, call this method multiple times. * - * @param {Object} view An object that implements handlers for download + * @param {object} view An object that implements handlers for download * related notifications, like onDownloadAdded. * @param {Window} window */ diff --git a/browser/components/preferences/dialogs/browserLanguages.js b/browser/components/preferences/dialogs/browserLanguages.js @@ -413,7 +413,7 @@ var gBrowserLanguagesDialog = { async onLoad() { /** - * @typedef {Object} Options - Options passed in to configure the subdialog. + * @typedef {object} Options - Options passed in to configure the subdialog. * @property {string} telemetryId, * @property {Array<string>} [selectedLocalesForRestart] The optional list of * previously selected locales for when a restart is required. This list is diff --git a/browser/components/preferences/dialogs/permissions.js b/browser/components/preferences/dialogs/permissions.js @@ -76,7 +76,7 @@ var gPermissionManager = { }, /** - * @param {Object} params + * @param {object} params * @param {string} params.permissionType Permission type for which the dialog should be shown * @param {string} params.prefilledHost The value which the URL field should initially contain * @param {boolean} params.blockVisible Display the "Block" button in the dialog diff --git a/browser/components/preferences/main.js b/browser/components/preferences/main.js @@ -3301,7 +3301,7 @@ var gMainPane = { /** * The fully initialized state. * - * @param {Object} supportedLanguages + * @param {object} supportedLanguages * @param {Array<{ langTag: string, displayName: string}>} languageList * @param {Map<string, DownloadPhase>} downloadPhases */ diff --git a/browser/components/preferences/search.js b/browser/components/preferences/search.js @@ -525,14 +525,14 @@ class EngineStore { /** * A list of engines that are currently visible in the UI. * - * @type {Object[]} + * @type {object[]} */ engines = []; /** * A list of listeners to be notified when the engine list changes. * - * @type {Object[]} + * @type {object[]} */ #listeners = []; diff --git a/browser/components/preferences/tests/head.js b/browser/components/preferences/tests/head.js @@ -274,7 +274,7 @@ async function waitForAndAssertPrefState(pref, expectedValue, message) { */ async function mockDefaultFxAInstance() { /** - * @typedef {Object} MockFxAUtilityFunctions + * @typedef {object} MockFxAUtilityFunctions * @property {function():void} mock - Makes the dummy values default, creating * the illusion of a production FxA instance. * @property {function():void} unmock - Restores the true defaults, creating diff --git a/browser/components/preferences/translations.js b/browser/components/preferences/translations.js @@ -504,7 +504,7 @@ let gTranslationsPane = { * * @param {Array<string>} currentSet * @param {Array<string>} newSet - * @returns {Object} {Array<string>, Array<string>} + * @returns {object} {Array<string>, Array<string>} */ setDifference(currentSet, newSet) { const added = newSet.filter(lang => !currentSet.includes(lang)); diff --git a/browser/components/preferences/widgets/setting-control/setting-control.mjs b/browser/components/preferences/widgets/setting-control/setting-control.mjs @@ -22,21 +22,21 @@ import MozInputFolder from "chrome://global/content/elements/moz-input-folder.mj /** @import { Setting } from "chrome://global/content/preferences/Setting.mjs" */ /** - * @typedef {Object} SettingNestedConfig + * @typedef {object} SettingNestedConfig * @property {SettingControlConfig[]} [items] Additional nested SettingControls to render. * @property {SettingOptionConfig[]} [options] * Additional nested plain elements to render (may have SettingControls nested within them, though). */ /** - * @typedef {Object} SettingOptionConfigExtensions + * @typedef {object} SettingOptionConfigExtensions * @property {string} [control] * The element tag to render, default assumed based on parent control. * @property {any} [value] A value to set on the option. */ /** - * @typedef {Object} SettingControlConfigExtensions + * @typedef {object} SettingControlConfigExtensions * @property {string} id * The ID for the Setting, also set in the DOM unless overridden with controlAttrs.id * @property {string} [control] The element to render, default to "moz-checkbox". diff --git a/browser/components/preferences/widgets/setting-element/setting-element.mjs b/browser/components/preferences/widgets/setting-element/setting-element.mjs @@ -14,7 +14,7 @@ import { MozLitElement } from "chrome://global/content/lit-utils.mjs"; /** @import { AttributePart } from "chrome://global/content/vendor/lit.all.mjs" */ /** - * @typedef {Object} SettingElementConfig + * @typedef {object} SettingElementConfig * @property {string} [id] - The ID for the Setting, this should match the layout id * @property {string} [l10nId] - The Fluent l10n ID for the setting * @property {Record<string, string>} [l10nArgs] - An object containing l10n IDs and their values that will be translated with Fluent diff --git a/browser/components/screenshots/ScreenshotsOverlayChild.sys.mjs b/browser/components/screenshots/ScreenshotsOverlayChild.sys.mjs @@ -588,7 +588,7 @@ export class ScreenshotsOverlay { * metaKey for macOS. ctrlKey for Windows and Linux. * * @param {Event} event The keydown event - * @returns {Boolean} True if the accel key is pressed, false otherwise. + * @returns {boolean} True if the accel key is pressed, false otherwise. */ getAccelKey(event) { if (AppConstants.platform === "macosx") { @@ -1140,7 +1140,7 @@ export class ScreenshotsOverlay { * * @param {KeyEvent} event The keydown event * - * @returns {Boolean} True if the event was handled here, otherwise false. + * @returns {boolean} True if the event was handled here, otherwise false. */ handleKeyDownOnButton(event) { switch (event.originalTarget) { @@ -1176,7 +1176,7 @@ export class ScreenshotsOverlay { /** * Dispatch a custom event to the ScreenshotsComponentChild actor * - * @param {String} eventType The name of the event + * @param {string} eventType The name of the event * @param {object} detail Extra details to send to the child actor */ #dispatchEvent(eventType, detail) { @@ -1192,8 +1192,8 @@ export class ScreenshotsOverlay { /** * Set a new state for the overlay * - * @param {String} newState - * @param {Object} options (optional) Options for calling start of state method + * @param {string} newState + * @param {object} options (optional) Options for calling start of state method */ #setState(newState, options = {}) { if (this.#state === STATES.SELECTED && newState === STATES.CROSSHAIRS) { @@ -1319,8 +1319,8 @@ export class ScreenshotsOverlay { * Dragging has started so we set the initial selection region and set the * state to draggingReady. * - * @param {Number} pageX The x position relative to the page - * @param {Number} pageY The y position relative to the page + * @param {number} pageX The x position relative to the page + * @param {number} pageY The y position relative to the page */ crosshairsDragStart(pageX, pageY) { this.selectionRegion.dimensions = { @@ -1337,9 +1337,9 @@ export class ScreenshotsOverlay { * If the background is clicked we set the state to crosshairs * otherwise set the state to resizing * - * @param {Number} pageX The x position relative to the page - * @param {Number} pageY The y position relative to the page - * @param {String} targetId The id of the event target + * @param {number} pageX The x position relative to the page + * @param {number} pageY The y position relative to the page + * @param {string} targetId The id of the event target */ selectedDragStart(pageX, pageY, targetId) { if (targetId === this.screenshotsContainer.id) { @@ -1357,8 +1357,8 @@ export class ScreenshotsOverlay { * Draw the eyes in the preview container and find the element currently * being hovered. * - * @param {Number} clientX The x position relative to the viewport - * @param {Number} clientY The y position relative to the viewport + * @param {number} clientX The x position relative to the viewport + * @param {number} clientY The y position relative to the viewport */ crosshairsMove(clientX, clientY) { this.drawPreviewEyes(clientX, clientY); @@ -1370,8 +1370,8 @@ export class ScreenshotsOverlay { * Set the selection region dimensions and if the region is at least 40 * pixels diagnally in distance, set the state to dragging. * - * @param {Number} pageX The x position relative to the page - * @param {Number} pageY The y position relative to the page + * @param {number} pageX The x position relative to the page + * @param {number} pageY The y position relative to the page */ draggingReadyDrag(pageX, pageY) { this.selectionRegion.dimensions = { @@ -1388,8 +1388,8 @@ export class ScreenshotsOverlay { * Scroll if along the edge of the viewport, update the selection region * dimensions and draw the selection container. * - * @param {Number} pageX The x position relative to the page - * @param {Number} pageY The y position relative to the page + * @param {number} pageX The x position relative to the page + * @param {number} pageY The y position relative to the page */ draggingDrag(pageX, pageY) { this.scrollIfByEdge(pageX, pageY); @@ -1404,8 +1404,8 @@ export class ScreenshotsOverlay { /** * Resize the selection region depending on the mover that started the resize. * - * @param {Number} pageX The x position relative to the page - * @param {Number} pageY The y position relative to the page + * @param {number} pageX The x position relative to the page + * @param {number} pageY The y position relative to the page */ resizingDrag(pageX, pageY) { this.scrollIfByEdge(pageX, pageY); @@ -1529,7 +1529,7 @@ export class ScreenshotsOverlay { * container and set the state to selected. * Otherwise set the state to crosshairs. * - * @param {Object} options (optional) Options for passing to setState method + * @param {object} options (optional) Options for passing to setState method */ draggingReadyDragEnd(options = {}) { if (this.hoverElementRegion.isRegionValid) { @@ -1547,8 +1547,8 @@ export class ScreenshotsOverlay { /** * Update the selection region dimensions and set the state to selected. * - * @param {Number} pageX The x position relative to the page - * @param {Number} pageY The y position relative to the page + * @param {number} pageX The x position relative to the page + * @param {number} pageY The y position relative to the page */ draggingDragEnd(pageX, pageY) { this.selectionRegion.dimensions = { @@ -1564,8 +1564,8 @@ export class ScreenshotsOverlay { * Update the selection region dimensions by calling `resizingDrag` and set * the state to selected. * - * @param {Number} pageX The x position relative to the page - * @param {Number} pageY The y position relative to the page + * @param {number} pageX The x position relative to the page + * @param {number} pageY The y position relative to the page */ resizingDragEnd(pageX, pageY) { this.resizingDrag(pageX, pageY); @@ -1598,8 +1598,8 @@ export class ScreenshotsOverlay { /** * Draw the preview eyes pointer towards the mouse. * - * @param {Number} clientX The x position relative to the viewport - * @param {Number} clientY The y position relative to the viewport + * @param {number} clientX The x position relative to the viewport + * @param {number} clientY The y position relative to the viewport */ drawPreviewEyes(clientX, clientY) { let { clientWidth, clientHeight } = this.windowDimensions.dimensions; @@ -1806,8 +1806,8 @@ export class ScreenshotsOverlay { * If a reasonable element is found, draw the hover element container for * that element region. * - * @param {Number} clientX The x position relative to the viewport - * @param {Number} clientY The y position relative to the viewport + * @param {number} clientX The x position relative to the viewport + * @param {number} clientY The y position relative to the viewport */ async handleElementHover(clientX, clientY) { this.setPointerEventsNone(); @@ -1850,8 +1850,8 @@ export class ScreenshotsOverlay { /** * Scroll the viewport if near one or both of the edges. * - * @param {Number} pageX The x position relative to the page - * @param {Number} pageY The y position relative to the page + * @param {number} pageX The x position relative to the page + * @param {number} pageY The y position relative to the page */ scrollIfByEdge(pageX, pageY) { let { scrollX, scrollY, clientWidth, clientHeight } = @@ -1877,8 +1877,8 @@ export class ScreenshotsOverlay { /** * Scroll the window by the given amount. * - * @param {Number} x The x amount to scroll - * @param {Number} y The y amount to scroll + * @param {number} x The x amount to scroll + * @param {number} y The y amount to scroll */ scrollWindow(x, y) { this.window.scrollBy(x, y); @@ -1889,7 +1889,7 @@ export class ScreenshotsOverlay { * The page was resized or scrolled. We need to update the screenshots * container size so we don't draw outside the page bounds. * - * @param {String} eventType will be "scroll" or "resize" + * @param {string} eventType will be "scroll" or "resize" */ async updateScreenshotsOverlayDimensions(eventType) { let updateWindowDimensionsPromise = this.updateWindowDimensions(); @@ -1916,7 +1916,7 @@ export class ScreenshotsOverlay { /** * Returns the window's dimensions for the current window. * - * @return {Object} An object containing window dimensions + * @return {object} An object containing window dimensions * { * clientWidth: The width of the viewport * clientHeight: The height of the viewport diff --git a/browser/components/screenshots/ScreenshotsUtils.sys.mjs b/browser/components/screenshots/ScreenshotsUtils.sys.mjs @@ -393,7 +393,7 @@ export var ScreenshotsUtils = { * Move the native cursor to the given position. Clamp the position to the * window just in case. * - * @param {Object} position An object containing the left and top position + * @param {object} position An object containing the left and top position * @param {Browser} browser The selected browser */ moveCursor(position, browser) { @@ -1019,7 +1019,7 @@ export var ScreenshotsUtils = { * screenshot to the max width. If the area is still too large for the canvas * we will adjust the height so we can successfully capture the screenshot. * - * @param {Object} rect The dimensions of the screenshot. The rect will be + * @param {object} rect The dimensions of the screenshot. The rect will be * modified in place */ cropScreenshotRectIfNeeded(rect) { diff --git a/browser/components/screenshots/overlayHelpers.mjs b/browser/components/screenshots/overlayHelpers.mjs @@ -56,10 +56,10 @@ export function setMaxDetectWidth(maxWidth) { * * If the element is not an iframe, then we will just return the element. * - * @param {Number} x The x coordinate - * @param {Number} y The y coordinate + * @param {number} x The x coordinate + * @param {number} y The y coordinate * @param {Document} doc The document - * @returns {Object} + * @returns {object} * ele: The element for a given point (x, y) * rect: The rect for the given point if ele is an iframe * otherwise null @@ -247,7 +247,7 @@ export class Region { * Sets the dimensions if the given dimension is defined. * Otherwise will reset the dimensions * - * @param {Object} dims The new region dimensions + * @param {object} dims The new region dimensions * { * left: new left dimension value or undefined * top: new top dimension value or undefined diff --git a/browser/components/screenshots/screenshots-buttons.js b/browser/components/screenshots/screenshots-buttons.js @@ -60,7 +60,7 @@ * Focus the last used button. * This will default to the visible page button. * - * @param {String} buttonToFocus + * @param {string} buttonToFocus */ async focusButton(buttonToFocus) { await this.shadowRoot.querySelector("moz-button-group").updateComplete; diff --git a/browser/components/screenshots/screenshots-preview.mjs b/browser/components/screenshots/screenshots-preview.mjs @@ -130,7 +130,7 @@ class ScreenshotsPreview extends MozLitElement { * If the image is complete and the height is greater than 0, we can resolve. * Otherwise wait for a load event on the image and resolve then. * - * @returns {Promise<String>} Resolves that resolves to the preview image src + * @returns {Promise<string>} Resolves that resolves to the preview image src * once the image is loaded. */ async imageLoadedPromise() { @@ -210,7 +210,7 @@ class ScreenshotsPreview extends MozLitElement { * Set the focus to the most recent saved method. * This will default to the download button. * - * @param {String} buttonToFocus + * @param {string} buttonToFocus */ focusButton(buttonToFocus) { if (buttonToFocus === "copy") { diff --git a/browser/components/screenshots/tests/browser/head.js b/browser/components/screenshots/tests/browser/head.js @@ -337,10 +337,10 @@ class ScreenshotsHelper { * Note: The distance of the rect should be greater than 40 to enter in the "dragging" state. * See https://searchfox.org/mozilla-central/rev/af78418c4b5f2c8721d1a06486cf4cf0b33e1e8d/browser/components/screenshots/ScreenshotsOverlayChild.sys.mjs#809 * - * @param {Number} startX The starting X coordinate. The left edge of the overlay rect. - * @param {Number} startY The starting Y coordinate. The top edge of the overlay rect. - * @param {Number} endX The end X coordinate. The right edge of the overlay rect. - * @param {Number} endY The end Y coordinate. The bottom edge of the overlay rect. + * @param {number} startX The starting X coordinate. The left edge of the overlay rect. + * @param {number} startY The starting Y coordinate. The top edge of the overlay rect. + * @param {number} endX The end X coordinate. The right edge of the overlay rect. + * @param {number} endY The end Y coordinate. The bottom edge of the overlay rect. */ async dragOverlay( startX, @@ -741,7 +741,7 @@ class ScreenshotsHelper { /** * Gets the client and scroll demensions on the window * - * @returns { Object } + * @returns {object} * clientHeight The visible height * clientWidth The visible width * scrollHeight The scrollable height @@ -1037,7 +1037,7 @@ function getRawClipboardData(flavor) { * Synthesize a mouse event on an element * in the viewport. * - * @param {String} selector: The node selector to get the node target for the event. + * @param {string} selector: The node selector to get the node target for the event. * @param {number} x * @param {number} y * @param {object} options: Options that will be passed to BrowserTestUtils.synthesizeMouse @@ -1079,7 +1079,7 @@ async function safeSynthesizeKeyEventInContentPage(aKey, options, browser) { * Synthesize a touch event on an element * in the viewport. * - * @param {String} selector: The node selector to get the node target for the event. + * @param {string} selector: The node selector to get the node target for the event. * @param {number} x * @param {number} y * @param {object} options: Options that will be passed to BrowserTestUtils.synthesizeTouch diff --git a/browser/components/sessionstore/PageWireframes.sys.mjs b/browser/components/sessionstore/PageWireframes.sys.mjs @@ -12,8 +12,8 @@ export const PageWireframes = { * Returns the wireframe object for the current index of the session history * for the given tab. The wireframe will only exist with browser.history.collectWireframes. * - * @param {Object} tab - * @return {Object} wireframe + * @param {object} tab + * @return {object} wireframe * See dom/webidl/Document.webidl for the Wireframe dictionary */ getWireframeState(tab) { @@ -28,7 +28,7 @@ export const PageWireframes = { * Returns an SVG preview for the wireframe at the current index of the session history * for the given tab. The wireframe will only exist with browser.history.collectWireframes. * - * @param {Object} tab + * @param {object} tab * @return {SVGElement} */ getWireframeElementForTab(tab) { @@ -40,9 +40,9 @@ export const PageWireframes = { * Converts a color encoded as a uint32_t (Gecko's nscolor format) * to an rgb string. * - * @param {Number} nscolor + * @param {number} nscolor * An RGB color encoded in nscolor format. - * @return {String} + * @return {string} * A string of the form "rgb(r, g, b)". */ nscolorToRGB(nscolor) { @@ -56,7 +56,7 @@ export const PageWireframes = { * Converts a color encoded as a uint32_t (Gecko's nscolor format) * to an rgb string. * - * @param {Object} wireframe + * @param {object} wireframe * See Bug 1731714 and dom/webidl/Document.webidl for the Wireframe dictionary * @param {Document} document * A Document to crate SVG elements. diff --git a/browser/components/sessionstore/SessionStore.sys.mjs b/browser/components/sessionstore/SessionStore.sys.mjs @@ -272,7 +272,7 @@ export var SessionStore = { /** * Get the collection of all matching windows tracked by SessionStore * - * @param {Window|Object} [aWindowOrOptions] Optionally an options object or a window to used to determine if we're filtering for private or non-private windows + * @param {Window | object} [aWindowOrOptions] Optionally an options object or a window to used to determine if we're filtering for private or non-private windows * @param {boolean} [aWindowOrOptions.private] Determine if we should filter for private or non-private windows */ getWindows(aWindowOrOptions) { @@ -368,7 +368,7 @@ export var SessionStore = { /** * Get the number of closed tabs associated with all matching windows * - * @param {Window|Object} [aOptions] + * @param {Window | object} [aOptions] * Either a DOMWindow (see aOptions.sourceWindow) or an object with properties to identify which closed tabs to include in the count. * @param {Window} aOptions.sourceWindow @@ -408,7 +408,7 @@ export var SessionStore = { /** * Get the closed tab data associated with all matching windows * - * @param {Window|Object} [aOptions] + * @param {Window | object} [aOptions] * Either a DOMWindow (see aOptions.sourceWindow) or an object with properties to identify which closed tabs to get data from * @param {Window} aOptions.sourceWindow @@ -468,10 +468,10 @@ export var SessionStore = { /** * Re-open a closed tab * - * @param {Window|Object} aSource + * @param {Window | object} aSource * Either a DOMWindow or an object with properties to resolve to the window * the tab was previously open in. - * @param {String} aSource.sourceWindowId + * @param {string} aSource.sourceWindowId A SessionStore window id used to look up the window where the tab was closed * @param {number} aSource.sourceClosedId The closedId used to look up the closed window where the tab was closed @@ -487,10 +487,10 @@ export var SessionStore = { /** * Re-open a tab from a closed window, which corresponds to the closedId * - * @param {Window|Object} aSource + * @param {Window | object} aSource * Either a DOMWindow or an object with properties to resolve to the window * the tab was previously open in. - * @param {String} aSource.sourceWindowId + * @param {string} aSource.sourceWindowId A SessionStore window id used to look up the window where the tab was closed * @param {number} aSource.sourceClosedId The closedId used to look up the closed window where the tab was closed @@ -516,10 +516,10 @@ export var SessionStore = { * Removes the record at the given index so it cannot be un-closed or appear * in a list of recently-closed tabs * - * @param {Window|Object} aSource + * @param {Window | object} aSource * Either a DOMWindow or an object with properties to resolve to the window * the tab was previously open in. - * @param {String} aSource.sourceWindowId + * @param {string} aSource.sourceWindowId A SessionStore window id used to look up the window where the tab was closed * @param {number} aSource.sourceClosedId The closedId used to look up the closed window where the tab was closed @@ -536,10 +536,10 @@ export var SessionStore = { * Removes the record at the given index so it cannot be un-closed or appear * in a list of recently-closed tabs * - * @param {Window|Object} aSource + * @param {Window | object} aSource * Either a DOMWindow or an object with properties to resolve to the window * the tab was previously open in. - * @param {String} aSource.sourceWindowId + * @param {string} aSource.sourceWindowId A SessionStore window id used to look up the window where the tab group was closed * @param {number} aSource.sourceClosedId The closedId used to look up the closed window where the tab group was closed @@ -559,13 +559,13 @@ export var SessionStore = { * * @param {integer} aClosedId * The closedId of the tab - * @param {Window|Object} aSourceOptions + * @param {Window | object} aSourceOptions * Either a DOMWindow or an object with properties to resolve to the window * the tab was previously open in. * @param {boolean} [aSourceOptions.includePrivate = true] If no other means of resolving a source window is given, this flag is used to constrain a search across all open window's closed tabs. - * @param {String} aSourceOptions.sourceWindowId + * @param {string} aSourceOptions.sourceWindowId A SessionStore window id used to look up the window where the tab was closed * @param {number} aSourceOptions.sourceClosedId The closedId used to look up the closed window where the tab was closed @@ -603,7 +603,7 @@ export var SessionStore = { /** * Look up a window tracked by SessionStore by its id * - * @param {String} aSessionStoreId + * @param {string} aSessionStoreId */ getWindowById: function ss_getWindowById(aSessionStoreId) { return SessionStoreInternal.getWindowById(aSessionStoreId); @@ -910,7 +910,7 @@ export var SessionStore = { /** * Re-open a closed tab group * - * @param {Window|Object} source + * @param {Window | object} source * Either a DOMWindow or an object with properties to resolve to the window * the tab was previously open in. * @param {string} source.sourceWindowId @@ -997,7 +997,7 @@ export var SessionStore = { * Validates that a state object matches the schema * defined in browser/components/sessionstore/session.schema.json * - * @param {Object} [state] State object to validate. If not provided, + * @param {object} [state] State object to validate. If not provided, * will validate the current session state. * @returns {Promise} A promise which resolves to a validation result object */ @@ -1123,7 +1123,7 @@ var SessionStoreInternal = { _tabsRestoringCount: 0, /** - * @typedef {Object} CloseAction + * @typedef {object} CloseAction * @property {string} type * What the close action acted upon. One of either _LAST_ACTION_CLOSED_TAB or * _LAST_ACTION_CLOSED_WINDOW @@ -5745,7 +5745,7 @@ var SessionStoreInternal = { * * @param tabData * an array of data to be restored - * @param {String} windowId + * @param {string} windowId * The SessionStore id for the window these tabs should be associated with * @returns the updated tabData array */ @@ -8327,7 +8327,7 @@ var SessionStoreInternal = { }, /** - * @param {Window|Object} source + * @param {Window | object} source * @param {string} tabGroupId * @param {Window} [targetWindow] * @returns {MozTabbrowserTabGroup} @@ -8499,7 +8499,7 @@ var SessionStoreInternal = { * Validates that a state object matches the schema * defined in browser/components/sessionstore/session.schema.json * - * @param {Object} [state] State object to validate. If not provided, + * @param {object} [state] State object to validate. If not provided, * will validate the current session state. * @returns {Promise} A promise which resolves to a validation result object */ diff --git a/browser/components/storybook/.storybook/addon-fluent/withPseudoLocalization.mjs b/browser/components/storybook/.storybook/addon-fluent/withPseudoLocalization.mjs @@ -18,7 +18,7 @@ import { provideFluent } from "../fluent-utils.mjs"; * Storybook iframe. * * @param {Function} StoryFn - Provided by Storybook, used to render the story. - * @param {Object} context - Provided by Storybook, data about the story. + * @param {object} context - Provided by Storybook, data about the story. * @returns {Function} StoryFn with a modified "dir" attr set. */ export const withPseudoLocalization = (StoryFn, context) => { @@ -51,7 +51,7 @@ export const withPseudoLocalization = (StoryFn, context) => { * event to update the Fluent strings shown in the Fluent panel. * * @param {Function} StoryFn - Provided by Storybook, used to render the story. - * @param {Object} context - Provided by Storybook, data about the story. + * @param {object} context - Provided by Storybook, data about the story. * @returns {Function} StoryFn unmodified. */ export const withFluentStrings = (StoryFn, context) => { diff --git a/browser/components/storybook/.storybook/chrome-styles-loader.js b/browser/components/storybook/.storybook/chrome-styles-loader.js @@ -132,7 +132,7 @@ async function rewriteChromeUris(source) { * * @param {string} source - The source to rewrite. * @param {Map} sourceMap - Source map data, unused. - * @param {Object} meta - Metadata, unused. + * @param {object} meta - Metadata, unused. */ module.exports = async function chromeUriLoader(source) { // Get a callback to tell webpack when we're done. diff --git a/browser/components/storybook/.storybook/markdown-story-indexer.js b/browser/components/storybook/.storybook/markdown-story-indexer.js @@ -17,7 +17,7 @@ const fs = require("fs"); * More info on indexers can be found here: storybook.js.org/docs/api/main-config-indexers * * @param {string} fileName - Path to the file being processed. - * @param {Object} opts - Options to configure the indexer. + * @param {object} opts - Options to configure the indexer. * @returns Array of IndexInput objects. */ module.exports = async (fileName, opts) => { diff --git a/browser/components/storybook/.storybook/preview.mjs b/browser/components/storybook/.storybook/preview.mjs @@ -65,7 +65,7 @@ importReusableComponents(); * Storybook uses this internally to render stories. We call `story` in our * render function so that the story contents have the same shadow root as * `with-common-styles` and styles from `in-content/common` get applied. - * @property {Object} context + * @property {object} context * Another Storybook provided property containing additional data stories use * to render. If we don't make this a reactive property Lit seems to optimize * away any re-rendering of components inside `with-common-styles`. diff --git a/browser/components/tabbrowser/SmartTabGrouping.sys.mjs b/browser/components/tabbrowser/SmartTabGrouping.sys.mjs @@ -188,7 +188,7 @@ export function getBestAnchorClusterInfo(groupIndices, anchorItems) { /** * Check tab to see if it's a search page * - * @param {Object} tab + * @param {object} tab * @returns {boolean} Returns true if the tab is a web search from the Firefox search UI and the user is still on the original page. * Changes in search query after search is made is supported. * Returns false if user started from a hompepage of a site rather than the New Tab / browser UI @@ -256,7 +256,7 @@ export class SmartTabGroupingManager { * Generates suggested tabs for an existing or provisional group * * @param {object} group active group we are adding tabs to - * @param {array} tabs list of tabs from gbrowser, some of which may be grouped in other groups + * @param {Array} tabs list of tabs from gbrowser, some of which may be grouped in other groups * @returns a list of suggested new tabs. If no new tabs are suggested an empty list is returned. */ async smartTabGroupingForGroup(group, tabs) { @@ -331,10 +331,10 @@ export class SmartTabGroupingManager { /** * Get tabs that need to be included in suggestions * - * @param {array} allTabs all tabs that are part of the window - * @param {array} groupedIndices indices of tabs that are already part of the group - * @param {array} alreadyGroupedIndices indices of tabs that are part of other groups - * @returns {array} tabs indices to be considered for suggestions + * @param {Array} allTabs all tabs that are part of the window + * @param {Array} groupedIndices indices of tabs that are already part of the group + * @param {Array} alreadyGroupedIndices indices of tabs that are part of other groups + * @returns {Array} tabs indices to be considered for suggestions */ getTabsToSuggest(allTabs, groupedIndices, alreadyGroupedIndices) { // tabs to be excluded @@ -357,9 +357,9 @@ export class SmartTabGroupingManager { /** * 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 - * @param {array} alreadyGroupedIndices indices of tabs that are part of other groups + * @param {Array} allTabs all tabs that are part of the window + * @param {Array} groupedIndices indices of tabs that are already part of the group + * @param {Array} alreadyGroupedIndices indices of tabs that are part of other groups * @param {string} groupLabel name of group if present * @param {number} threshold for nearest neighbor similarity * @returns a list of suggested tabs that are similar to the groupedIndices tabs @@ -460,8 +460,8 @@ export class SmartTabGroupingManager { /** * Calculates the sigmoid value of the input * - * @param {Number} z - * @return {Number} + * @param {number} z + * @return {number} */ sigmoid(z) { return 1 / (1 + Math.exp(-z)); @@ -470,10 +470,10 @@ export class SmartTabGroupingManager { /** * Calculates the probability using the linear combination of the parameters * - * @param {Number} groupSimilarity how similar a candidate tab is to the group name - * @param {Number} titleSimilarity how similar a candidate tab is to the anchors - * @param {Object} params the logistic regression weights assigned to each parameter - * @return {Number} + * @param {number} groupSimilarity how similar a candidate tab is to the group name + * @param {number} titleSimilarity how similar a candidate tab is to the anchors + * @param {object} params the logistic regression weights assigned to each parameter + * @return {number} */ calculateProbability(groupSimilarity, titleSimilarity, params) { return this.sigmoid( @@ -510,9 +510,9 @@ export class SmartTabGroupingManager { /** * Generates similar tabs to a grouped list of tabs using a logistic regression "model" * - * @param {array} allTabs all tabs that are part of the window - * @param {array} groupedIndices indices of tabs that are already part of the group - * @param {array} alreadyGroupedIndices indices of tabs that are part of other groups + * @param {Array} allTabs all tabs that are part of the window + * @param {Array} groupedIndices indices of tabs that are already part of the group + * @param {Array} alreadyGroupedIndices indices of tabs that are part of other groups * @param {string} groupLabel name of group if present */ async findSimilarTabsLogisticRegression({ @@ -655,7 +655,7 @@ export class SmartTabGroupingManager { /** * Prepares data to be used by the ml models * - * @param {Object[]} tabList list of tabs in the current window + * @param {object[]} tabList list of tabs in the current window * @param {boolean} useDescription whether we should combined the title and description * @return {Promise<*[Object]>} * @private @@ -938,7 +938,7 @@ export class SmartTabGroupingManager { /** * Generates clusters for a given list of tabs using precomputed embeddings or newly generated ones. * - * @param {Object[]} tabList - List of tab objects to be clustered. + * @param {object[]} tabList - List of tab objects to be clustered. * @param {number[][]} [precomputedEmbeddings] - Precomputed embeddings for tab titles and descriptions. * @param {number} numClusters - Number of clusters to form. * @param {Function} randFunc - Random function used for clustering initialization. @@ -1474,7 +1474,7 @@ export class SmartTabGroupingResult { * Converts a cluster representation to a flat list of tabs, with clusterID key in each * tab representing the id of the cluster it was part of. * - * @returns {[Object]} + * @returns {[object]} */ _flatMapItemsInClusters() { return this.clusterRepresentations.reduce((result, clusterRep) => { diff --git a/browser/components/tabbrowser/content/browser-ctrlTab.js b/browser/components/tabbrowser/content/browser-ctrlTab.js @@ -21,7 +21,7 @@ var tabPreviews = { * image URL will fail to load and this method will return null after 1s. * Callers should handle this case by doing nothing or using a fallback image. * - * @param {String} uri The page URL. + * @param {string} uri The page URL. * @returns {Promise<Image|null>} */ loadImage: async function tabPreviews_loadImage(uri) { @@ -97,7 +97,7 @@ var tabPreviews = { * it in aTab.__thumbnail, and possibly store it in thumbnail storage. * * @param {MozTabbrowserTab} aTab The tab to capture a preview for. - * @param {Boolean} aShouldCache Cache/store the captured thumbnail? + * @param {boolean} aShouldCache Cache/store the captured thumbnail? * @returns {Promise<HTMLCanvasElement|null>} Resolves to... * @resolves {HTMLCanvasElement} A snapshot of the tab's content. If the * snapshot is safe for storage and aShouldCache is true, the snapshot is diff --git a/browser/components/tabbrowser/test/browser/smarttabgrouping/browser_tab_grouping.js b/browser/components/tabbrowser/test/browser/smarttabgrouping/browser_tab_grouping.js @@ -109,12 +109,12 @@ add_task(async function testClustering() { /** * Run tests for finding similar items for a single item or cluster of items with label anchorLabel * - * @param {Number[][]} embeddings Embeddings for each item - * @param {String} anchorLabel String representing the ID of the anchor cluster - * @param {Object[]} labels Dict representing each document (unused ) - * @param {String[]} labelClusterList List of items, with id of cluster for each (unused in) - * @param {String} testName Name of the test dataset - * @returns {Object[]} + * @param {number[][]} embeddings Embeddings for each item + * @param {string} anchorLabel String representing the ID of the anchor cluster + * @param {object[]} labels Dict representing each document (unused ) + * @param {string[]} labelClusterList List of items, with id of cluster for each (unused in) + * @param {string} testName Name of the test dataset + * @returns {object[]} */ async function anchorTestsForCluster( embeddings, diff --git a/browser/components/tabbrowser/test/browser/tabMediaIndicator/head.js b/browser/components/tabbrowser/test/browser/tabMediaIndicator/head.js @@ -6,9 +6,9 @@ const gEMPTY_PAGE_URL = GetTestWebBasedURL("file_empty.html"); /** * Return a web-based URL for a given file based on the testing directory. * - * @param {String} fileName + * @param {string} fileName * file that caller wants its web-based url - * @param {Boolean} cors [optional] + * @param {boolean} cors [optional] * if set, then return a url with different origin */ function GetTestWebBasedURL(fileName, cors = false) { diff --git a/browser/components/tabbrowser/test/browser/tabs/browser_bug_1387976_restore_lazy_tab_browser_muted_state.js b/browser/components/tabbrowser/test/browser/tabs/browser_bug_1387976_restore_lazy_tab_browser_muted_state.js @@ -13,7 +13,7 @@ const { TabState } = ChromeUtils.importESModule( * * @param tab * The tab to restart. - * @return {Object} the restored lazy tab + * @return {object} the restored lazy tab */ const restartTab = async function (tab) { let tabData = TabState.clone(tab); diff --git a/browser/components/tabbrowser/test/browser/tabs/browser_tabSpinnerProbe.js b/browser/components/tabbrowser/test/browser/tabs/browser_tabSpinnerProbe.js @@ -10,7 +10,7 @@ const MAX_HANG_TIME = 5 * 1000; // ms * Returns the sum of all values in an array. * * @param {Array} aArray An array of integers - * @return {Number} The sum of the integers in the array + * @return {number} The sum of the integers in the array */ function sum(aArray) { return aArray.reduce(function (previousValue, currentValue) { @@ -44,7 +44,7 @@ function hangContentProcess(browser, aMs) { * A generator intended to be run as a Task. It tests one of the tab spinner * telemetry probes. * - * @param {String} aProbe The probe to test. Should be: + * @param {string} aProbe The probe to test. Should be: * - FX_TAB_SWITCH_SPINNER_VISIBLE_MS */ async function testProbe(aProbe) { diff --git a/browser/components/tabbrowser/test/browser/tabs/browser_tab_manager_groups.js b/browser/components/tabbrowser/test/browser/tabs/browser_tab_manager_groups.js @@ -21,7 +21,7 @@ add_setup(async function () { /** * One-liner to create a basic tab group * - * @param {Object} [options] options for addTabGroup + * @param {object} [options] options for addTabGroup * @param {Window} [options.targetWin] window to create the group in * @returns {MozTabbrowserTabGroup} */ diff --git a/browser/extensions/newtab/bin/render-activity-stream-html.js b/browser/extensions/newtab/bin/render-activity-stream-html.js @@ -158,7 +158,7 @@ function templateHTML(options) { * * @param {string} destPath Path to write the files to * @param {Map} filesMap Mapping of a string file name to templater - * @param {Object} options Various options for the templater + * @param {object} options Various options for the templater */ function writeFiles(destPath, filesMap, options) { for (const [file, templater] of filesMap) { diff --git a/browser/extensions/newtab/content-src/lib/perf-service.mjs b/browser/extensions/newtab/content-src/lib/perf-service.mjs @@ -20,7 +20,7 @@ _PerfService.prototype = { * object to add a mark with the given name to the appropriate performance * timeline. * - * @param {String} name the name to give the current mark + * @param {string} name the name to give the current mark * @return {void} */ mark: function mark(str) { @@ -31,8 +31,8 @@ _PerfService.prototype = { * Calls the underlying getEntriesByName on the appropriate Window.performance * object. * - * @param {String} name - * @param {String} type eg "mark" + * @param {string} name + * @param {string} type eg "mark" * @return {Array} Performance* objects */ getEntriesByName: function getEntriesByName(entryName, type) { @@ -52,7 +52,7 @@ _PerfService.prototype = { * created dynamically later. Exactly how/when that shows up needs to be * investigated. * - * @return {Number} A double of milliseconds with a precision of 0.5us. + * @return {number} A double of milliseconds with a precision of 0.5us. */ get timeOrigin() { return this._perf.timeOrigin; @@ -63,7 +63,7 @@ _PerfService.prototype = { * should ([bug 1401406](https://bugzilla.mozilla.org/show_bug.cgi?id=1401406) * be comparable across both chrome and content. * - * @return {Number} + * @return {number} */ absNow: function absNow() { return this.timeOrigin + this._perf.now(); @@ -73,9 +73,9 @@ _PerfService.prototype = { * This returns the absolute startTime from the most recent performance.mark() * with the given name. * - * @param {String} name the name to lookup the start time for + * @param {string} name the name to lookup the start time for * - * @return {Number} the returned start time, as a DOMHighResTimeStamp + * @return {number} the returned start time, as a DOMHighResTimeStamp * * @throws {Error} "No Marks with the name ..." if none are available * diff --git a/browser/extensions/newtab/content-src/lib/utils.jsx b/browser/extensions/newtab/content-src/lib/utils.jsx @@ -16,9 +16,9 @@ const PREF_SYSTEM_STORIES_ENABLED = "feeds.system.topstories"; * * @function useIntersectionObserver * @param {function} callback - The function to call when an element comes into the viewport - * @param {Object} options - Options object passed to Intersection Observer: + * @param {object} options - Options object passed to Intersection Observer: * https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/IntersectionObserver#options - * @param {Boolean} [isSingle = false] Boolean if the elements are an array or single element + * @param {boolean} [isSingle = false] Boolean if the elements are an array or single element * * @returns {React.MutableRefObject} a ref containing an array of elements or single element */ diff --git a/browser/extensions/newtab/data/content/activity-stream.bundle.js b/browser/extensions/newtab/data/content/activity-stream.bundle.js @@ -2574,9 +2574,9 @@ const PREF_SYSTEM_STORIES_ENABLED = "feeds.system.topstories"; * * @function useIntersectionObserver * @param {function} callback - The function to call when an element comes into the viewport - * @param {Object} options - Options object passed to Intersection Observer: + * @param {object} options - Options object passed to Intersection Observer: * https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/IntersectionObserver#options - * @param {Boolean} [isSingle = false] Boolean if the elements are an array or single element + * @param {boolean} [isSingle = false] Boolean if the elements are an array or single element * * @returns {React.MutableRefObject} a ref containing an array of elements or single element */ @@ -6292,7 +6292,7 @@ _PerfService.prototype = { * object to add a mark with the given name to the appropriate performance * timeline. * - * @param {String} name the name to give the current mark + * @param {string} name the name to give the current mark * @return {void} */ mark: function mark(str) { @@ -6303,8 +6303,8 @@ _PerfService.prototype = { * Calls the underlying getEntriesByName on the appropriate Window.performance * object. * - * @param {String} name - * @param {String} type eg "mark" + * @param {string} name + * @param {string} type eg "mark" * @return {Array} Performance* objects */ getEntriesByName: function getEntriesByName(entryName, type) { @@ -6324,7 +6324,7 @@ _PerfService.prototype = { * created dynamically later. Exactly how/when that shows up needs to be * investigated. * - * @return {Number} A double of milliseconds with a precision of 0.5us. + * @return {number} A double of milliseconds with a precision of 0.5us. */ get timeOrigin() { return this._perf.timeOrigin; @@ -6335,7 +6335,7 @@ _PerfService.prototype = { * should ([bug 1401406](https://bugzilla.mozilla.org/show_bug.cgi?id=1401406) * be comparable across both chrome and content. * - * @return {Number} + * @return {number} */ absNow: function absNow() { return this.timeOrigin + this._perf.now(); @@ -6345,9 +6345,9 @@ _PerfService.prototype = { * This returns the absolute startTime from the most recent performance.mark() * with the given name. * - * @param {String} name the name to lookup the start time for + * @param {string} name the name to lookup the start time for * - * @return {Number} the returned start time, as a DOMHighResTimeStamp + * @return {number} the returned start time, as a DOMHighResTimeStamp * * @throws {Error} "No Marks with the name ..." if none are available * diff --git a/browser/extensions/newtab/lib/AdsFeed.sys.mjs b/browser/extensions/newtab/lib/AdsFeed.sys.mjs @@ -169,7 +169,7 @@ export class AdsFeed { * Normalize new Unified Ads API response into * previous Contile ads response * - * @param {array} - Array of UAPI placement objects ("newtab_tile_1", etc.) + * @param {Array} - Array of UAPI placement objects ("newtab_tile_1", etc.) * @returns {object} - Object containing array of formatted UAPI objects to match legacy Contile system */ _normalizeTileData(data) { @@ -270,7 +270,7 @@ export class AdsFeed { * Fetch data from the Mozilla Ad Routing Service (MARS) unified ads API * This function is designed to get whichever ads types are needed (tiles, spocs) * - * @param {array} supportedAdTypes + * @param {Array} supportedAdTypes * @returns {object} Response object containing ad information from MARS */ async fetchData(supportedAdTypes) { diff --git a/browser/extensions/newtab/lib/DiscoveryStreamFeed.sys.mjs b/browser/extensions/newtab/lib/DiscoveryStreamFeed.sys.mjs @@ -803,8 +803,8 @@ export class DiscoveryStreamFeed { /** * Adds the promise result to newFeeds and pushes a promise to newsFeedsPromises. * - * @param {Object} Has both newFeedsPromises (Array) and newFeeds (Object) - * @param {Boolean} isStartup We have different cache handling for startup. + * @param {object} Has both newFeedsPromises (Array) and newFeeds (Object) + * @param {boolean} isStartup We have different cache handling for startup. * @returns {Function} We return a function so we can contain * the scope for isStartup and the promises object. * Combines feed results and promises for each component with a feed. @@ -880,7 +880,7 @@ export class DiscoveryStreamFeed { * Filters out components with no feeds, and combines all feeds on this component * with the feeds from other components. * - * @param {Boolean} isStartup We have different cache handling for startup. + * @param {boolean} isStartup We have different cache handling for startup. * @returns {Function} We return a function so we can contain the scope for isStartup. * Reduces feeds into promises and feed data. */ @@ -896,9 +896,9 @@ export class DiscoveryStreamFeed { /** * Filters out rows with no components, and gets us a promise for each unique feed. * - * @param {Object} layout This is the Discovery Stream layout object. - * @param {Boolean} isStartup We have different cache handling for startup. - * @returns {Object} An object with newFeedsPromises (Array) and newFeeds (Object), + * @param {object} layout This is the Discovery Stream layout object. + * @param {boolean} isStartup We have different cache handling for startup. + * @returns {object} An object with newFeedsPromises (Array) and newFeeds (Object), * we can Promise.all newFeedsPromises to get completed data in newFeeds. */ buildFeedPromises(layout, isStartup, sendUpdate) { @@ -2086,7 +2086,7 @@ export class DiscoveryStreamFeed { } /** - * @typedef {Object} RefreshAll + * @typedef {object} RefreshAll * @property {boolean} updateOpenTabs - Sends updates to open tabs immediately if true, * updates in background if false * @property {boolean} isStartup - When the function is called at browser startup diff --git a/browser/extensions/newtab/lib/InferredModel/FeatureModel.sys.mjs b/browser/extensions/newtab/lib/InferredModel/FeatureModel.sys.mjs @@ -66,7 +66,7 @@ export function unaryEncodeDiffPrivacy(x, N, p, q) { /** * Adds value to all a particular key in a dictionary. If the key is missing it sets the value. * - * @param {Object} dict - The dictionary to modify. + * @param {object} dict - The dictionary to modify. * @param {string} key - The key whose value should be added or set. * @param {number} value - The value to add to the key. */ @@ -81,9 +81,9 @@ export function dictAdd(dict, key, value) { /** * Apply function to all keys in dictionary, returning new dictionary. * - * @param {Object} obj - The object whose values should be transformed. + * @param {object} obj - The object whose values should be transformed. * @param {Function} fn - The function to apply to each value. - * @returns {Object} A new object with the transformed values. + * @returns {object} A new object with the transformed values. */ export function dictApply(obj, fn) { return Object.fromEntries( @@ -242,9 +242,9 @@ export class FeatureModel { /** * * @param {string} modelId - * @param {Object} dayTimeWeighting Data for day time weighting class - * @param {Object} interestVectorModel Data for interest model - * @param {Object} tileImportance Data for tile importance + * @param {object} dayTimeWeighting Data for day time weighting class + * @param {object} interestVectorModel Data for interest model + * @param {object} tileImportance Data for tile importance * @param {boolean} rescale Whether to rescale to max value * @param {boolean} logScale Whether to apply natural log (ln(x+ 1)) before rescaling */ @@ -321,7 +321,7 @@ export class FeatureModel { /** * Computes an interest vector or aggregate based on the model and raw sql inout. * - * @param {Object} config + * @param {object} config * @param {Array.<Array.<string|number>>} config.dataForIntervals Raw aggregate output from SQL query. Could be clicks or impressions * @param {Object.<string, number>} config.indexSchema Map of keys to indices in each sub-array in dataForIntervals * @param {boolean} [config.applyThresholding=false] Whether to apply thresholds @@ -411,8 +411,8 @@ export class FeatureModel { * Convert float to discrete values, based on threshold parmaters for each feature in the model. * Values are modifified in place on provided dictionary. * - * @param {Object} valueDict of all values in model - * @param {Boolean} applyDifferentialPrivacy whether to apply differential privacy as well as thresholding. + * @param {object} valueDict of all values in model + * @param {boolean} applyDifferentialPrivacy whether to apply differential privacy as well as thresholding. */ applyThresholding(valueDict, applyDifferentialPrivacy = false) { for (const key of Object.keys(valueDict)) { @@ -471,16 +471,16 @@ export class FeatureModel { * * In all cases model_id is returned. * - * @param {Object} params - Function parameters. + * @param {object} params - Function parameters. * @param {Object<string, number>} params.clickDict - A dictionary of interest keys to click counts. * @param {Object<string, number>} params.impressionDict - A dictionary of interest keys to impression counts. * @param {string} [params.model_id="unknown"] - Identifier for the model used in generating the vectors. * @param {boolean} [params.condensePrivateValues=true] - If true, condenses coarse private interest values into an array format. * - * @returns {Object} result - An object containing one or more of the following: - * @returns {Object} result.inferredInterest - A dictionary of private inferred interest scores - * @returns {Object} [result.coarseInferredInterests] - A dictionary of thresholded interest scores (non-private), if supported. - * @returns {Object} [result.coarsePrivateInferredInterests] - A dictionary of thresholded interest scores with differential privacy, if supported. + * @returns {object} result - An object containing one or more of the following: + * @returns {object} result.inferredInterest - A dictionary of private inferred interest scores + * @returns {object} [result.coarseInferredInterests] - A dictionary of thresholded interest scores (non-private), if supported. + * @returns {object} [result.coarsePrivateInferredInterests] - A dictionary of thresholded interest scores with differential privacy, if supported. */ computeCTRInterestVectors({ clicks, @@ -539,16 +539,16 @@ export class FeatureModel { * Returns standard inferred interests (with Laplace noise), and optionally returns * coarse-grained and private-coarse versions depending on model support. * - * @param {Object} params - The function parameters. - * @param {Array<Object>} params.dataForIntervals - An array of data points grouped by time intervals (e.g., clicks, impressions). - * @param {Object} params.indexSchema - Schema that defines how interest indices should be computed. + * @param {object} params - The function parameters. + * @param {Array<object>} params.dataForIntervals - An array of data points grouped by time intervals (e.g., clicks, impressions). + * @param {object} params.indexSchema - Schema that defines how interest indices should be computed. * @param {string} [params.model_id="unknown"] - Identifier for the model used to produce these vectors. * @param {boolean} [params.condensePrivateValues=true] - If true, condenses coarse private interest values into an array format. * - * @returns {Object} result - An object containing the computed interest vectors. - * @returns {Object} result.inferredInterests - A dictionary of private inferred interest values, with `model_id`. - * @returns {Object} [result.coarseInferredInterests] - Coarse thresholded (non-private) interest vector, if supported. - * @returns {Object|{values: Array<number>, model_id: string}} [result.coarsePrivateInferredInterests] - Coarse and differentially private interests. + * @returns {object} result - An object containing the computed interest vectors. + * @returns {object} result.inferredInterests - A dictionary of private inferred interest values, with `model_id`. + * @returns {object} [result.coarseInferredInterests] - Coarse thresholded (non-private) interest vector, if supported. + * @returns {object | {values: Array<number>, model_id: string}} [result.coarsePrivateInferredInterests] - Coarse and differentially private interests. * If `condensePrivateValues` is true, returned as an object with a `values` array; otherwise, as a dictionary. */ computeInterestVectors({ diff --git a/browser/extensions/newtab/lib/NewTabContentPing.sys.mjs b/browser/extensions/newtab/lib/NewTabContentPing.sys.mjs @@ -256,7 +256,7 @@ export class NewTabContentPing { /** * Returns true or false with a certain proability specified * - * @param {Number} prob Probability + * @param {number} prob Probability * @returns {boolean} Random boolean result of probability prob */ static decideWithProbability(prob) { diff --git a/browser/extensions/newtab/lib/NewTabGleanUtils.sys.mjs b/browser/extensions/newtab/lib/NewTabGleanUtils.sys.mjs @@ -53,7 +53,7 @@ export const NewTabGleanUtils = { * Fetches and parses a JSON file from a given resource URI. * * @param {string} resourceURI - The URI of the JSON file to fetch and parse - * @returns {Promise<Object>} A promise that resolves to the parsed JSON object + * @returns {Promise<object>} A promise that resolves to the parsed JSON object */ async readJSON(resourceURI) { let result = await fetch(resourceURI); @@ -121,14 +121,14 @@ export const NewTabGleanUtils = { /** * Registers a metric in Glean if it doesn't already exist. * - * @param {Object} options - The metric configuration options + * @param {object} options - The metric configuration options * @param {string} options.type - The type of metric (e.g., "text", "counter") * @param {string} options.category - The category the metric belongs to * @param {string} options.name - The name of the metric * @param {string[]} options.pings - Array of ping names this metric belongs to * @param {string} options.lifetime - The lifetime of the metric * @param {boolean} [options.disabled] - Whether the metric is disabled - * @param {Object} [options.extraArgs] - Additional arguments for the metric + * @param {object} [options.extraArgs] - Additional arguments for the metric * @throws {Error} If a new metrics registration fails and error will be logged in console */ registerMetricIfNeeded(options) { @@ -183,7 +183,7 @@ export const NewTabGleanUtils = { /** * Registers a ping in Glean if it doesn't already exist. * - * @param {Object} options - The ping configuration options + * @param {object} options - The ping configuration options * @param {string} options.name - The name of the ping * @param {boolean} [options.includeClientId] - Whether to include client ID * @param {boolean} [options.sendIfEmpty] - Whether to send ping if empty diff --git a/browser/extensions/newtab/lib/NewTabMessaging.sys.mjs b/browser/extensions/newtab/lib/NewTabMessaging.sys.mjs @@ -104,7 +104,7 @@ export class NewTabMessaging { /** * Send impression to ASRouter * - * @param {Object} message + * @param {object} message */ handleImpression(message) { this.sendTelemetry("IMPRESSION", message); diff --git a/browser/extensions/newtab/lib/PlacesFeed.sys.mjs b/browser/extensions/newtab/lib/PlacesFeed.sys.mjs @@ -394,7 +394,7 @@ export class PlacesFeed { /** * Add the hostnames of the given urls to the Top Sites sponsor blocklist. * - * @param {array} urls + * @param {Array} urls * An array of the objects structured as `{ url }` */ addToBlockedTopSitesSponsors(urls) { @@ -417,7 +417,7 @@ export class PlacesFeed { * to send back to the ads service when requesting new topsite ads * from the unified ads service * - * @param {array} block_key + * @param {Array} block_key * An array of the (string) keys */ addToUnifiedAdsBlockedAdsList(keysArray) { diff --git a/browser/extensions/newtab/lib/TelemetryFeed.sys.mjs b/browser/extensions/newtab/lib/TelemetryFeed.sys.mjs @@ -299,7 +299,7 @@ export class TelemetryFeed { /** * Retrieves most recently followed sections (maximum 2 sections) * - * @returns {String[]} comma separated string of section UUID's + * @returns {string[]} comma separated string of section UUID's */ getFollowedSections() { const sections = @@ -1966,8 +1966,8 @@ export class TelemetryFeed { /** * Handle impression stats actions from Discovery Stream. * - * @param {String} port The session port with which this is associated - * @param {Object} data The impression data structured as {source: "SOURCE", tiles: [{id: 123}]} + * @param {string} port The session port with which this is associated + * @param {object} data The impression data structured as {source: "SOURCE", tiles: [{id: 123}]} */ handleDiscoveryStreamImpressionStats(port, data) { let session = this.sessions.get(port); @@ -2055,8 +2055,8 @@ export class TelemetryFeed { * @note Any existing keys with the same names already in the * session perf object will be overwritten by values passed in here. * - * @param {String} port The session with which this is associated - * @param {Object} data The perf data to be + * @param {string} port The session with which this is associated + * @param {object} data The perf data to be */ saveSessionPerfData(port, data) { // XXX should use try/catch and send a bad state indicator if this diff --git a/browser/extensions/newtab/lib/TopSitesFeed.sys.mjs b/browser/extensions/newtab/lib/TopSitesFeed.sys.mjs @@ -401,7 +401,7 @@ export class ContileIntegration { /** * Filter the tiles whose sponsor is on the Top Sites sponsor blocklist. * - * @param {array} tiles + * @param {Array} tiles * An array of the tile objects */ _filterBlockedSponsors(tiles) { @@ -1156,7 +1156,7 @@ export class TopSitesFeed { * needed. * * @param {Array} plainPinnedSites (from the pinnedSitesCache) - * @returns {Boolean} Did we insert any search shortcuts? + * @returns {boolean} Did we insert any search shortcuts? */ async _maybeInsertSearchShortcuts(plainPinnedSites) { // Only insert shortcuts if the experiment is running @@ -1586,7 +1586,7 @@ export class TopSitesFeed { * If the chosen partner doesn't have a tile to serve, another tile from a different * partner is used as the replacement. * - * @param {Object} sponsoredLinks An object with sponsored links from all the partners. + * @param {object} sponsoredLinks An object with sponsored links from all the partners. * @returns {Array} An array of merged sponsored links. */ _mergeSponsoredLinks(sponsoredLinks) { diff --git a/browser/extensions/newtab/lib/TopStoriesFeed.sys.mjs b/browser/extensions/newtab/lib/TopStoriesFeed.sys.mjs @@ -141,8 +141,8 @@ export class TopStoriesFeed { * but clear stories if none are available. Because of this, if no * stories are passed, we instead use the existing stories in state. * - * @param {Object} This is an object with potential new stories or topics. - * @param {Boolean} shouldBroadcast If we should update existing tabs or not. For first page + * @param {object} This is an object with potential new stories or topics. + * @param {boolean} shouldBroadcast If we should update existing tabs or not. For first page * loads or pref changes, we want to update existing tabs, * for system tick or other updates we do not. */ diff --git a/browser/extensions/newtab/test/unit/utils.js b/browser/extensions/newtab/test/unit/utils.js @@ -75,7 +75,7 @@ export const FAKE_GLOBAL_PREFS = new Map(); * Very simple fake for the most basic semantics of nsIPrefBranch. Lots of * things aren't yet supported. Feel free to add them in. * - * @param {Object} args - optional arguments + * @param {object} args - optional arguments * @param {Function} args.initHook - if present, will be called back * inside the constructor. Typically used from tests * to save off a pointer to the created instance so that diff --git a/browser/extensions/newtab/test/xpcshell/test_InferredFeatureModel.js b/browser/extensions/newtab/test/xpcshell/test_InferredFeatureModel.js @@ -14,8 +14,8 @@ ChromeUtils.defineESModuleGetters(this, { /** * Compares two dictionaries up to decimalPoints decimal points * - * @param {Object} a - * @param {Object} b + * @param {object} a + * @param {object} b * @param {number} decimalPoints * @returns {boolean} True if vectors are similar */ diff --git a/browser/modules/AboutNewTab.sys.mjs b/browser/modules/AboutNewTab.sys.mjs @@ -94,10 +94,10 @@ export const AboutNewTab = { * * This will only act if there is a change of state and if not overridden. * - * @returns {Boolean} Returns if there has been a state change + * @returns {boolean} Returns if there has been a state change * - * @param {Boolean} stateEnabled activity stream enabled state to set to - * @param {Boolean} forceState force state change + * @param {boolean} stateEnabled activity stream enabled state to set to + * @param {boolean} forceState force state change */ toggleActivityStream(stateEnabled, forceState = false) { if ( diff --git a/browser/modules/BrowserUIUtils.sys.mjs b/browser/modules/BrowserUIUtils.sys.mjs @@ -71,11 +71,11 @@ export var BrowserUIUtils = { * it is in use everywhere. * * @param {Document} doc - * @param {String} msg + * @param {string} msg * The string to put replacements in. Fetch from * a stringbundle using getString or GetStringFromName, * or even an inserted dtd string. - * @param {Node|String} nodesOrStrings + * @param {Node | string} nodesOrStrings * The replacement items. Can be a mix of Nodes * and Strings. However, for correct behaviour, the * number of items provided needs to exactly match diff --git a/browser/modules/BrowserUsageTelemetry.sys.mjs b/browser/modules/BrowserUsageTelemetry.sys.mjs @@ -1899,7 +1899,7 @@ export let BrowserUsageTelemetry = { * @param {Array<string>} [msixPackagePrefixes] Optional, list of prefixes to consider "existing" installs when looking at installed MSIX packages. Defaults to prefixes for builds produced in Firefox automation. - * @return {Promise<Object>} A JSON object containing install telemetry. + * @return {Promise<object>} A JSON object containing install telemetry. * @resolves When the event has been recorded, or if the data file was not found. * @rejects JavaScript exception on any failure. */ diff --git a/browser/modules/BrowserWindowTracker.sys.mjs b/browser/modules/BrowserWindowTracker.sys.mjs @@ -184,7 +184,7 @@ export const BrowserWindowTracker = { * there are no open windows in the current virtual desktop. To prevent this, * set `options.allowFromInactiveWorkspace` to true. * - * @param {Object} options - An object accepting the arguments for the search. + * @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. @@ -236,7 +236,7 @@ export const BrowserWindowTracker = { * opened via the `openWindow` function in this module or that have been * registered with the `registerOpeningWindow` function. * - * @param {Object} options + * @param {object} options * Options for the search. * @param {boolean} [options.private] * true to restrict the search to private windows only, false to restrict @@ -295,13 +295,13 @@ export const BrowserWindowTracker = { /** * A standard function for opening a new browser window. * - * @param {Object} [options] + * @param {object} [options] * Options for the new window. * @param {Window} [options.openerWindow] * An existing browser window to open the new one from. * @param {boolean} [options.private] * True to make the window a private browsing window. - * @param {String} [options.features] + * @param {string} [options.features] * Additional window features to give the new window. * @param {boolean} [options.all] * True if "all" should be included as a window feature. If omitted, defaults @@ -403,7 +403,7 @@ export const BrowserWindowTracker = { * Async version of `openWindow` waiting for delayed startup of the new * window before returning. * - * @param {Object} [options] + * @param {object} [options] * Options for the new window. See `openWindow` for details. * * @returns {Window} diff --git a/browser/modules/FaviconLoader.sys.mjs b/browser/modules/FaviconLoader.sys.mjs @@ -387,7 +387,7 @@ class FaviconLoad { * about the size type and size dimension info. * * @param {Array} aSizes An array of strings about size. - * @return {Number} A width of the icon in pixel. + * @return {number} A width of the icon in pixel. */ function extractIconSize(aSizes) { let width = -1; diff --git a/browser/modules/HomePage.sys.mjs b/browser/modules/HomePage.sys.mjs @@ -255,7 +255,7 @@ export let HomePage = { * Handles updates of the ignore list, checking the existing preference and * correcting it as necessary. * - * @param {Object} eventData + * @param {object} eventData * The event data as received from RemoteSettings. */ async _handleIgnoreListUpdated({ data: { current } }) { diff --git a/browser/modules/LinksCache.sys.mjs b/browser/modules/LinksCache.sys.mjs @@ -21,7 +21,7 @@ export class LinksCache { * * @param {object} linkObject Object containing the link property * @param {string} linkProperty Name of property on object to access - * @param {array} properties Optional properties list to migrate to new links. + * @param {Array} properties Optional properties list to migrate to new links. * @param {function} shouldRefresh Optional callback receiving the old and new * options to refresh even when not expired. */ diff --git a/browser/modules/PermissionUI.sys.mjs b/browser/modules/PermissionUI.sys.mjs @@ -736,7 +736,7 @@ class SitePermsAddonInstallRequest extends PermissionPromptForRequest { * This should be overriden by children classes. * * @param {Components.Exception} err - * @returns {String} The error message + * @returns {string} The error message */ getInstallErrorMessage() { return null; @@ -1508,7 +1508,7 @@ class MIDIPermissionPrompt extends SitePermsAddonInstallRequest { /** * @override * @param {Components.Exception} err - * @returns {String} + * @returns {string} */ getInstallErrorMessage(err) { return `WebMIDI access request was denied: ❝${err.message}❞. See https://developer.mozilla.org/docs/Web/API/Navigator/requestMIDIAccess for more information`; diff --git a/browser/modules/Sanitizer.sys.mjs b/browser/modules/Sanitizer.sys.mjs @@ -1180,7 +1180,7 @@ function extractMatchingPrincipals(principals, matchHost) { * This method receives a list of principals and it checks if some of them or * some of their sub-domain need to be sanitize. * - * @param {Object} progress - Object to keep track of the sanitization progress, prefs and mode + * @param {object} progress - Object to keep track of the sanitization progress, prefs and mode * @param {nsIPrincipal[]} principals - The principals generated by the PrincipalsCollector * @param {int} flags - The cleaning categories that need to be cleaned for the principals. * @returns {Promise} - Resolves once the clearing of the principals to be cleared is done diff --git a/browser/modules/SiteDataManager.sys.mjs b/browser/modules/SiteDataManager.sys.mjs @@ -116,9 +116,9 @@ export var SiteDataManager = { * Insert site with specific params into the SiteDataManager * Currently used for testing purposes * - * @param {String} baseDomainOrHost - * @param {Object} Site info params - * @returns {Object} site object + * @param {string} baseDomainOrHost + * @param {object} Site info params + * @returns {object} site object */ _testInsertSite( baseDomainOrHost, @@ -324,8 +324,8 @@ export var SiteDataManager = { * in that order. This function is meant to be fast, and thus will * end searching and return true once the first trace of site data is found. * - * @param {String} the ASCII host to check - * @returns {Boolean} whether the site has any data associated with it + * @param {string} the ASCII host to check + * @returns {boolean} whether the site has any data associated with it */ async hasSiteData(asciiHost) { if (Services.cookies.countCookiesFromHost(asciiHost)) { @@ -388,7 +388,7 @@ export var SiteDataManager = { * * @param {string[]} timeSpanArr - Array of timespan options to get quota usage * from Sanitizer, e.g. ["TIMESPAN_HOUR", "TIMESPAN_2HOURS"] - * @returns {Object} bytes used for each timespan + * @returns {object} bytes used for each timespan */ async getQuotaUsageForTimeRanges(timeSpanArr) { let usage = {}; @@ -455,9 +455,9 @@ export var SiteDataManager = { * {@link updateSites} before you can use this method for the first time (and * whenever you want to get an updated set of list.) * - * @param {String} baseDomainOrHost - Base domain or host of the site to get. + * @param {string} baseDomainOrHost - Base domain or host of the site to get. * - * @returns {Promise<Object|null>} Promise that resolves with the site object + * @returns {Promise<object | null>} Promise that resolves with the site object * or null if no site with given base domain or host stores data. */ async getSite(baseDomainOrHost) { diff --git a/browser/modules/SitePermissions.sys.mjs b/browser/modules/SitePermissions.sys.mjs @@ -63,7 +63,7 @@ const TemporaryPermissions = { * origin, non-strict is baseDomain. * * @param {nsIPrincipal} principal - principal to derive keys from. - * @returns {Object} keys - Object containing the generated permission keys. + * @returns {object} keys - Object containing the generated permission keys. * @returns {string} keys.strict - Key to be used for strict matching. * @returns {string} keys.nonStrict - Key to be used for non-strict matching. * @throws {Error} - Throws if principal is undefined or no valid permission key can @@ -269,7 +269,7 @@ const TemporaryPermissions = { * state. * * @param {Browser} browser - Browser to clear permissions for. - * @param {Number} [filterState] - Only clear permissions with the given state + * @param {number} [filterState] - Only clear permissions with the given state * value. Defaults to all permissions. */ clear(browser, filterState = null) { @@ -556,7 +556,7 @@ export var SitePermissions = { * @param {Browser} browser * The browser to fetch permission for. * - * @return {Array<Object>} a list of objects with the keys: + * @return {Array<object>} a list of objects with the keys: * - id: the permissionID of the permission * - state: a constant representing the current permission state * (e.g. SitePermissions.ALLOW) @@ -607,7 +607,7 @@ export var SitePermissions = { /** * Gets an array of all permission IDs. * - * @return {Array<String>} an array of all permission IDs. + * @return {Array<string>} an array of all permission IDs. */ listPermissions() { if (this._permissionsArray === null) { @@ -727,12 +727,12 @@ export var SitePermissions = { * * @param {nsIPrincipal} principal * The principal to check. - * @param {String} permissionID + * @param {string} permissionID * The id of the permission. * @param {Browser} [browser] The browser object to check for temporary * permissions. * - * @return {Object} an object with the keys: + * @return {object} an object with the keys: * - state: The current state of the permission * (e.g. SitePermissions.ALLOW) * - scope: The scope of the permission @@ -808,7 +808,7 @@ export var SitePermissions = { * browser's contentPrincipal for permission keying. This can be * helpful in situations where the browser has already navigated away * from a site you want to set a permission for. - * @param {String} permissionID The id of the permission. + * @param {string} permissionID The id of the permission. * @param {SitePermissions state} state The state of the permission. * @param {SitePermissions scope} [scope] The scope of the permission. * Defaults to SCOPE_PERSISTENT. @@ -913,7 +913,7 @@ export var SitePermissions = { * * @param {nsIPrincipal} principal * The principal to remove the permission for. - * @param {String} permissionID + * @param {string} permissionID * The id of the permission. * @param {Browser} browser (optional) * The browser object to remove temporary permissions on. @@ -971,7 +971,7 @@ export var SitePermissions = { * @param {string} permissionID * The permission to get the label for. May include second key. * - * @return {String} the localized label or null if none is available. + * @return {string} the localized label or null if none is available. */ getPermissionLabel(permissionID) { let [id, key] = permissionID.split(this.PERM_KEY_DELIMITER); @@ -1006,7 +1006,7 @@ export var SitePermissions = { * @param {SitePermissions state} state * The state to get the label for. * - * @return {String|null} the localized label or null if an + * @return {string | null} the localized label or null if an * unknown state was passed. */ getMultichoiceStateLabel(permissionID, state) { @@ -1046,7 +1046,7 @@ export var SitePermissions = { * @param {SitePermissions scope} scope (optional) * The scope to get the label for. * - * @return {String|null} the localized label or null if an + * @return {string | null} the localized label or null if an * unknown state was passed. */ getCurrentStateLabel(state, id, scope = null) { diff --git a/browser/modules/URILoadingHelper.sys.mjs b/browser/modules/URILoadingHelper.sys.mjs @@ -350,7 +350,7 @@ export const URILoadingHelper = { * * The params object is the same as for `openLinkIn` and documented below. * - * @param {String} where + * @param {string} where * |where| can be: * "current" current tab (if there aren't any browser windows, then in a new window instead) * "tab" new tab (if there aren't any browser windows, then in a new window instead) @@ -359,7 +359,7 @@ export const URILoadingHelper = { * "chromeless" new minimal window (no browser navigation UI) * "save" save to disk (with no filename hint!) * - * @param {Object} params + * @param {object} params * * Options relating to what tab/window to use and how to open it: * @@ -443,9 +443,9 @@ export const URILoadingHelper = { * This callback will be called when a new tab is created. * @param {function} params.resolveOnContentBrowserCreated * This callback will be called with the content browser once it's created. - * @param {Object} params.globalHistoryOptions + * @param {object} params.globalHistoryOptions * Used by places to keep track of search related metadata for loads. - * @param {Number} params.frameID + * @param {number} params.frameID * Used by webextensions for their loads. * * Options used for where="save" only: @@ -672,7 +672,7 @@ export const URILoadingHelper = { * * @param {string} where * The target location for the load (e.g. "current", "tab", "window"). - * @param {Object} params + * @param {object} params * The full params object passed to openLinkIn. * @param {Window} win * The reference window used as a fallback for getTargetWindow. @@ -706,7 +706,7 @@ export const URILoadingHelper = { * matches will be returned. * * @param {Window} window - The current window. - * @param {Object} params - Parameters for selecting the window. + * @param {object} params - Parameters for selecting the window. * @param {boolean} params.skipPopups - Require a non-popup window. * @param {boolean} params.skipTaskbarTabs - Require a non-taskbartab window. * @param {boolean} params.forceNonPrivate - Require a non-private window. @@ -742,15 +742,15 @@ export const URILoadingHelper = { * openUILink handles clicks on UI elements that cause URLs to load. * * @param {string} url - * @param {Event | Object} event Event or JSON object representing an Event - * @param {Boolean | Object} aIgnoreButton + * @param {Event | object} event Event or JSON object representing an Event + * @param {boolean | object} aIgnoreButton * Boolean or object with the same properties as * accepted by openLinkIn, plus "ignoreButton" * and "ignoreAlt". - * @param {Boolean} aIgnoreAlt - * @param {Boolean} aAllowThirdPartyFixup - * @param {Object} aPostData - * @param {Object} aReferrerInfo + * @param {boolean} aIgnoreAlt + * @param {boolean} aAllowThirdPartyFixup + * @param {object} aPostData + * @param {object} aReferrerInfo */ openUILink( window, diff --git a/browser/modules/test/browser/head.js b/browser/modules/test/browser/head.js @@ -44,11 +44,11 @@ function waitForCondition(condition, nextTest, errorMsg) { * An utility function to write some text in the search input box * in a content page. * - * @param {Object} browser + * @param {object} browser * The browser that contains the content. - * @param {String} text + * @param {string} text * The string to write in the search field. - * @param {String} fieldName + * @param {string} fieldName * The name of the field to write to. */ let typeInSearchField = async function (browser, text, fieldName) { diff --git a/browser/modules/webrtcUI.sys.mjs b/browser/modules/webrtcUI.sys.mjs @@ -537,7 +537,7 @@ export var webrtcUI = { * For camera and microphone streams, this will also revoke any associated * permissions from SitePermissions. * - * @param {Array<Object>} activeStreams - An array of streams obtained via webrtcUI.getActiveStreams. + * @param {Array<object>} activeStreams - An array of streams obtained via webrtcUI.getActiveStreams. * @param {boolean} stopCameras - True to stop the camera streams (defaults to true) * @param {boolean} stopMics - True to stop the microphone streams (defaults to true) * @param {boolean} stopScreens - True to stop the screen streams (defaults to true) diff --git a/docshell/base/URIFixup.sys.mjs b/docshell/base/URIFixup.sys.mjs @@ -956,7 +956,7 @@ function fileURIFixup(uriString) { * user:pass@no-scheme.com * * @param {string} uriString The string to fixup. - * @param {Number} fixupFlags The fixup flags to use. + * @param {number} fixupFlags The fixup flags to use. * @returns {nsIURI} an nsIURI built adding the default protocol to the string, * or null if fixing was not possible. */ @@ -982,7 +982,7 @@ function fixupURIProtocol(uriString, fixupFlags) { * user typos and/or "broken" links output by commandline tools. * * @param {string} uriString The string to make into a URI. - * @param {Number} fixupFlags The fixup flags to use. + * @param {number} fixupFlags The fixup flags to use. * @throws NS_ERROR_MALFORMED_URI if the uri is invalid. */ function makeURIWithFixedLocalHosts(uriString, fixupFlags) { @@ -1272,7 +1272,7 @@ function isURILike(uriString, host) { * If no changes were made, it returns an empty string. * * @param {string} oldHost. - * @return {String} Fixed up hostname or an empty string. + * @return {string} Fixed up hostname or an empty string. */ function maybeAddPrefixAndSuffix(oldHost) { let prefix = Services.prefs.getCharPref( diff --git a/dom/base/test/browser_promiseDocumentFlushed.js b/dom/base/test/browser_promiseDocumentFlushed.js @@ -6,7 +6,7 @@ /** * Dirties style and layout on the current browser window. * - * @param {Number} Optional factor by which to modify the DOM. Useful for + * @param {number} Optional factor by which to modify the DOM. Useful for * when multiple calls to dirtyTheDOM may occur, and you need them * to dirty the DOM differently from one another. If you only need * to dirty the DOM once, this can be omitted. diff --git a/dom/base/test/test_document_wireframe.html b/dom/base/test/test_document_wireframe.html @@ -15,13 +15,13 @@ * Converts some RGB values into the same uint32_t nsColor representation * that getWireframe uses. * - * @param {Number} r + * @param {number} r * Red color value. - * @param {Number} g + * @param {number} g * Green color value. - * @param {Number} b + * @param {number} b * Blue color value. - * @returns {Number} + * @returns {number} * The red, green and blue values composed in a single uint32_t-compatible * value. */ @@ -268,7 +268,7 @@ * * @param {Element} frame * The iframe to load the page in. - * @param {String} page + * @param {string} page * The URL of the page to load in the frame. * @returns Promise * @resolves undefined @@ -291,7 +291,7 @@ * * @param {Wireframe} wireframe * A wireframe generated via document.getWireframe() - * @param {Object} approximateWireframe + * @param {object} approximateWireframe * An object that closely resembles a wireframe but the rects in the * rects property do not need to contain all of the properties expected * in a WireframeTaggedRect. Skipped properties won't be checked. diff --git a/dom/events/test/browser_dragdrop_impl.js b/dom/events/test/browser_dragdrop_impl.js @@ -110,22 +110,22 @@ async function openWindow(tabIdx, configParams) { /** * Configure the test. All fields are required. * - * @param {Object} configParams - * @param {String} configParams.outerURL1 + * @param {object} configParams + * @param {string} configParams.outerURL1 * URL of window #1's main frame's content (not iframes). * The document must contain an iframe with ID "iframe" * that will be used to load the iframe HTML. It also * must contain an element with ID "dropSource" that will be * used as the source of a drag, as well as one with ID * "dropTarget" that will be used as the drop target. - * @param {String} configParams.outerURL2 + * @param {string} configParams.outerURL2 * Like outerURL1 but for the second window. outerURL1 and * outerURL2 may be identical. Must include "dropSource" and * "dropTarget" elements. - * @param {String} configParams.innerURL1 + * @param {string} configParams.innerURL1 * URL of the inner frame's content in window #1. Must * include "dropSource" and "dropTarget" elements. - * @param {String} configParams.innerURL1 + * @param {string} configParams.innerURL1 * URL of the inner frame's content in window #2. Must * include "dropSource" and "dropTarget" elements. */ diff --git a/dom/indexedDB/test/file.js b/dom/indexedDB/test/file.js @@ -107,7 +107,7 @@ function verifyBlobProperties(blob1, blob2, fileId) { * * @param {Blob} blob1 actual Blob value * @param {Blob} blob2 Blob with expected properties - * @param {Number} fileId expected id + * @param {number} fileId expected id */ async function verifyBlobAsync(blob1, blob2, fileId) { verifyBlobProperties(blob1, blob2, fileId); diff --git a/dom/ipc/ManifestMessagesChild.sys.mjs b/dom/ipc/ManifestMessagesChild.sys.mjs @@ -49,7 +49,7 @@ export class ManifestMessagesChild extends JSWindowActorChild { * Asynchronously obtains a web manifest from this window by using the * ManifestObtainer and returns the result. * - * @param {Object} checkConformance True if spec conformance messages should be collected. + * @param {object} checkConformance True if spec conformance messages should be collected. */ async obtainManifest(options) { const { checkConformance } = options; @@ -92,7 +92,7 @@ export class ManifestMessagesChild extends JSWindowActorChild { * FIX ME: https://bugzilla.mozilla.org/show_bug.cgi?id=1172586 * * @param {Error} aError The error to serialize. - * @return {Object} The serialized object. + * @return {object} The serialized object. */ function serializeError(aError) { const clone = { diff --git a/dom/manifest/ManifestFinder.sys.mjs b/dom/manifest/ManifestFinder.sys.mjs @@ -8,7 +8,7 @@ export var ManifestFinder = { * manifest link relationship. * * @param aContent DOM Window to check. - * @return {Promise<Boolean>} + * @return {Promise<boolean>} */ contentHasManifestLink(aContent) { if (!aContent || isXULBrowser(aContent)) { diff --git a/dom/manifest/ManifestObtainer.sys.mjs b/dom/manifest/ManifestObtainer.sys.mjs @@ -30,10 +30,10 @@ export var ManifestObtainer = { * on the parent process. * * @param {XULBrowser} The browser to check for the manifest. - * @param {Object} aOptions - * @param {Boolean} aOptions.checkConformance If spec conformance messages should be collected. + * @param {object} aOptions + * @param {boolean} aOptions.checkConformance If spec conformance messages should be collected. * Adds proprietary moz_* members to manifest. - * @return {Promise<Object>} The processed manifest. + * @return {Promise<object>} The processed manifest. */ async browserObtainManifest( aBrowser, @@ -60,10 +60,10 @@ export var ManifestObtainer = { * Public interface for obtaining a web manifest from a XUL browser. * * @param {Window} aContent A content Window from which to extract the manifest. - * @param {Object} aOptions - * @param {Boolean} aOptions.checkConformance If spec conformance messages should be collected. + * @param {object} aOptions + * @param {boolean} aOptions.checkConformance If spec conformance messages should be collected. * Adds proprietary moz_* members to manifest. - * @return {Promise<Object>} The processed manifest. + * @return {Promise<object>} The processed manifest. */ async contentObtainManifest( aContent, @@ -115,7 +115,7 @@ function isXULBrowser(aBrowser) { * * @param {Response} aResp Response from fetch(). * @param {Window} aContentWindow The content window. - * @return {Promise<Object>} The processed manifest. + * @return {Promise<object>} The processed manifest. */ async function processResponse(aResp, aContentWindow, aOptions) { const badStatus = aResp.status < 200 || aResp.status >= 300; @@ -138,7 +138,7 @@ async function processResponse(aResp, aContentWindow, aOptions) { * Asynchronously fetches a web manifest. * * @param {Window} a The content Window from where to extract the manifest. - * @return {Promise<Object>} + * @return {Promise<object>} */ async function fetchManifest(aWindow) { if (!aWindow || aWindow.top !== aWindow) { diff --git a/dom/media/autoplay/test/browser/head.js b/dom/media/autoplay/test/browser/head.js @@ -1,9 +1,9 @@ /** * Return a web-based URL for a given file based on the testing directory. * - * @param {String} fileName + * @param {string} fileName * file that caller wants its web-based url - * @param {Boolean} crossOrigin [optional] + * @param {boolean} crossOrigin [optional] * if set, then return a url with different origin. The default value is * false. */ diff --git a/dom/media/test/browser/browser_telemetry_video_hardware_decoding_support.js b/dom/media/test/browser/browser_telemetry_video_hardware_decoding_support.js @@ -94,7 +94,7 @@ add_task(async function testAudioCodecs() { /** * Return a web-based URL for a given file based on the testing directory. * - * @param {String} fileName + * @param {string} fileName * file that caller wants its web-based url */ function GetTestWebBasedURL(fileName) { diff --git a/dom/media/test/browser/wmfme/head.js b/dom/media/test/browser/wmfme/head.js @@ -3,9 +3,9 @@ /** * Return a web-based URL for a given file based on the testing directory. * - * @param {String} fileName + * @param {string} fileName * file that caller wants its web-based url - * @param {Boolean} cors [optional] + * @param {boolean} cors [optional] * if set, then return a url with different origin */ function GetTestWebBasedURL(fileName) { diff --git a/dom/media/webrtc/tests/mochitests/head.js b/dom/media/webrtc/tests/mochitests/head.js @@ -120,7 +120,7 @@ AudioStreamAnalyser.prototype = { /** * Get an array of frequency domain data for our stream's audio track. * - * @returns {array} A Uint8Array containing the frequency domain data. + * @returns {Array} A Uint8Array containing the frequency domain data. */ getByteFrequencyData() { this.analyser.getByteFrequencyData(this.data); @@ -491,9 +491,9 @@ ${e.stack ? e.stack : ""}` * Checks that the media stream tracks have the expected amount of tracks * with the correct attributes based on the type and constraints given. * - * @param {Object} constraints specifies whether the stream should have + * @param {object} constraints specifies whether the stream should have * audio, video, or both - * @param {String} type the type of media stream tracks being checked + * @param {string} type the type of media stream tracks being checked * @param {sequence<MediaStreamTrack>} mediaStreamTracks the media stream * tracks being checked */ @@ -515,7 +515,7 @@ function checkMediaStreamTracksByType(constraints, type, mediaStreamTracks) { * Check that the given media stream contains the expected media stream * tracks given the associated audio & video constraints provided. * - * @param {Object} constraints specifies whether the stream should have + * @param {object} constraints specifies whether the stream should have * audio, video, or both * @param {MediaStream} mediaStream the media stream being checked */ @@ -537,7 +537,7 @@ function checkMediaStreamTracks(constraints, mediaStream) { * * @param {MediaStream} mediaStream the media stream being checked * @param {Array} tracks the tracks that should exist in mediaStream - * @param {String} [message] an optional message to pass to asserts + * @param {string} [message] an optional message to pass to asserts */ function checkMediaStreamContains(mediaStream, tracks, message) { message = message ? message + ": " : ""; @@ -705,7 +705,7 @@ function getBlackTrack({ width = 640, height = 480 } = {}) { * while running the tests. The generated function kills off the test as well * gracefully. * - * @param {String} [message] + * @param {string} [message] * An optional message to show if no object gets passed into the * generated callback method. */ @@ -759,9 +759,9 @@ var rejectOnUnexpectedEvent = new Promise((x, reject) => { /** * Generates a callback function fired only for unexpected events happening. * - * @param {String} description + * @param {string} description Description of the object for which the event has been fired - * @param {String} eventName + * @param {string} eventName Name of the unexpected event */ function unexpectedEvent(message, eventName) { @@ -1042,7 +1042,7 @@ const GleanTest = new Proxy( * @param {object} framework * A back reference to the framework which makes use of the class. It is * passed to each command callback. - * @param {function[]} commandList + * @param {Function[]} commandList * Commands to set during initialization */ function CommandChain(framework, commandList) { diff --git a/dom/media/webrtc/tests/mochitests/mediaStreamPlayback.js b/dom/media/webrtc/tests/mochitests/mediaStreamPlayback.js @@ -28,7 +28,7 @@ MediaStreamPlayback.prototype = { * Starts media element with a media stream, runs it until a canplaythrough * and timeupdate event fires, and calls stop() on all its tracks. * - * @param {Boolean} isResume specifies if this media element is being resumed + * @param {boolean} isResume specifies if this media element is being resumed * from a previous run */ playMedia(isResume) { @@ -64,7 +64,7 @@ MediaStreamPlayback.prototype = { * Starts media with a media stream, runs it until a canplaythrough and * timeupdate event fires, and detaches from the element without stopping media. * - * @param {Boolean} isResume specifies if this media element is being resumed + * @param {boolean} isResume specifies if this media element is being resumed * from a previous run */ playMediaWithoutStoppingTracks(isResume) { @@ -75,7 +75,7 @@ MediaStreamPlayback.prototype = { /** * Starts the media with the associated stream. * - * @param {Boolean} isResume specifies if the media element playback + * @param {boolean} isResume specifies if the media element playback * is being resumed from a previous run */ startMedia(isResume) { diff --git a/dom/media/webrtc/tests/mochitests/pc.js b/dom/media/webrtc/tests/mochitests/pc.js @@ -208,7 +208,7 @@ PeerConnectionTest.prototype.close = function () { /** * Close the specified data channels * - * @param {Number} index + * @param {number} index * Index of the data channels to close on both sides */ PeerConnectionTest.prototype.closeDataChannels = function (index) { @@ -263,9 +263,9 @@ PeerConnectionTest.prototype.closeDataChannels = function (index) { /** * Send data (message or blob) to the other peer * - * @param {String|Blob} data + * @param {string | Blob} data * Data to send to the other peer. For Blobs the MIME type will be lost. - * @param {Object} [options={ }] + * @param {object} [options={ }] * Options to specify the data channels to be used * @param {DataChannelWrapper} [options.sourceChannel=pcLocal.dataChannels[length - 1]] * Data channel to use for sending the message @@ -721,7 +721,7 @@ DataChannelWrapper.prototype = { /** * Returns the binary type of the channel * - * @returns {String} The binary type + * @returns {string} The binary type */ get binaryType() { return this._channel.binaryType; @@ -730,7 +730,7 @@ DataChannelWrapper.prototype = { /** * Sets the binary type of the channel * - * @param {String} type + * @param {string} type * The new binary type of the channel */ set binaryType(type) { @@ -740,7 +740,7 @@ DataChannelWrapper.prototype = { /** * Returns the label of the underlying data channel * - * @returns {String} The label + * @returns {string} The label */ get label() { return this._channel.label; @@ -749,7 +749,7 @@ DataChannelWrapper.prototype = { /** * Returns the protocol of the underlying data channel * - * @returns {String} The protocol + * @returns {string} The protocol */ get protocol() { return this._channel.protocol; @@ -794,7 +794,7 @@ DataChannelWrapper.prototype = { /** * Returns the readyState bit of the data channel * - * @returns {String} The state of the channel + * @returns {string} The state of the channel */ get readyState() { return this._channel.readyState; @@ -825,7 +825,7 @@ DataChannelWrapper.prototype = { /** * Send data through the data channel * - * @param {String|Object} data + * @param {string | object} data * Data which has to be sent through the data channel */ send(data) { @@ -836,7 +836,7 @@ DataChannelWrapper.prototype = { /** * Returns the string representation of the class * - * @returns {String} The string representation + * @returns {string} The string representation */ toString() { return ( @@ -1190,7 +1190,7 @@ PeerConnectionWrapper.prototype = { /** * Requests all the media streams as specified in the constrains property. * - * @param {array} constraintsList + * @param {Array} constraintsList * Array of constraints for GUM calls */ getAllUserMedia(constraintsList) { @@ -1244,7 +1244,7 @@ PeerConnectionWrapper.prototype = { /** * Create a new data channel instance * - * @param {Object} options + * @param {object} options * Options which get forwarded to nsIPeerConnection.createDataChannel * @returns {DataChannelWrapper} The created data channel */ @@ -2360,7 +2360,7 @@ PeerConnectionWrapper.prototype = { /** * Returns the string representation of the class * - * @returns {String} The string representation + * @returns {string} The string representation */ toString() { return "PeerConnectionWrapper (" + this.label + ")"; diff --git a/dom/midi/tests/browser_midi_permission_gated.js b/dom/midi/tests/browser_midi_permission_gated.js @@ -703,7 +703,7 @@ add_task(function teardown_telemetry_events() { /** * Check that the expected sitepermission install events are recorded. * - * @param {Array<String>} expectedSteps: An array of the expected extra.step values recorded. + * @param {Array<string>} expectedSteps: An array of the expected extra.step values recorded. */ function assertSitePermissionInstallTelemetryEvents(expectedSteps) { let amInstallEvents = AddonTestUtils.getAMTelemetryEvents() diff --git a/dom/notification/test/browser/browser_permission_dismiss.js b/dom/notification/test/browser/browser_permission_dismiss.js @@ -15,7 +15,7 @@ const TEST_URL = /** * Clicks the specified web-notifications prompt button. * - * @param {Number} aButtonIndex Number indicating which button to click. + * @param {number} aButtonIndex Number indicating which button to click. * See the constants in this file. * @note modified from toolkit/components/passwordmgr/test/browser/head.js */ @@ -44,7 +44,7 @@ function clickDoorhangerButton(aButtonIndex, browser) { * and verifies that the expected permission is set. * * @param {Function} task Task function to run to interact with the prompt. - * @param {String} permission Expected permission value. + * @param {string} permission Expected permission value. * @return {Promise} resolving when the task function is done and the tab * closes. */ diff --git a/dom/push/PushBroadcastService.sys.mjs b/dom/push/PushBroadcastService.sys.mjs @@ -111,7 +111,7 @@ export var BroadcastService = class { * @param {string} broadcastId The broadcastID to listen for * @param {string} version The most recent version we have for * updates from this broadcastID - * @param {Object} sourceInfo A description of the handler for + * @param {object} sourceInfo A description of the handler for * updates on this broadcastID */ async addListener(broadcastId, version, sourceInfo) { @@ -168,10 +168,10 @@ export var BroadcastService = class { /** * Call the listeners of the specified broadcasts. * - * @param {Array<Object>} broadcasts Map between broadcast ids and versions. - * @param {Object} context Additional information about the context in which the + * @param {Array<object>} broadcasts Map between broadcast ids and versions. + * @param {object} context Additional information about the context in which the * broadcast notification was originally received. This is transmitted to listeners. - * @param {String} context.phase One of `BroadcastService.PHASES` + * @param {string} context.phase One of `BroadcastService.PHASES` */ async receivedBroadcastMessage(broadcasts, context) { lazy.console.info("receivedBroadcastMessage:", broadcasts, context); diff --git a/dom/push/PushCrypto.sys.mjs b/dom/push/PushCrypto.sys.mjs @@ -43,9 +43,9 @@ class CryptoError extends Error { * Creates an error object indicating an incoming push message could not be * decrypted. * - * @param {String} message A human-readable error message. This is only for + * @param {string} message A human-readable error message. This is only for * internal module logging, and doesn't need to be localized. - * @param {String} property The localized property name from `dom.properties`. + * @param {string} property The localized property name from `dom.properties`. * @param {String...} params Substitutions to insert into the localized * string. */ @@ -60,9 +60,9 @@ class CryptoError extends Error { * Formats a localized string for reporting decryption errors to the Web * Console. * - * @param {String} scope The scope of the service worker receiving the + * @param {string} scope The scope of the service worker receiving the * message, prepended to any other substitutions in the string. - * @returns {String} The localized string. + * @returns {string} The localized string. */ format(scope) { let params = [scope, ...this.params].map(String); @@ -285,7 +285,7 @@ class Decoder { * @param {BufferSource} publicKey The static subscription public key. * @param {BufferSource} authenticationSecret The subscription authentication * secret, or `null` if not used by the scheme. - * @param {Object} cryptoParams An object containing the ephemeral sender + * @param {object} cryptoParams An object containing the ephemeral sender * public key, salt, and record size. * @param {BufferSource} ciphertext The encrypted message data. */ @@ -387,10 +387,10 @@ class Decoder { * * @throws {CryptoError} if decryption fails or padding is incorrect. * @param {Uint8Array} slice The encrypted record. - * @param {Number} index The record sequence number. + * @param {number} index The record sequence number. * @param {Uint8Array} nonce The nonce base, used to generate the IV. * @param {Uint8Array} key The content encryption key. - * @param {Boolean} last Indicates if this is the final record. + * @param {boolean} last Indicates if this is the final record. * @returns {Uint8Array} The decrypted block with padding removed. */ async decodeChunk(slice, index, nonce, key, last) { @@ -599,7 +599,7 @@ export var PushCrypto = { * receiving the message, in raw form. * @param {BufferSource} authenticationSecret The 16-byte shared * authentication secret of the subscription receiving the message. - * @param {Object} headers The encryption headers from the push server. + * @param {object} headers The encryption headers from the push server. * @param {BufferSource} payload The encrypted message payload. * @returns {Uint8Array} The decrypted message data. */ diff --git a/dom/push/PushDB.sys.mjs b/dom/push/PushDB.sys.mjs @@ -223,8 +223,8 @@ PushDB.prototype = { /** * Iterates over all records associated with an origin. * - * @param {String} origin The origin, matched as a prefix against the scope. - * @param {String} originAttributes Additional origin attributes. Requires + * @param {string} origin The origin, matched as a prefix against the scope. + * @param {string} originAttributes Additional origin attributes. Requires * an exact match. * @param {Function} callback A function with the signature `(record, * cursor)`, called for each record. `record` is the registration, and @@ -385,7 +385,7 @@ PushDB.prototype = { /** * Updates an existing push registration. * - * @param {String} aKeyID The registration ID. + * @param {string} aKeyID The registration ID. * @param {Function} aUpdateFunc A function that receives the existing * registration record as its argument, and returns a new record. * @returns {Promise} A promise resolved with either the updated record. diff --git a/dom/push/PushService.sys.mjs b/dom/push/PushService.sys.mjs @@ -358,7 +358,7 @@ export var PushService = { * service is not connected, this function is a no-op. * * @param {PushRecord} record The record to unregister. - * @param {Number} reason An `nsIPushErrorReporter` unsubscribe reason, + * @param {number} reason An `nsIPushErrorReporter` unsubscribe reason, * indicating why this record was removed. */ _backgroundUnregister(record, reason) { @@ -673,7 +673,7 @@ export var PushService = { * Drops a registration and notifies the associated service worker. If the * registration does not exist, this function is a no-op. * - * @param {String} keyID The registration ID to remove. + * @param {string} keyID The registration ID to remove. * @returns {Promise} Resolves once the worker has been notified. */ dropRegistrationAndNotifyApp(aKeyID) { @@ -685,7 +685,7 @@ export var PushService = { /** * Updates a registration and notifies the associated service worker. * - * @param {String} keyID The registration ID to update. + * @param {string} keyID The registration ID to update. * @param {Function} updateFunc Returns the updated record. * @returns {Promise} Resolves with the updated record once the worker * has been notified. @@ -743,11 +743,11 @@ export var PushService = { * the registration and message will be dropped, and the worker will not * be notified. * - * @param {String} keyID The push registration ID. - * @param {String} messageID The message ID, used to report service worker + * @param {string} keyID The push registration ID. + * @param {string} messageID The message ID, used to report service worker * delivery failures. For Web Push messages, this is the version. If empty, * failures will not be reported. - * @param {Object} headers The encryption headers. + * @param {object} headers The encryption headers. * @param {ArrayBuffer|Uint8Array} data The encrypted message data. * @param {Function} updateFunc A function that receives the existing * registration record as its argument, and returns a new record. If the @@ -786,8 +786,8 @@ export var PushService = { /** * Dispatches a broadcast notification to the BroadcastService. * - * @param {Object} message The reply received by PushServiceWebSocket - * @param {Object} context Additional information about the context in which the + * @param {object} message The reply received by PushServiceWebSocket + * @param {object} context Additional information about the context in which the * notification was received. */ receivedBroadcastMessage(message, context) { @@ -801,7 +801,7 @@ export var PushService = { /** * Updates a registration record after receiving a push message. * - * @param {String} keyID The push registration ID. + * @param {string} keyID The push registration ID. * @param {Function} updateFunc The function passed to `receivedPushMessage`. * @returns {Promise} Resolves with the updated record, or rejects if the * record was not updated. @@ -855,8 +855,8 @@ export var PushService = { * Decrypts an incoming message and notifies the associated service worker. * * @param {PushRecord} record The receiving registration. - * @param {String} messageID The message ID. - * @param {Object} headers The encryption headers. + * @param {string} messageID The message ID. + * @param {object} headers The encryption headers. * @param {ArrayBuffer|Uint8Array} data The encrypted message data. * @returns {Promise} Resolves with an ack status code. */ diff --git a/dom/push/test/xpcshell/head.js b/dom/push/test/xpcshell/head.js @@ -68,7 +68,7 @@ Services.obs.addObserver(function observe(subject, topic) { * Gates a function so that it is called only after the wrapper is called a * given number of times. * - * @param {Number} times The number of wrapper calls before |func| is called. + * @param {number} times The number of wrapper calls before |func| is called. * @param {Function} func The function to gate. * @returns {Function} The gated function wrapper. */ @@ -102,7 +102,7 @@ function waterfall(...callbacks) { /** * Waits for an observer notification to fire. * - * @param {String} topic The notification topic. + * @param {string} topic The notification topic. * @returns {Promise} A promise that fulfills when the notification is fired. */ function promiseObserverNotification(topic, matchFunc) { @@ -124,8 +124,8 @@ function promiseObserverNotification(topic, matchFunc) { * argument. If the original value is a function, the proxy returns a wrapper * that calls the stub; otherwise, the stub is called as a getter. * - * @param {Object} target The object to wrap. - * @param {Object} stubs An object containing stubbed values and functions. + * @param {object} target The object to wrap. + * @param {object} stubs An object containing stubbed values and functions. * @returns {Proxy} A proxy that returns stubs for property gets. */ function makeStub(target, stubs) { @@ -153,7 +153,7 @@ function makeStub(target, stubs) { * Sets default PushService preferences. All pref names are prefixed with * `dom.push.`; any additional preferences will override the defaults. * - * @param {Object} [prefs] Additional preferences to set. + * @param {object} [prefs] Additional preferences to set. */ function setPrefs(prefs = {}) { let defaultPrefs = Object.assign( @@ -310,7 +310,7 @@ MockWebSocket.prototype = { * onAcknowledge() synchronously. Throws if the message is not a string. * Used by the tests to respond to client commands. * - * @param {String} msg The message to send to the client. + * @param {string} msg The message to send to the client. */ serverSendMsg(msg) { if (typeof msg != "string") { @@ -326,8 +326,8 @@ MockWebSocket.prototype = { * Closes the server end of the connection, calling onServerClose() * followed by onStop(). Used to test abrupt connection termination. * - * @param {Number} [statusCode] The WebSocket connection close code. - * @param {String} [reason] The connection close reason. + * @param {number} [statusCode] The WebSocket connection close code. + * @param {string} [reason] The connection close reason. */ serverClose(statusCode, reason = "") { if (!isFinite(statusCode)) { diff --git a/dom/quota/test/modules/system/QuotaUtils.sys.mjs b/dom/quota/test/modules/system/QuotaUtils.sys.mjs @@ -17,7 +17,7 @@ export const QuotaUtils = { * * These requests are typically returned by the quota manager service. * - * @param {Object} request + * @param {object} request * The request object, which must have a callback property and * result-related properties (e.g., resultCode, resultName). * @returns {Promise} diff --git a/dom/serviceworkers/test/error_reporting_helpers.js b/dom/serviceworkers/test/error_reporting_helpers.js @@ -26,11 +26,11 @@ let localizer = stringBundleService.createBundle( * Multiple error messages can be expected, just repeat the msgId and args * argument pair as needed. * - * @param {String} msgId + * @param {string} msgId * The localization message identifier used in the properties file. - * @param {String[]} args + * @param {string[]} args * The list of formatting arguments we expect the error to be generated with. - * @return {Object} Promise/handle to pass to wait_for_expected_message. + * @return {object} Promise/handle to pass to wait_for_expected_message. */ function expect_console_message(/* msgId, args, ... */) { let expectations = []; diff --git a/dom/simpledb/test/modules/system/SimpleDBUtils.sys.mjs b/dom/simpledb/test/modules/system/SimpleDBUtils.sys.mjs @@ -24,7 +24,7 @@ export const SimpleDBUtils = { * * These requests are typically returned by the connection. * - * @param {Object} request + * @param {object} request * The request object, which must have a callback property and * result-related properties (e.g., resultCode, resultName). * @returns {Promise} diff --git a/dom/xhr/tests/test_XHR_timeout.js b/dom/xhr/tests/test_XHR_timeout.js @@ -44,11 +44,11 @@ function ok(bool, msg) { /** * Generate and track results from a XMLHttpRequest with regards to timeouts. * - * @param {String} id The test description. - * @param {Number} timeLimit The initial setting for the request timeout. - * @param {Number} resetAfter (Optional) The time after sending the request, to + * @param {string} id The test description. + * @param {number} timeLimit The initial setting for the request timeout. + * @param {number} resetAfter (Optional) The time after sending the request, to * reset the timeout. - * @param {Number} resetTo (Optional) The delay to reset the timeout to. + * @param {number} resetTo (Optional) The delay to reset the timeout to. * * @note The actual testing takes place in handleEvent(event). * The requests are generated in startXHR(). @@ -121,7 +121,7 @@ RequestTracker.prototype = { /** * Get a message describing this test. * - * @returns {String} The test description. + * @returns {string} The test description. */ getMessage() { var rv = this.id + ", "; @@ -233,7 +233,7 @@ AbortedRequest.prototype = { /** * Get a message describing this test. * - * @returns {String} The test description. + * @returns {string} The test description. */ getMessage() { return "time to abort is " + this.abortDelay + ", timeout set at 2000"; diff --git a/netwerk/base/EssentialDomainsRemoteSettings.sys.mjs b/netwerk/base/EssentialDomainsRemoteSettings.sys.mjs @@ -85,7 +85,7 @@ export class EssentialDomainsRemoteSettings { * * @param {boolean} [firstTime] * Internal boolean to indicate if this is the first time check or not. - * @returns {array} + * @returns {Array} * An array of objects in the database, or an empty array if none * could be obtained. */ diff --git a/netwerk/base/SimpleURIUnknownSchemesRemoteObserver.sys.mjs b/netwerk/base/SimpleURIUnknownSchemesRemoteObserver.sys.mjs @@ -89,7 +89,7 @@ export class SimpleURIUnknownSchemesRemoteObserver { * * @param {boolean} [firstTime] * Internal boolean to indicate if this is the first time check or not. - * @returns {array} + * @returns {Array} * An array of objects in the database, or an empty array if none * could be obtained. */ diff --git a/netwerk/cookie/test/browser/browser_3pcb_expection.js b/netwerk/cookie/test/browser/browser_3pcb_expection.js @@ -28,10 +28,10 @@ let db; /** * Dispatch a RemoteSettings "sync" event. * - * @param {Object} data - The event's data payload. - * @param {Object} [data.created] - Records that were created. - * @param {Object} [data.updated] - Records that were updated. - * @param {Object} [data.deleted] - Records that were removed. + * @param {object} data - The event's data payload. + * @param {object} [data.created] - Records that were created. + * @param {object} [data.updated] - Records that were updated. + * @param {object} [data.deleted] - Records that were removed. */ async function remoteSettingsSync({ created, updated, deleted }) { await RemoteSettings(COLLECTION_NAME).emit("sync", { diff --git a/netwerk/test/unit/head_telemetry.js b/netwerk/test/unit/head_telemetry.js @@ -27,7 +27,7 @@ var HandshakeTelemetryHelpers = { * Counts the number of entries in the histogram, ignoring the bucket value. * e.g. {0: 1, 1: 2, 3: 3} has 6 entries. * - * @param {Object} histObject The histogram to count the entries of. + * @param {object} histObject The histogram to count the entries of. * @returns The count of the number of entries in the histogram. */ countHistogramEntries(histObject) { @@ -47,9 +47,9 @@ var HandshakeTelemetryHelpers = { * Assert that the histogram index is the right value. It expects that * other indexes are all zero. * - * @param {Object} histogram The histogram to check. - * @param {Number} index The index to check against the expected value. - * @param {Number} expected The expected value of the index. + * @param {object} histogram The histogram to check. + * @param {number} index The index to check against the expected value. + * @param {number} expected The expected value of the index. */ assertHistogramMap(histogram, expectedEntries) { Assert.ok( diff --git a/netwerk/test/unit/test_network_connectivity_service.js b/netwerk/test/unit/test_network_connectivity_service.js @@ -11,7 +11,7 @@ const { HttpServer } = ChromeUtils.importESModule( /** * Waits for an observer notification to fire. * - * @param {String} topicName The notification topic. + * @param {string} topicName The notification topic. * @returns {Promise} A promise that fulfills when the notification is fired. */ function promiseObserverNotification(topicName, matchFunc) { diff --git a/netwerk/test/unit/test_trr_nat64.js b/netwerk/test/unit/test_trr_nat64.js @@ -22,7 +22,7 @@ registerCleanupFunction(async () => { /** * Waits for an observer notification to fire. * - * @param {String} topic The notification topic. + * @param {string} topic The notification topic. * @returns {Promise} A promise that fulfills when the notification is fired. */ function promiseObserverNotification(topic, matchFunc) { diff --git a/netwerk/url-classifier/UrlClassifierExceptionListService.sys.mjs b/netwerk/url-classifier/UrlClassifierExceptionListService.sys.mjs @@ -62,7 +62,7 @@ class Feature { /** * Convert a JS object from RemoteSettings to an nsIUrlClassifierExceptionListEntry. * - * @param {Object} rsObject - The JS object from RemoteSettings to convert. + * @param {object} rsObject - The JS object from RemoteSettings to convert. * @returns {nsIUrlClassifierExceptionListEntry} The converted nsIUrlClassifierExceptionListEntry. */ static rsObjectToEntry(rsObject) { diff --git a/services/common/async.sys.mjs b/services/common/async.sys.mjs @@ -249,7 +249,7 @@ class Watchdog { * `"timeout"` if the watchdog timer fired, or `"shutdown"` if the app is * is quitting. * - * @type {String?} + * @type {string?} */ this.abortReason = null; } @@ -268,7 +268,7 @@ class Watchdog { /** * Starts the watchdog timer, and listens for the app quitting. * - * @param {Number} delay + * @param {number} delay * The time to wait before signaling the operation to abort. */ start(delay) { diff --git a/services/common/kinto-storage-adapter.sys.mjs b/services/common/kinto-storage-adapter.sys.mjs @@ -18,8 +18,8 @@ import { Kinto } from "resource://services-common/kinto-offline-client.sys.mjs"; /** * Filter and sort list against provided filters and order. * - * @param {Object} filters The filters to apply. - * @param {String} order The order to apply. + * @param {object} filters The filters to apply. + * @param {string} order The order to apply. * @param {Array} list The list to reduce. * @return {Array} */ @@ -34,7 +34,7 @@ function reduceRecords(filters, order, list) { * This is a copy of `_isUndefined` from kinto.js/src/utils.js. * * @param {Any} value - * @return {Boolean} + * @return {boolean} */ function _isUndefined(value) { return typeof value === "undefined"; @@ -45,7 +45,7 @@ function _isUndefined(value) { * * This is a copy of `sortObjects` from kinto.js/src/utils.js. * - * @param {String} order The ordering, eg. `-last_modified`. + * @param {string} order The ordering, eg. `-last_modified`. * @param {Array} list The collection to order. * @return {Array} */ @@ -72,8 +72,8 @@ function sortObjects(order, list) { * * This is a copy of `filterObject` from kinto.js/src/utils.js. * - * @param {Object} filters The filters object. - * @param {Object} entry The object to filter. + * @param {object} filters The filters object. + * @param {object} entry The object to filter. * @return {Function} */ function filterObject(filters, entry) { @@ -91,7 +91,7 @@ function filterObject(filters, entry) { * * This is a copy of `filterObjects` from kinto.js/src/utils.js. * - * @param {Object} filters The filters object. + * @param {object} filters The filters object. * @param {Array} list The collection to filter. * @return {Array} */ diff --git a/services/common/uptake-telemetry.sys.mjs b/services/common/uptake-telemetry.sys.mjs @@ -37,7 +37,7 @@ export class UptakeTelemetry { * - `CUSTOM_4_ERROR`: Update source specific error #4. * - `CUSTOM_5_ERROR`: Update source specific error #5. * - * @type {Object} + * @type {object} */ static get STATUS() { return { @@ -78,7 +78,7 @@ export class UptakeTelemetry { * * @param {string} component the component reporting the uptake (eg. "Normandy"). * @param {string} status the uptake status (eg. "network_error") - * @param {Object} extra extra values to report + * @param {object} extra extra values to report * @param {string} extra.source the update source (eg. "recipe-42"). * @param {string} extra.trigger what triggered the polling/fetching (eg. "broadcast", "timer"). * @param {int} extra.age age of pulled data in seconds diff --git a/services/crypto/modules/jwcrypto.sys.mjs b/services/crypto/modules/jwcrypto.sys.mjs @@ -24,13 +24,13 @@ class JWCrypto { * algorithm is enc="A256GCM" [1] and the only supported key encryption algorithm * is alg="ECDH-ES" [2]. * - * @param {Object} key Peer Public JWK. + * @param {object} key Peer Public JWK. * @param {ArrayBuffer} data * * [1] https://tools.ietf.org/html/rfc7518#section-5.3 * [2] https://tools.ietf.org/html/rfc7518#section-4.6 * - * @returns {Promise<String>} + * @returns {Promise<string>} */ async generateJWE(key, data) { // Generate an ephemeral key to use just for this encryption. @@ -167,7 +167,7 @@ class JWCrypto { * * @param {CryptoKey} privateKey * @param {CryptoKey} publicKey - * @param {String[]} keyUsages See `SubtleCrypto.deriveKey` 5th paramater documentation. + * @param {string[]} keyUsages See `SubtleCrypto.deriveKey` 5th paramater documentation. * @returns {Promise<CryptoKey>} */ async function deriveECDHSharedAESKey(privateKey, publicKey, keyUsages) { diff --git a/services/crypto/modules/utils.sys.mjs b/services/crypto/modules/utils.sys.mjs @@ -37,7 +37,7 @@ export var CryptoUtils = { /** * Generate a string of random bytes. * - * @returns {String} Octet string + * @returns {string} Octet string */ generateRandomBytesLegacy(length) { let bytes = CryptoUtils.generateRandomBytes(length); @@ -124,7 +124,7 @@ export var CryptoUtils = { * @param {string} ikm IKM as an octet string. * @param {string} salt Salt as an Hex string. * @param {string} info Info as a regular string. - * @param {Number} len Desired output length in bytes. + * @param {number} len Desired output length in bytes. */ async hkdfLegacy(ikm, xts, info, len) { ikm = CommonUtils.byteStringToArrayBuffer(ikm); @@ -156,7 +156,7 @@ export var CryptoUtils = { * @param {ArrayBuffer} ikm * @param {ArrayBuffer} salt * @param {ArrayBuffer} info - * @param {Number} len Desired output length in bytes. + * @param {number} len Desired output length in bytes. * @returns {Uint8Array} */ async hkdf(ikm, salt, info, len) { diff --git a/services/fxaccounts/Credentials.sys.mjs b/services/fxaccounts/Credentials.sys.mjs @@ -54,7 +54,7 @@ export var Credentials = Object.freeze({ * * keyWord derivation for use as a salt. * - * @param {String} context String for use in generating salt + * @param {string} context String for use in generating salt * * @return {bitArray} the salt * @@ -70,8 +70,8 @@ export var Credentials = Object.freeze({ * * keyWord extended with a name and an email. * - * @param {String} name The name of the salt - * @param {String} email The email of the user. + * @param {string} name The name of the salt + * @param {string} email The email of the user. * * @return {bitArray} the salt combination with the namespace * diff --git a/services/fxaccounts/FxAccounts.sys.mjs b/services/fxaccounts/FxAccounts.sys.mjs @@ -402,9 +402,9 @@ export class FxAccounts { * result if it's not older than 4 hours. If the cached data is too old or * missing, it fetches new data and updates the cache. * - * @typedef {Object} AttachedClient - * @property {String} id - OAuth `client_id` of the client. - * @property {Number} lastAccessedDaysAgo - How many days ago the client last + * @typedef {object} AttachedClient + * @property {string} id - OAuth `client_id` of the client. + * @property {number} lastAccessedDaysAgo - How many days ago the client last * accessed the FxA server APIs. * * @returns {Array.<AttachedClient>} A list of attached clients. @@ -1204,8 +1204,8 @@ FxAccountsInternal.prototype = { * It's split out into a separate method so that we can easily * stash in-flight calls in a cache. * - * @param {String} scopeString - * @param {Number} ttl + * @param {string} scopeString + * @param {number} ttl * @returns {Promise<string>} * @private */ diff --git a/services/fxaccounts/FxAccountsClient.sys.mjs b/services/fxaccounts/FxAccountsClient.sys.mjs @@ -253,7 +253,7 @@ FxAccountsClient.prototype = { * * @param String sessionTokenHex * The session token encoded in hex - * @param {Object} options + * @param {object} options * @param options.client_id * @param options.state * @param options.scope @@ -261,7 +261,7 @@ FxAccountsClient.prototype = { * @param options.code_challenge_method * @param options.code_challenge * @param [options.keys_jwe] - * @returns {Promise<Object>} Object containing `code` and `state`. + * @returns {Promise<object>} Object containing `code` and `state`. */ async oauthAuthorize(sessionTokenHex, options) { const credentials = await deriveHawkCredentials( @@ -291,7 +291,7 @@ FxAccountsClient.prototype = { * @param String verifier: OAuth PKCE verifier * @param String clientId: OAuth client ID * - * @returns { Object } object containing `refresh_token`, `access_token` and `keys_jwe` + * @returns {object} object containing `refresh_token`, `access_token` and `keys_jwe` */ async oauthToken(sessionTokenHex, code, verifier, clientId) { const credentials = await deriveHawkCredentials( @@ -464,14 +464,14 @@ FxAccountsClient.prototype = { /** * Obtain an OAuth access token by authenticating using a session token. * - * @param {String} sessionTokenHex + * @param {string} sessionTokenHex * The session token encoded in hex - * @param {String} clientId - * @param {String} scope + * @param {string} clientId + * @param {string} scope * List of space-separated scopes. - * @param {Number} ttl + * @param {number} ttl * Token time to live. - * @return {Promise<Object>} Object containing an `access_token`. + * @return {Promise<object>} Object containing an `access_token`. */ async accessTokenWithSessionToken(sessionTokenHex, clientId, scope, ttl) { const credentials = await deriveHawkCredentials( diff --git a/services/fxaccounts/FxAccountsCommands.sys.mjs b/services/fxaccounts/FxAccountsCommands.sys.mjs @@ -122,7 +122,7 @@ export class FxAccountsCommands { * This method can be called either in response to a Push message, * or by itself as a "commands recovery" mechanism. * - * @param {Number} notifiedIndex "Command received" push messages include + * @param {number} notifiedIndex "Command received" push messages include * the index of the command that triggered the message. We use it as a * hint when we have no "last command index" stored. */ @@ -465,7 +465,7 @@ export class SendTab extends Command { /** * @param {Device[]} to - Device objects (typically returned by fxAccounts.getDevicesList()). - * @param {Object} tab + * @param {object} tab * @param {string} tab.url * @param {string} tab.title * @returns A report object, in the shape of @@ -558,7 +558,7 @@ export class CloseRemoteTab extends Command { /** * @param {Device} target - Device object (typically returned by fxAccounts.getDevicesList()). - * @param {String[]} urls - array of urls that should be closed on the remote device + * @param {string[]} urls - array of urls that should be closed on the remote device */ async sendCloseTabsCommand(target, urls, flowID) { log.info(`Sending tab closures to ${target.id} device.`); diff --git a/services/fxaccounts/FxAccountsDevice.sys.mjs b/services/fxaccounts/FxAccountsDevice.sys.mjs @@ -178,10 +178,10 @@ export class FxAccountsDevice { * multiple concurrent calls to `refreshDeviceList` will only refresh the * list once. * - * @param {Boolean} [options.ignoreCached] + * @param {boolean} [options.ignoreCached] * If `true`, forces a refresh, even if the cached device list is * still fresh. Defaults to `false`. - * @return {Promise<Boolean>} + * @return {Promise<boolean>} * `true` if the list was refreshed, `false` if the cached list is * fresh. Rejects if an error occurs refreshing the list or device * push registration. diff --git a/services/fxaccounts/FxAccountsKeys.sys.mjs b/services/fxaccounts/FxAccountsKeys.sys.mjs @@ -102,7 +102,7 @@ export class FxAccountsKeys { /** * Get the key for a specified OAuth scope. * - * @param {String} scope The OAuth scope whose key should be returned + * @param {string} scope The OAuth scope whose key should be returned * * @return Promise<JWK> * If no key is available the promise resolves to `null`. @@ -128,9 +128,9 @@ export class FxAccountsKeys { /** * Validates if the given scoped keys are valid keys * - * @param { Object } scopedKeys: The scopedKeys bundle + * @param {object} scopedKeys: The scopedKeys bundle * - * @return { Boolean }: true if the scopedKeys bundle is valid, false otherwise + * @return {boolean}: true if the scopedKeys bundle is valid, false otherwise */ validScopedKeys(scopedKeys) { for (const expectedScope of Object.keys(scopedKeys)) { @@ -195,7 +195,7 @@ export class FxAccountsKeys { * for use as a key identifier, rather than the timestamp+fingerprint format used by * FxA scoped keys. * - * @param {Object} jwk The JWK from which to extract the `kid` field as hex. + * @param {object} jwk The JWK from which to extract the `kid` field as hex. */ kidAsHex(jwk) { // The kid format is "{timestamp}-{b64url(fingerprint)}", but we have to be careful @@ -275,7 +275,7 @@ export class FxAccountsKeys { /** * Set externally derived scoped keys in internal storage * - * @param { Object } scopedKeys: The scoped keys object derived by the oauth flow + * @param {object} scopedKeys: The scoped keys object derived by the oauth flow * * @return { Promise }: A promise that resolves if the keys were successfully stored, * or rejects if we failed to persist the keys, or if the user is not signed in already @@ -653,9 +653,9 @@ export class FxAccountsKeys { * * @param {ArrayBuffer} kid bytes of the key hash to use in the key identifier * @param {ArrayBuffer} key bytes of the derived sync key - * @param {String} scope the scope with which this key is associated - * @param {Number} keyRotationTimestamp server-provided timestamp of last key rotation - * @returns {Object} key material formatted as a JWK object + * @param {string} scope the scope with which this key is associated + * @param {number} keyRotationTimestamp server-provided timestamp of last key rotation + * @returns {object} key material formatted as a JWK object */ _formatLegacyScopedKey(kid, key, scope, { keyRotationTimestamp }) { kid = ChromeUtils.base64URLEncode(kid, { diff --git a/services/fxaccounts/FxAccountsOAuth.sys.mjs b/services/fxaccounts/FxAccountsOAuth.sys.mjs @@ -37,7 +37,7 @@ export class FxAccountsOAuth { /** * Creates a new FxAccountsOAuth * - * @param { Object } fxaClient: The fxa client used to send http request to the oauth server + * @param {object} fxaClient: The fxa client used to send http request to the oauth server */ constructor(fxaClient, fxaKeys) { this.#flow = {}; @@ -49,7 +49,7 @@ export class FxAccountsOAuth { * Stores a flow in-memory * * @param { string } state: A base-64 URL-safe string represnting a random value created at the start of the flow - * @param { Object } value: The data needed to complete a flow, once the oauth code is available. + * @param {object} value: The data needed to complete a flow, once the oauth code is available. * in practice, `value` is: * - `verifier`: A base=64 URL-safe string representing the PKCE code verifier * - `key`: The private key need to decrypt the JWE we recieve from the auth server @@ -70,7 +70,7 @@ export class FxAccountsOAuth { * 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 + * @returns {object}: The values initially stored when startign th eoauth flow * in practice, the return value is: * - `verifier`: A base=64 URL-safe string representing the PKCE code verifier * - `key`: The private key need to decrypt the JWE we recieve from the auth server @@ -95,7 +95,7 @@ export class FxAccountsOAuth { * * @param { string[] } scopes: The OAuth scopes the client should request from FxA * - * @returns { Object }: Returns an object representing the query parameters that should be + * @returns {object}: Returns an object representing the query parameters that should be * added to the FxA authorization URL to initialize an oAuth flow. * In practice, the query parameters are: * - `client_id`: The OAuth client ID for Firefox Desktop @@ -181,7 +181,7 @@ export class FxAccountsOAuth { * @param { string } code: OAuth authorization code provided by running an OAuth flow * @param { string } state: The state first provided by `beginOAuthFlow`, then roundtripped through the server * - * @returns { Object }: Returns an object representing the result of completing the oauth flow. + * @returns {object}: Returns an object representing the result of completing the oauth flow. * The object includes the following: * - 'scopedKeys': The encryption keys provided by the server, already decrypted * - 'refreshToken': The refresh token provided by the server diff --git a/services/fxaccounts/FxAccountsPairing.sys.mjs b/services/fxaccounts/FxAccountsPairing.sys.mjs @@ -436,7 +436,7 @@ export class FxAccountsPairingFlow { /** * Grant an OAuth authorization code for the connecting client. * - * @param {Object} options + * @param {object} options * @param options.client_id * @param options.state * @param options.scope @@ -444,7 +444,7 @@ export class FxAccountsPairingFlow { * @param options.code_challenge_method * @param options.code_challenge * @param [options.keys_jwe] - * @returns {Promise<Object>} Object containing "code" and "state" properties. + * @returns {Promise<object>} Object containing "code" and "state" properties. */ _authorizeOAuthCode(options) { return this._fxa._withVerifiedAccountState(async state => { @@ -486,10 +486,10 @@ export class FxAccountsPairingFlow { * * This client must actually have the key. * * The other client must be allowed to request that key. * - * @param {String} sessionToken the sessionToken to use when fetching key metadata - * @param {String} clientId the client requesting access to our keys - * @param {String} scopes Space separated requested scopes being requested - * @param {Object} jwk Ephemeral JWK provided by the client for secure key transfer + * @param {string} sessionToken the sessionToken to use when fetching key metadata + * @param {string} clientId the client requesting access to our keys + * @param {string} scopes Space separated requested scopes being requested + * @param {object} jwk Ephemeral JWK provided by the client for secure key transfer */ async _createKeysJWE(sessionToken, clientId, scopes, jwk) { // This checks with the FxA server about what scopes the client is allowed. diff --git a/services/fxaccounts/FxAccountsProfileClient.sys.mjs b/services/fxaccounts/FxAccountsProfileClient.sys.mjs @@ -28,8 +28,8 @@ import { RESTRequest } from "resource://services-common/rest.sys.mjs"; /** * Create a new FxAccountsProfileClient to be able to fetch Firefox Account profile information. * - * @param {Object} options Options - * @param {String} options.serverURL + * @param {object} options Options + * @param {string} options.serverURL * The URL of the profile server to query. * Example: https://profile.accounts.firefox.com/v1 * @constructor @@ -63,13 +63,13 @@ FxAccountsProfileClient.prototype = { /** * Remote request helper which abstracts authentication away. * - * @param {String} path + * @param {string} path * Profile server path, i.e "/profile". - * @param {String} [method] + * @param {string} [method] * Type of request, e.g. "GET". - * @param {String} [etag] + * @param {string} [etag] * Optional ETag used for caching purposes. - * @param {Object} [body] + * @param {object} [body] * Optional request body, to be sent as application/json. * @return Promise * Resolves: {body: Object, etag: Object} Successful response from the Profile server. @@ -113,7 +113,7 @@ FxAccountsProfileClient.prototype = { * * OAuth tokens are cached, so it's fine to call this for each request. * - * @param {String} [method] + * @param {string} [method] * Type of request, i.e "GET". * @return Promise * Resolves: Object containing "scope", "token" and "key" properties @@ -131,13 +131,13 @@ FxAccountsProfileClient.prototype = { /** * Remote "raw" request helper - doesn't handle auth errors and tokens. * - * @param {String} path + * @param {string} path * Profile server path, i.e "/profile". - * @param {String} method + * @param {string} method * Type of request, i.e "GET". - * @param {String} token - * @param {String} etag - * @param {Object} payload + * @param {string} token + * @param {string} etag + * @param {object} payload * The payload of the request, if any. * @return Promise * Resolves: {body: Object, etag: Object} Successful response from the Profile server @@ -207,7 +207,7 @@ FxAccountsProfileClient.prototype = { /** * Retrieve user's profile from the server * - * @param {String} [etag] + * @param {string} [etag] * Optional ETag used for caching purposes. (may generate a 304 exception) * @return Promise * Resolves: {body: Object, etag: Object} Successful response from the '/profile' endpoint. @@ -222,15 +222,15 @@ FxAccountsProfileClient.prototype = { /** * Normalized profile client errors * - * @param {Object} [details] + * @param {object} [details] * Error details object * @param {number} [details.code] * Error code * @param {number} [details.errno] * Error number - * @param {String} [details.error] + * @param {string} [details.error] * Error description - * @param {String|null} [details.message] + * @param {string | null} [details.message] * Error message * @constructor */ @@ -263,7 +263,7 @@ FxAccountsProfileClientError.prototype._toStringFields = function () { /** * String representation of a profile client error * - * @returns {String} + * @returns {string} */ FxAccountsProfileClientError.prototype.toString = function () { return this.name + "(" + JSON.stringify(this._toStringFields()) + ")"; diff --git a/services/fxaccounts/FxAccountsWebChannel.sys.mjs b/services/fxaccounts/FxAccountsWebChannel.sys.mjs @@ -144,13 +144,13 @@ function getErrorDetails(error) { /** * Create a new FxAccountsWebChannel to listen for account updates * - * @param {Object} options Options - * @param {Object} options - * @param {String} options.content_uri + * @param {object} options Options + * @param {object} options + * @param {string} options.content_uri * The FxA Content server uri - * @param {String} options.channel_id + * @param {string} options.channel_id * The ID of the WebChannel - * @param {String} options.helpers + * @param {string} options.helpers * Helpers functions. Should only be passed in for testing. * @constructor */ @@ -672,7 +672,7 @@ FxAccountsWebChannelHelpers.prototype = { /** * Logins in to sync by completing an OAuth flow * - * @param { Object } oauthData: The oauth code and state as returned by the server + * @param {object} oauthData: The oauth code and state as returned by the server */ async oauthLogin(oauthData) { log.debug("Webchannel is completing the oauth flow"); @@ -906,8 +906,8 @@ FxAccountsWebChannelHelpers.prototype = { /** * Open Sync Preferences in the current tab of the browser * - * @param {Object} browser the browser in which to open preferences - * @param {String} [entryPoint] entryPoint to use for logging + * @param {object} browser the browser in which to open preferences + * @param {string} [entryPoint] entryPoint to use for logging */ openSyncPreferences(browser, entryPoint) { let uri = "about:preferences"; @@ -924,7 +924,7 @@ FxAccountsWebChannelHelpers.prototype = { /** * Open Firefox View in the browser's window * - * @param {Object} browser the browser in whose window we'll open Firefox View + * @param {object} browser the browser in whose window we'll open Firefox View */ openFirefoxView(browser) { browser.ownerGlobal.FirefoxViewHandler.openTab("syncedtabs"); diff --git a/services/fxaccounts/tests/xpcshell/test_profile_client.js b/services/fxaccounts/tests/xpcshell/test_profile_client.js @@ -25,7 +25,7 @@ const STATUS_SUCCESS = 200; /** * Mock request responder * - * @param {String} response + * @param {string} response * Mocked raw response from the server * @returns {Function} */ @@ -404,9 +404,9 @@ add_test(function errorTests() { /** * Quick way to test the "FxAccountsProfileClient" constructor. * - * @param {Object} options + * @param {object} options * FxAccountsProfileClient constructor options - * @param {String} expected + * @param {string} expected * Expected error message * @returns {*} */ diff --git a/services/settings/Attachments.sys.mjs b/services/settings/Attachments.sys.mjs @@ -94,7 +94,7 @@ class LazyRecordAndBuffer { * Generate the return value for the "download" method. * * @throws {*} if the record or attachment content is unavailable. - * @returns {Object} An object with two properties: + * @returns {object} An object with two properties: * buffer: ArrayBuffer with the file content. * record: Record associated with the bytes. */ @@ -131,7 +131,7 @@ export class Downloader { } /** - * @returns {Object} An object with async "get", "set" and "delete" methods. + * @returns {object} An object with async "get", "set" and "delete" methods. * The keys are strings, the values may be any object that * can be stored in IndexedDB (including Blob). */ @@ -144,27 +144,27 @@ export class Downloader { * If the requested record cannot be downloaded and fallbacks are enabled, the * returned attachment may have a different record than the input record. * - * @param {Object} record A Remote Settings entry with attachment. + * @param {object} record A Remote Settings entry with attachment. * If omitted, the attachmentId option must be set. - * @param {Object} options Some download options. - * @param {Number} [options.retries] Number of times download should be retried (default: `3`) - * @param {Boolean} [options.checkHash] Check content integrity (default: `true`) + * @param {object} options Some download options. + * @param {number} [options.retries] Number of times download should be retried (default: `3`) + * @param {boolean} [options.checkHash] Check content integrity (default: `true`) * @param {string} [options.attachmentId] The attachment identifier to use for * caching and accessing the attachment. * (default: `record.id`) - * @param {Boolean} [options.cacheResult] if the client should cache a copy of the attachment. + * @param {boolean} [options.cacheResult] if the client should cache a copy of the attachment. * (default: `true`) - * @param {Boolean} [options.fallbackToCache] Return the cached attachment when the + * @param {boolean} [options.fallbackToCache] Return the cached attachment when the * input record cannot be fetched. * (default: `false`) - * @param {Boolean} [options.fallbackToDump] Use the remote settings dump as a + * @param {boolean} [options.fallbackToDump] Use the remote settings dump as a * potential source of the attachment. * (default: `false`) * @throws {Downloader.DownloadError} if the file could not be fetched. * @throws {Downloader.BadContentError} if the downloaded content integrity is not valid. * @throws {Downloader.ServerInfoError} if the server response is not valid. * @throws {NetworkError} if fetching the server infos and fetching the attachment fails. - * @returns {Object} An object with two properties: + * @returns {object} An object with two properties: * `buffer` `ArrayBuffer`: the file content. * `record` `Object`: record associated with the attachment. * `_source` `String`: identifies the source of the result. Used for testing. @@ -177,8 +177,8 @@ export class Downloader { * Downloads an attachment bundle for a given collection, if one exists. Fills in the cache * for all attachments provided by the bundle. * - * @param {Boolean} force Set to true to force a sync even when local data exists - * @returns {Boolean} True if all attachments were processed successfully, false if failed, null if skipped. + * @param {boolean} force Set to true to force a sync even when local data exists + * @returns {boolean} True if all attachments were processed successfully, false if failed, null if skipped. */ async cacheAll(force = false) { // If we're offline, don't try @@ -300,11 +300,11 @@ export class Downloader { * returned attachment may have a different record, e.g. packaged in binary * resources or one that is outdated. * - * @param {Object} record A Remote Settings entry with attachment. + * @param {object} record A Remote Settings entry with attachment. * If omitted, the attachmentId option must be set. - * @param {Object} options Some download options. - * @param {Number} [options.retries] Number of times download should be retried (default: `3`) - * @param {Boolean} [options.checkHash] Check content integrity (default: `true`) + * @param {object} options Some download options. + * @param {number} [options.retries] Number of times download should be retried (default: `3`) + * @param {boolean} [options.checkHash] Check content integrity (default: `true`) * @param {string} [options.attachmentId] The attachment identifier to use for * caching and accessing the attachment. * (default: `record.id`) @@ -312,7 +312,7 @@ export class Downloader { * @throws {Downloader.BadContentError} if the downloaded content integrity is not valid. * @throws {Downloader.ServerInfoError} if the server response is not valid. * @throws {NetworkError} if fetching the server infos and fetching the attachment fails. - * @returns {Object} An object with two properties: + * @returns {object} An object with two properties: * `buffer` `ArrayBuffer`: the file content. * `record` `Object`: record associated with the attachment. * `_source` `String`: identifies the source of the result. Used for testing. @@ -480,7 +480,7 @@ export class Downloader { * No-op if the attachment does not exist. * * @param record A Remote Settings entry with attachment. - * @param {Object} [options] Some options. + * @param {object} [options] Some options. * @param {string} [options.attachmentId] The attachment identifier to use for * accessing and deleting the attachment. * (default: `record.id`) @@ -500,7 +500,7 @@ export class Downloader { /** * Clear the cache from obsolete downloaded attachments. * - * @param {Array<String>} excludeIds List of attachments IDs to exclude from pruning. + * @param {Array<string>} excludeIds List of attachments IDs to exclude from pruning. */ async prune(excludeIds) { return this.cacheImpl.prune(excludeIds); @@ -508,10 +508,10 @@ export class Downloader { /** * Download the record attachment and return its content as bytes. * - * @param {Object} record A Remote Settings entry with attachment. - * @param {Object} options Some download options. - * @param {Number} options.retries Number of times download should be retried (default: `3`) - * @param {Boolean} options.checkHash Check content integrity (default: `true`) + * @param {object} record A Remote Settings entry with attachment. + * @param {object} options Some download options. + * @param {number} options.retries Number of times download should be retried (default: `3`) + * @param {boolean} options.checkHash Check content integrity (default: `true`) * @throws {Downloader.DownloadError} if the file could not be fetched. * @throws {Downloader.BadContentError} if the downloaded content integrity is not valid. * @returns {ArrayBuffer} the file content. diff --git a/services/settings/Database.sys.mjs b/services/settings/Database.sys.mjs @@ -329,7 +329,7 @@ export class Database { * Since we run the pruning logic after syncing, any attachment without a * matching record can be discarded as they will be unreachable forever. * - * @param {Array<String>} excludeIds List of attachments IDs to exclude from pruning. + * @param {Array<string>} excludeIds List of attachments IDs to exclude from pruning. */ async pruneAttachments(excludeIds) { const _cid = this.identifier; @@ -496,11 +496,11 @@ const gPendingWriteOperations = new Set(); * Helper to wrap some IDBObjectStore operations into a promise. * * @param {IDBDatabase} db - * @param {String|String[]} storeNames - either a string or an array of strings. + * @param {string | string[]} storeNames - either a string or an array of strings. * @param {function} callback - * @param {Object} options - * @param {String} options.mode - * @param {String} options.desc for shutdown tracking. + * @param {object} options + * @param {string} options.mode + * @param {string} options.desc for shutdown tracking. */ async function executeIDB(storeNames, callback, options = {}) { if (!gDB) { diff --git a/services/settings/IDBHelpers.sys.mjs b/services/settings/IDBHelpers.sys.mjs @@ -77,10 +77,10 @@ function bulkOperationHelper( * Helper to wrap some IDBObjectStore operations into a promise. * * @param {IDBDatabase} db - * @param {String|String[]} storeNames - either a string or an array of strings. - * @param {String} mode + * @param {string | string[]} storeNames - either a string or an array of strings. + * @param {string} mode * @param {function} callback - * @param {String} description of the operation for error handling purposes. + * @param {string} description of the operation for error handling purposes. */ function executeIDB(db, storeNames, mode, callback, desc) { if (!Array.isArray(storeNames)) { diff --git a/services/settings/RemoteSettings.worker.mjs b/services/settings/RemoteSettings.worker.mjs @@ -25,9 +25,9 @@ const Agent = { * Return the canonical JSON serialization of the specified records. * It has to match what is done on the server (See Kinto/kinto-signer). * - * @param {Array<Object>} records - * @param {String} timestamp - * @returns {String} + * @param {Array<object>} records + * @param {string} timestamp + * @returns {string} */ async canonicalStringify(records, timestamp) { // Sort list by record id. @@ -60,8 +60,8 @@ const Agent = { * for the specified bucket and collection. * (eg. blocklists/certificates, main/onboarding) * - * @param {String} bucket - * @param {String} collection + * @param {string} bucket + * @param {string} collection * @returns {int} Number of records loaded from dump or -1 if no dump found. */ async importJSONDump(bucket, collection) { @@ -83,9 +83,9 @@ const Agent = { /** * Check that the specified file matches the expected size and SHA-256 hash. * - * @param {String} fileUrl file URL to read from - * @param {Number} size expected file size - * @param {String} size expected file SHA-256 as hex string + * @param {string} fileUrl file URL to read from + * @param {number} size expected file size + * @param {string} size expected file SHA-256 as hex string * @returns {boolean} */ async checkFileHash(fileUrl, size, hash) { @@ -144,10 +144,10 @@ let gPendingTransactions = new Set(); * * Note: This duplicates some logics from `kinto-offline-client.sys.mjs`. * - * @param {String} bucket - * @param {String} collection - * @param {Array<Object>} records - * @param {Number} timestamp + * @param {string} bucket + * @param {string} collection + * @param {Array<object>} records + * @param {number} timestamp */ async function importDumpIDB(bucket, collection, records, timestamp) { // Open the DB. It will exist since if we are running this, it means diff --git a/services/settings/RemoteSettingsClient.sys.mjs b/services/settings/RemoteSettingsClient.sys.mjs @@ -47,7 +47,7 @@ class EventEmitter { * sequentially. * * @param {string} event the event name - * @param {Object} payload the event payload to call the listeners with + * @param {object} payload the event payload to call the listeners with */ async emit(event, payload) { const callbacks = this._listeners.get(event); @@ -418,11 +418,11 @@ export class RemoteSettingsClient extends EventEmitter { /** * Lists settings. * - * @param {Object} [options] + * @param {object} [options] * The options object. - * @param {Object} [options.filters] + * @param {object} [options.filters] * Filter the results (default: `{}`). - * @param {String} [options.order] + * @param {string} [options.order] * The order to apply (eg. `"-last_modified"`). * @param {boolean} [options.dumpFallback] * Fallback to dump data if read of local DB fails (default: `true`). @@ -645,7 +645,7 @@ export class RemoteSettingsClient extends EventEmitter { /** * Synchronize the local database with the remote server. * - * @param {Object} options See #maybeSync() options. + * @param {object} options See #maybeSync() options. */ async sync(options) { if (lazy.Utils.shouldSkipRemoteActivityDueToTests) { @@ -1064,7 +1064,7 @@ export class RemoteSettingsClient extends EventEmitter { * The list of records to validate. * @param {number} timestamp * The timestamp associated with the list of remote records. - * @param {Object} metadata + * @param {object} metadata * The collection metadata, that contains the signature payload. */ async validateCollectionSignature(records, timestamp, metadata) { @@ -1354,9 +1354,9 @@ export class RemoteSettingsClient extends EventEmitter { * If the filtered lists of changes are all empty, we return null (and thus don't * bother listing local DB). * - * @param {Object} syncResult Synchronization result without filtering. + * @param {object} syncResult Synchronization result without filtering. * - * @returns {Promise<Object>} the filtered list of local records, plus the filtered + * @returns {Promise<object>} the filtered list of local records, plus the filtered * list of created, updated and deleted records. */ async _filterSyncResult(syncResult) { @@ -1416,7 +1416,7 @@ export class RemoteSettingsClient extends EventEmitter { * Remove the fields from the specified record * that are not present on server. * - * @param {Object} record + * @param {object} record */ _cleanLocalFields(record) { const keys = ["_status"].concat(this.localFields); diff --git a/services/settings/SharedUtils.sys.mjs b/services/settings/SharedUtils.sys.mjs @@ -11,8 +11,8 @@ export var SharedUtils = { * Check that the specified content matches the expected size and SHA-256 hash. * * @param {ArrayBuffer} buffer binary content - * @param {Number} size expected file size - * @param {String} size expected file SHA-256 as hex string + * @param {number} size expected file size + * @param {string} size expected file SHA-256 as hex string * @returns {boolean} */ async checkContentHash(buffer, size, hash) { @@ -32,8 +32,8 @@ export var SharedUtils = { /** * Load (from disk) the JSON file distributed with the release for this collection. * - * @param {String} bucket - * @param {String} collection + * @param {string} bucket + * @param {string} collection */ async loadJSONDump(bucket, collection) { // When using the preview bucket, we still want to load the main dump. diff --git a/services/settings/SyncHistory.sys.mjs b/services/settings/SyncHistory.sys.mjs @@ -20,8 +20,8 @@ export class SyncHistory { #store; /** - * @param {String} source the synchronization source (eg. `"settings-sync"`) - * @param {Object} options + * @param {string} source the synchronization source (eg. `"settings-sync"`) + * @param {object} options * @param {int} options.size Maximum number of entries per source. */ constructor(source, { size } = { size: 100 }) { @@ -35,9 +35,9 @@ export class SyncHistory { * The entries with the oldest timestamps will be deleted to maintain the * history size under the configured maximum. * - * @param {String} etag the ETag value from the server (eg. `"1647961052593"`) - * @param {String} status the synchronization status (eg. `"success"`) - * @param {Object} infos optional additional information to keep track of + * @param {string} etag the ETag value from the server (eg. `"1647961052593"`) + * @param {string} status the synchronization status (eg. `"success"`) + * @param {object} infos optional additional information to keep track of */ async store(etag, status, infos = {}) { const rkv = await this.#init(); @@ -60,7 +60,7 @@ export class SyncHistory { * Retrieve the stored history entries for a certain source, sorted by * timestamp descending. * - * @returns {Array<Object>} a list of objects + * @returns {Array<object>} a list of objects */ async list() { const rkv = await this.#init(); @@ -106,7 +106,7 @@ export class SyncHistory { /** * Initialize the rkv store in the user profile. * - * @returns {Object} the underlying `KeyValueService` instance. + * @returns {object} the underlying `KeyValueService` instance. */ async #init() { if (!this.#store) { diff --git a/services/settings/Utils.sys.mjs b/services/settings/Utils.sys.mjs @@ -331,8 +331,8 @@ export var Utils = { /** * Check if we ship a JSON dump for the specified bucket and collection. * - * @param {String} bucket - * @param {String} collection + * @param {string} bucket + * @param {string} collection * @return {bool} Whether it is present or not. */ async hasLocalDump(bucket, collection) { @@ -352,8 +352,8 @@ export var Utils = { /** * Look up the last modification time of the JSON dump. * - * @param {String} bucket - * @param {String} collection + * @param {string} bucket + * @param {string} collection * @return {int} The last modification time of the dump. -1 if non-existent. */ async getLocalDumpLastModified(bucket, collection) { @@ -406,13 +406,13 @@ export var Utils = { * } * ``` * - * @param {String} serverUrl The server URL (eg. `https://server.org/v1`) + * @param {string} serverUrl The server URL (eg. `https://server.org/v1`) * @param {int} expectedTimestamp The timestamp that the server is supposed to return. * We obtained it from the Megaphone notification payload, * and we use it only for cache busting (Bug 1497159). - * @param {String} lastEtag (optional) The Etag of the latest poll to be matched + * @param {string} lastEtag (optional) The Etag of the latest poll to be matched * by the server (eg. `"123456789"`). - * @param {Object} filters + * @param {object} filters */ async fetchLatestChanges(serverUrl, options = {}) { const { expectedTimestamp, lastEtag = "", filters = {} } = options; @@ -500,9 +500,9 @@ export var Utils = { /** * Test if a single object matches all given filters. * - * @param {Object} filters The filters object. - * @param {Object} entry The object to filter. - * @return {Boolean} + * @param {object} filters The filters object. + * @param {object} entry The object to filter. + * @return {boolean} */ filterObject(filters, entry) { return Object.entries(filters).every(([filter, value]) => { @@ -521,7 +521,7 @@ export var Utils = { /** * Sorts records in a list according to a given ordering. * - * @param {String} order The ordering, eg. `-last_modified`. + * @param {string} order The ordering, eg. `-last_modified`. * @param {Array} list The collection to order. * @return {Array} */ @@ -553,7 +553,7 @@ export var Utils = { * @async * @function fetchChangesetsBundle * @memberof Utils - * @returns {Promise<Array<Object>>} A promise that resolves to an array of parsed changesets. + * @returns {Promise<Array<object>>} A promise that resolves to an array of parsed changesets. * * @throws {Error} Throws an error if there is an issue fetching the server info or the changeset bundle, * or if there is an error during the extraction and parsing of the changesets. diff --git a/services/settings/remote-settings.sys.mjs b/services/settings/remote-settings.sys.mjs @@ -106,8 +106,8 @@ class JexlFilter { * Default entry filtering function, in charge of excluding remote settings entries * where the JEXL expression evaluates into a falsy value. * - * @param {Object} entry The Remote Settings entry to be excluded or kept. - * @returns {?Object} the entry or null if excluded. + * @param {object} entry The Remote Settings entry to be excluded or kept. + * @returns {?object} the entry or null if excluded. */ async filterEntry(entry) { const { filter_expression } = entry; @@ -160,8 +160,8 @@ function remoteSettingsFunction() { /** * RemoteSettings constructor. * - * @param {String} collectionName The remote settings identifier - * @param {Object} options Advanced options + * @param {string} collectionName The remote settings identifier + * @param {object} options Advanced options * @returns {RemoteSettingsClient} An instance of a Remote Settings client. */ const remoteSettings = function (collectionName, options) { @@ -341,7 +341,7 @@ function remoteSettingsFunction() { /** * Main polling method, called by the ping mechanism. * - * @param {Object} options + * @param {object} options . * @param {Object} options.expectedTimestamp (optional) The expected timestamp to be received — used by servers for cache busting. * @param {string} options.trigger (optional) label to identify what triggered this sync (eg. ``"timer"``, default: `"manual"`) * @param {bool} options.full (optional) Ignore last polling status and fetch all changes (default: `false`) @@ -651,7 +651,7 @@ function remoteSettingsFunction() { * Returns an object with polling status information and the list of * known remote settings collections. * - * @param {Object} options + * @param {object} options * @param {boolean?} options.localOnly (optional) If set to `true`, do not contact the server. */ remoteSettings.inspect = async (options = {}) => { diff --git a/services/sync/modules/UIState.sys.mjs b/services/sync/modules/UIState.sys.mjs @@ -3,7 +3,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /** - * @typedef {Object} UIState + * @typedef {object} UIState * @property {string} status The Sync/FxA status, see STATUS_* constants. * @property {string} [email] The FxA email configured to log-in with Sync. * @property {string} [displayName] The user's FxA display name. diff --git a/services/sync/modules/bridged_engine.sys.mjs b/services/sync/modules/bridged_engine.sys.mjs @@ -75,8 +75,8 @@ class BridgedRecord extends RawCryptoWrapper { /** * Creates an outgoing record from a BSO returned by a bridged engine. * - * @param {String} collection The collection name. - * @param {Object} bso The outgoing bso (ie, a sync15::bso::OutgoingBso) returned from + * @param {string} collection The collection name. + * @param {object} bso The outgoing bso (ie, a sync15::bso::OutgoingBso) returned from * `mozIBridgedSyncEngine::apply`. * @return {BridgedRecord} A Sync record ready to encrypt and upload. */ @@ -112,7 +112,7 @@ class BridgedRecord extends RawCryptoWrapper { * Converts this incoming record into an envelope to pass to a bridged engine. * This object must be kept in sync with `sync15::IncomingBso`. * - * @return {Object} The incoming envelope, to pass to + * @return {object} The incoming envelope, to pass to * `mozIBridgedSyncEngine::storeIncoming`. */ toIncomingBso() { @@ -205,7 +205,7 @@ BridgedEngine.prototype = { * Sync code always calls `resetSyncID()` and `ensureCurrentSyncID()`, * not this. * - * @returns {String?} The sync ID, or `null` if one isn't set. + * @returns {string?} The sync ID, or `null` if one isn't set. */ async getSyncID() { // Note that all methods on an XPCOM class instance are automatically bound, diff --git a/services/sync/modules/engines.sys.mjs b/services/sync/modules/engines.sys.mjs @@ -169,7 +169,7 @@ Tracker.prototype = { * Starts or stops listening for changes depending on the associated engine's * enabled state. * - * @param {Boolean} engineEnabled Whether the engine was enabled. + * @param {boolean} engineEnabled Whether the engine was enabled. */ async onEngineEnabledChanged(engineEnabled) { if (engineEnabled == this._isTracking) { diff --git a/services/sync/modules/record.sys.mjs b/services/sync/modules/record.sys.mjs @@ -27,8 +27,8 @@ import { CryptoUtils } from "moz-src:///services/crypto/modules/utils.sys.mjs"; * class retains the old name. * * @class - * @param {String} collection The collection name for this BSO. - * @param {String} id The ID of this BSO. + * @param {string} collection The collection name for this BSO. + * @param {string} id The ID of this BSO. */ export function WBORecord(collection, id) { this.data = {}; @@ -153,8 +153,8 @@ Utils.deferGetSet(WBORecord, "data", [ * * @class * @template Cleartext - * @param {String} collection The collection name for this BSO. - * @param {String} id The ID of this BSO. + * @param {string} collection The collection name for this BSO. + * @param {string} id The ID of this BSO. */ export function RawCryptoWrapper(collection, id) { // Setting properties before calling the superclass constructor isn't allowed @@ -187,7 +187,7 @@ RawCryptoWrapper.prototype = { * in a BSO payload. This is called before uploading the record to the server. * * @param {Cleartext} outgoingCleartext The cleartext to upload. - * @returns {String} The serialized cleartext. + * @returns {string} The serialized cleartext. */ transformBeforeEncrypt() { throw new TypeError("Override to stringify outgoing records"); @@ -198,7 +198,7 @@ RawCryptoWrapper.prototype = { * `Cleartext` type. This is called when fetching the record from the * server. * - * @param {String} incomingCleartext The decrypted cleartext string. + * @param {string} incomingCleartext The decrypted cleartext string. * @returns {Cleartext} The parsed cleartext. */ transformAfterDecrypt() { @@ -280,8 +280,8 @@ Utils.deferGetSet(RawCryptoWrapper, "payload", ["ciphertext", "IV", "hmac"]); * should subclass this class to describe their own record types. * * @class - * @param {String} collection The collection name for this BSO. - * @param {String} id The ID of this BSO. + * @param {string} collection The collection name for this BSO. + * @param {string} id The ID of this BSO. */ export function CryptoWrapper(collection, id) { RawCryptoWrapper.call(this, collection, id); diff --git a/services/sync/modules/service.sys.mjs b/services/sync/modules/service.sys.mjs @@ -1332,9 +1332,9 @@ Sync11Service.prototype = { * Perform a full sync (or of the given engines). While a sync is in progress, * this call is ignored; to guarantee a follow-up you must call queueSync(). * - * @param {Object} options - * @param {Array<String>} [options.engines] — names of engines to sync - * @param {String} [options.why] — reason for the sync + * @param {object} options + * @param {Array<string>} [options.engines] — names of engines to sync + * @param {string} [options.why] — reason for the sync * @returns {Promise<void>} */ async sync({ engines, why } = {}) { @@ -1387,7 +1387,7 @@ Sync11Service.prototype = { /** * Kick off a sync after the current one finishes, or immediately if idle. * - * @param {String} why — reason for calling the sync + * @param {string} why — reason for calling the sync */ queueSync(why) { if (this._locked) { @@ -1466,7 +1466,7 @@ Sync11Service.prototype = { * Upload crypto/keys * * @param {WBORecord} cryptoKeys crypto/keys record - * @param {Number} lastModified known last modified timestamp (in decimal seconds), + * @param {number} lastModified known last modified timestamp (in decimal seconds), * will be used to set the X-If-Unmodified-Since header */ async _uploadCryptoKeys(cryptoKeys, lastModified) { diff --git a/services/sync/tps/extensions/tps/resource/tps.sys.mjs b/services/sync/tps/extensions/tps/resource/tps.sys.mjs @@ -1357,7 +1357,7 @@ export var TPS = { /** * Triggers a sync operation * - * @param {String} [wipeAction] + * @param {string} [wipeAction] * Type of wipe to perform (resetClient, wipeClient, wipeRemote) */ async Sync(wipeAction) { diff --git a/storage/test/unit/VacuumParticipant.sys.mjs b/storage/test/unit/VacuumParticipant.sys.mjs @@ -23,7 +23,7 @@ export class VacuumParticipant { * * @param {mozIStorageAsyncConnection} databaseConnection * The connection to be vacuumed. - * @param {Number} [expectedPageSize] + * @param {number} [expectedPageSize] * Used to change the database page size. * @param {boolean} [useIncrementalVacuum] * Whether to enable incremental vacuum on the database. diff --git a/testing/mochitest/BrowserTestUtils/BrowserTestUtils.sys.mjs b/testing/mochitest/BrowserTestUtils/BrowserTestUtils.sys.mjs @@ -90,7 +90,7 @@ export var BrowserTestUtils = { /** * Loads a page in a new tab, executes a Task and closes the tab. * - * @param {Object|String} options + * @param {object | string} options * If this is a string it is the url to open and will be opened in the * currently active browser window. * @param {tabbrowser} [options.gBrowser @@ -415,7 +415,7 @@ export var BrowserTestUtils = { * @param {xul:browser} browser * A xul:browser. * @param {object} options - * @param {Boolean} [options.includeSubFrames = false] + * @param {boolean} [options.includeSubFrames = false] * A boolean indicating if loads from subframes should be included. * @param {string|function} [options.wantLoad] * If a function, takes a URL and returns true if that's the load we're @@ -562,7 +562,7 @@ export var BrowserTestUtils = { * @param {xul:window} window * A newly opened window for which we're waiting for the * first browser load. - * @param {Boolean} aboutBlank [optional] + * @param {boolean} aboutBlank [optional] * If false, about:blank loads are ignored and we continue * to wait. * @param {function|null} checkFn [optional] @@ -601,7 +601,7 @@ export var BrowserTestUtils = { * * @param {xul:browser} browser * A xul:browser. - * @param {String} expectedURI (optional) + * @param {string} expectedURI (optional) * A specific URL to check the channel load against * @param {Function} checkFn * If checkFn(aStateFlags, aStatus) returns false, the state change @@ -661,9 +661,9 @@ export var BrowserTestUtils = { * * @param {xul:browser} browser * A xul:browser. - * @param {String} expectedURI (optional) + * @param {string} expectedURI (optional) * A specific URL to check the channel load against - * @param {Boolean} checkAborts (optional, defaults to false) + * @param {boolean} checkAborts (optional, defaults to false) * Whether NS_BINDING_ABORTED stops 'count' as 'real' stops * (e.g. caused by the stop button or equivalent APIs) * @@ -696,7 +696,7 @@ export var BrowserTestUtils = { * * @param {xul:browser} browser * A xul:browser. - * @param {String} expectedURI (optional) + * @param {string} expectedURI (optional) * A specific URL to check the channel load against * * @return {Promise} @@ -848,7 +848,7 @@ export var BrowserTestUtils = { /** * Waits for the next browser window to open and be fully loaded. * - * @param {Object} aParams + * @param {object} aParams * @param {string} [aParams.url] * The url to await being loaded. If unset this may or may not wait for * any page to be loaded, according to the waitForAnyURLLoaded param. @@ -1064,7 +1064,7 @@ export var BrowserTestUtils = { * This relies on OpenBrowserWindow in browser.js, and waits for the window * to be completely loaded before resolving. * - * @param {Object} [options] + * @param {object} [options] * Options to pass to OpenBrowserWindow. Additionally, supports: * @param {bool} [options.waitForTabURL] * Forces the initial browserLoaded check to wait for the tab to @@ -1634,7 +1634,7 @@ export var BrowserTestUtils = { * Intended as an easy-to-use alternative to waitForCondition. * * @param {Element} target The target in which to observe mutations. - * @param {Object} options The options to pass to MutationObserver.observe(); + * @param {object} options The options to pass to MutationObserver.observe(); * @param {function} checkFn Function that returns true when it wants the promise to be * resolved. */ @@ -1763,7 +1763,7 @@ export var BrowserTestUtils = { * x offset from target's left bounding edge * @param {integer} offsetY * y offset from target's top bounding edge - * @param {Object} event object + * @param {object} event object * Additional arguments, similar to the EventUtils.sys.mjs version * @param {BrowserContext|MozFrameLoaderOwner} browsingContext * Browsing context or browser element, must not be null @@ -1818,7 +1818,7 @@ export var BrowserTestUtils = { * x offset from target's left bounding edge * @param {integer} offsetY * y offset from target's top bounding edge - * @param {Object} event object + * @param {object} event object * Additional arguments, similar to the EventUtils.sys.mjs version * @param {BrowserContext|MozFrameLoaderOwner} browsingContext * Browsing context or browser element, must not be null @@ -1850,7 +1850,7 @@ export var BrowserTestUtils = { * * @param {nsIMessageManager} messageManager * The message manager that should be used. - * @param {String} message + * @param {string} message * The message we're waiting for. * @param {Function} checkFn (optional) * Optional function to invoke to check the message. @@ -1926,12 +1926,12 @@ export var BrowserTestUtils = { * * @param {tab} tab * The tab that will be reloaded. - * @param {Object} [options] + * @param {object} [options] * Options for the reload. - * @param {Boolean} options.includeSubFrames = false [optional] + * @param {boolean} options.includeSubFrames = false [optional] * A boolean indicating if loads from subframes should be included * when waiting for the frame to reload. - * @param {Boolean} options.bypassCache = false [optional] + * @param {boolean} options.bypassCache = false [optional] * A boolean indicating if loads should bypass the cache. * If bypassCache is true, this skips some steps that normally happen * when a user reloads a tab. @@ -2258,11 +2258,11 @@ export var BrowserTestUtils = { * Returns a promise that is resolved when element gains attribute (or, * optionally, when it is set to value). * - * @param {String} attr + * @param {string} attr * The attribute to wait for * @param {Element} element * The element which should gain the attribute - * @param {String} value (optional) + * @param {string} value (optional) * Optional, the value the attribute should have. * * @returns {Promise} @@ -2287,7 +2287,7 @@ export var BrowserTestUtils = { /** * Returns a promise that is resolved when element loses an attribute. * - * @param {String} attr + * @param {string} attr * The attribute to wait for * @param {Element} element * The element which should lose the attribute @@ -2319,7 +2319,7 @@ export var BrowserTestUtils = { * event was fired. Instead of a Window, a Browser or Browsing Context * is required to be passed to this function. * - * @param {String} char + * @param {string} char * A character for the keypress event that is sent to the browser. * @param {BrowserContext|MozFrameLoaderOwner} browsingContext * Browsing context or browser element, must not be null @@ -2338,9 +2338,9 @@ export var BrowserTestUtils = { * event was fired. Instead of a Window, a Browser or Browsing Context * is required to be passed to this function. * - * @param {String} key + * @param {string} key * See the documentation available for EventUtils#synthesizeKey. - * @param {Object} event + * @param {object} event * See the documentation available for EventUtils#synthesizeKey. * @param {BrowserContext|MozFrameLoaderOwner} browsingContext * Browsing context or browser element, must not be null @@ -2361,7 +2361,7 @@ export var BrowserTestUtils = { * resolve when the event was fired. Instead of a Window, a Browser or * Browsing Context is required to be passed to this function. * - * @param {Object} event + * @param {object} event * See the documentation available for EventUtils#synthesizeComposition. * @param {BrowserContext|MozFrameLoaderOwner} browsingContext * Browsing context or browser element, must not be null @@ -2382,7 +2382,7 @@ export var BrowserTestUtils = { * Promise that will resolve when the event was fired. Instead of a Window, a * Browser or Browsing Context object is required to be passed to this function. * - * @param {Object} event + * @param {object} event * See the documentation available for EventUtils#synthesizeCompositionChange. * @param {BrowserContext|MozFrameLoaderOwner} browsingContext * Browsing context or browser element, must not be null @@ -2409,7 +2409,7 @@ export var BrowserTestUtils = { * gBrowser. * @param {xul:browser} browser * The browser that should be showing the notification. - * @param {String} notificationValue + * @param {string} notificationValue * The "value" of the notification, which is often used as * a unique identifier. Example: "plugin-crashed". * @@ -2431,7 +2431,7 @@ export var BrowserTestUtils = { * @param {Window} win * The browser window in whose global notificationbox the * notification is expected to appear. - * @param {String} notificationValue + * @param {string} notificationValue * The "value" of the notification, which is often used as * a unique identifier. Example: "captive-portal-detected". * @@ -2471,7 +2471,7 @@ export var BrowserTestUtils = { * * @param {Element} element * The element that will transition. - * @param {Number} timeout + * @param {number} timeout * The maximum time to wait in milliseconds. Defaults to 5 seconds. * @return {Promise} * Resolves when transitions complete or rejects if the timeout is hit. @@ -2521,11 +2521,11 @@ export var BrowserTestUtils = { * The test framework doesn't keep its cleanup stuff anywhere accessible, * so the first argument is a reference to your cleanup registration * function, allowing us to clean up after you if necessary. - * @param {String} aboutModule + * @param {string} aboutModule * The name of the about page. - * @param {String} pageURI + * @param {string} pageURI * The URI the about: page should point to. - * @param {Number} flags + * @param {number} flags * The nsIAboutModule flags to use for registration. * * @returns {Promise} @@ -2778,7 +2778,7 @@ export var BrowserTestUtils = { * * @param {BrowsingContext} aBrowsingContext * The browsing context associated with the content process to listen to. - * @param {String[]} aTopics array of observer topics + * @param {string[]} aTopics array of observer topics * @returns {Promise} resolves when the listeners have been added. */ startObservingTopics(aBrowsingContext, aTopics) { @@ -2796,7 +2796,7 @@ export var BrowserTestUtils = { * * @param {BrowsingContext} aBrowsingContext * The browsing context associated with the content process to listen to. - * @param {String[]} aTopics array of observer topics. If empty, then all + * @param {string[]} aTopics array of observer topics. If empty, then all * current topics being listened to are removed. * @returns {Promise} promise that fails if an unexpected observer occurs. */ diff --git a/testing/mochitest/tests/SimpleTest/AccessibilityUtils.js b/testing/mochitest/tests/SimpleTest/AccessibilityUtils.js @@ -134,7 +134,7 @@ this.AccessibilityUtils = (function () { * @param {nsIAccessible} accessible * Accessible for which to determine its role attribute value. * - * @returns {String} + * @returns {string} * Role attribute value if specified. */ function getAriaRoles(accessible) { @@ -733,7 +733,7 @@ this.AccessibilityUtils = (function () { * @param {nsIAccessible} accessible * Accessible for which to determine if it is keyboard focusable. * - * @returns {Boolean} + * @returns {boolean} * True if focusable with the keyboard. */ function isKeyboardFocusable(accessible) { @@ -790,7 +790,7 @@ this.AccessibilityUtils = (function () { * accessibility failure that prevents UI from being accessible to keyboard/AT * users. * - * @param {String} message + * @param {string} message * @param {nsIAccessible} accessible * Accessible to log along with the failure message. */ @@ -804,7 +804,7 @@ this.AccessibilityUtils = (function () { * practices are not followed or for something that is not as severe to be * considered a failure. * - * @param {String} message + * @param {string} message * @param {nsIAccessible} accessible * Accessible to log along with the todo message. */ diff --git a/testing/mochitest/tests/SimpleTest/EventUtils.js b/testing/mochitest/tests/SimpleTest/EventUtils.js @@ -607,7 +607,7 @@ function _maybeSynthesizeDragOver(left, top, aEvent, aWindow) { } /** - * @typedef {Object} MouseEventData + * @typedef {object} MouseEventData * * @property {string} [accessKey] - The character or key associated with * the access key event. Typically a single character used to activate a UI @@ -852,7 +852,7 @@ function synthesizeMouseAtCenter(aTarget, aEvent, aWindow, aCallback) { } /** - * @typedef {Object} TouchEventData + * @typedef {object} TouchEventData * @property {boolean} [aEvent.asyncEnabled] - If `true`, the event is * dispatched to the parent process through APZ, without being injected * into the OS event queue. @@ -1080,7 +1080,7 @@ function synthesizeTouchAtCenter(aTarget, aEvent = {}, aWindow = window) { } /** - * @typedef {Object} WheelEventData + * @typedef {object} WheelEventData * @property {string} [aEvent.accessKey] - The character or key associated with * the access key event. Typically a single character used to activate a UI * element via keyboard shortcuts (e.g., Alt + accessKey). @@ -1468,7 +1468,7 @@ function synthesizeNativeTap( * @param {object} aParams * @param {string} aParams.type "click", "mousedown", "mouseup" or "mousemove" * @param {Element} aParams.target Origin of offsetX and offsetY, must be an element - * @param {Boolean} [aParams.atCenter] + * @param {boolean} [aParams.atCenter] * Instead of offsetX/Y, synthesize the event at center of `target`. * @param {number} [aParams.offsetX] * X offset in `target` (in CSS pixels if `scale` is "screenPixelsPerCSSPixel") @@ -1480,12 +1480,12 @@ function synthesizeNativeTap( * @param {number} [aParams.screenY] * Y offset in screen (in CSS pixels if `scale` is "screenPixelsPerCSSPixel"), * Neither offsetX/Y nor atCenter must be set if this is set. - * @param {String} [aParams.scale="screenPixelsPerCSSPixel"] + * @param {string} [aParams.scale="screenPixelsPerCSSPixel"] * If scale is "screenPixelsPerCSSPixel", devicePixelRatio will be used. * If scale is "inScreenPixels", clientX/Y nor scaleX/Y are not adjusted with screenPixelsPerCSSPixel. * @param {number} [aParams.button=0] * Defaults to 0, if "click", "mousedown", "mouseup", set same value as DOM MouseEvent.button - * @param {Object} [aParams.modifiers={}] + * @param {object} [aParams.modifiers={}] * Active modifiers, see `_parseNativeModifiers` * @param {DOMWindow} [aParams.win=window] * The window to use its utils. Defaults to the window in which EventUtils.js is running. @@ -1709,7 +1709,7 @@ function synthesizeAndWaitNativeMouseMove( * Synthesize a key event. It is targeted at whatever would be targeted by an * actual keypress by the user, typically the focused element. * - * @param {String} aKey + * @param {string} aKey * Should be either: * * - key value (recommended). If you specify a non-printable key name, @@ -1719,10 +1719,10 @@ function synthesizeAndWaitNativeMouseMove( * - keyCode name starting with ``VK_`` (e.g., ``VK_RETURN``). This is available * only for compatibility with legacy API. Don't use this with new tests. * - * @param {Object} [aEvent] + * @param {object} [aEvent] * Optional event object with more specifics about the key event to * synthesize. - * @param {String} [aEvent.code] + * @param {string} [aEvent.code] * If you don't specify this explicitly, it'll be guessed from aKey * of US keyboard layout. Note that this value may be different * between browsers. For example, "Insert" is never set only on @@ -1738,7 +1738,7 @@ function synthesizeAndWaitNativeMouseMove( * If you want to specify this, you can specify this explicitly. * However, if you don't specify this value, it will be computed * from code value. - * @param {String} aEvent.type + * @param {string} aEvent.type * Basically, you shouldn't specify this. Then, this function will * synthesize keydown (, keypress) and keyup. * If keydown is specified, this only fires keydown (and keypress if @@ -3301,7 +3301,7 @@ function createDragEventObject( * ] * * Pass null to avoid modifying dataTransfer. - * @param {String} [aDropEffect="move"] + * @param {string} [aDropEffect="move"] * The drop effect to set during the dragstart event, or 'move' if omitted. * @param {DOMWindow} [aWindow=window] * The DOM window in which the drag happens. Defaults to the window in which @@ -3309,7 +3309,7 @@ function createDragEventObject( * @param {DOMWindow} [aDestWindow=aWindow] * Used when aDestElement is in a different DOM window than aSrcElement. * Default is to match ``aWindow``. - * @param {Object} [aDragEvent={}] + * @param {object} [aDragEvent={}] * Defaults to empty object. Overwrites an object passed to sendDragEvent. * @return {[boolean, DataTransfer]} * A two element array, where the first element is the value returned @@ -3411,9 +3411,9 @@ function synthesizeDragOver( * @param {DOMWindow} [aDestWindow=window] * The DOM window in which the drop happens. Defaults to the window in which * EventUtils.js is loaded. - * @param {Object} [aDragEvent={}] + * @param {object} [aDragEvent={}] * Defaults to empty object. Overwrites an object passed to sendDragEvent. - * @return {String} + * @return {string} * "none" if aResult is true, ``aDataTransfer.dropEffect`` otherwise. */ function synthesizeDropAfterDragOver( @@ -3509,7 +3509,7 @@ function startDragSession(aWindow, aDropEffect) { * ] * * Pass null to avoid modifying dataTransfer. - * @param {String} [aDropEffect="move"] + * @param {string} [aDropEffect="move"] * The drop effect to set during the dragstart event, or 'move' if omitted.. * @param {DOMWindow} [aWindow=window] * The DOM window in which the drag happens. Defaults to the window in which @@ -3517,9 +3517,9 @@ function startDragSession(aWindow, aDropEffect) { * @param {DOMWindow} [aDestWindow=aWindow] * Used when aDestElement is in a different DOM window than aSrcElement. * Default is to match ``aWindow``. - * @param {Object} [aDragEvent={}] + * @param {object} [aDragEvent={}] * Defaults to empty object. Overwrites an object passed to sendDragEvent. - * @return {String} + * @return {string} * The drop effect that was desired. */ function synthesizeDrop( @@ -3615,7 +3615,7 @@ function _computeSrcElementFromSrcSelection(aSrcSelection) { * Note that if synthesized dragstart is canceled, this throws an exception * because in such case, Gecko does not start drag session. * - * @param {Object} aParams + * @param {object} aParams * @param {Event} aParams.dragEvent * The DnD events will be generated with modifiers specified with this. * @param {Element} aParams.srcElement @@ -3643,9 +3643,9 @@ function _computeSrcElementFromSrcSelection(aSrcSelection) { * The DOM window for dispatching event on srcElement, defaults to the current window object. * @param {DOMWindow} aParams.destWindow * The DOM window for dispatching event on destElement, defaults to the current window object. - * @param {Boolean} aParams.expectCancelDragStart + * @param {boolean} aParams.expectCancelDragStart * Set to true if the test cancels "dragstart" - * @param {Boolean} aParams.expectSrcElementDisconnected + * @param {boolean} aParams.expectSrcElementDisconnected * Set to true if srcElement will be disconnected and * "dragend" event won't be fired. * @param {Function} aParams.logFunc @@ -4175,7 +4175,7 @@ function _checkDataTransferItems(aDataTransfer, aExpectedDragData) { * of "dragstart". Additionally, this checks whether the dataTransfer of * "dragstart" event has only expected items. * - * @param {Object} aParams + * @param {object} aParams * The params which is set to the argument of ``synthesizePlainDragAndDrop()``. * @param {Array} aExpectedDataTransferItems * All expected dataTransfer items. @@ -4341,7 +4341,7 @@ async function _synthesizeMockDndFromChild(aParams) { * called from content processes, in which case the drag is over the window * that is in context, and no checks of DND internals will occur. * - * @param {Object} aParams + * @param {object} aParams * @param {Window} aParams.sourceBrowsingCxt * The BrowsingContext (possibly remote) that contains * srcElement. Only set in parent process. @@ -4362,32 +4362,32 @@ async function _synthesizeMockDndFromChild(aParams) { * @param {number} aParams.step * The 2D step for intermediate dragging mousemoves. * Default is [5,5]. - * @param {Boolean} aParams.expectCancelDragStart + * @param {boolean} aParams.expectCancelDragStart * Set to true if srcElement is set up to cancel "dragstart" * @param {number} aParams.cancel * The 2D coord the mouse is moved to as the last step if * expectCancelDragStart is set - * @param {Boolean} aParams.expectSrcElementDisconnected + * @param {boolean} aParams.expectSrcElementDisconnected * Set to true if srcElement will be disconnected and * "dragend" event won't be fired. - * @param {Boolean} aParams.expectDragLeave + * @param {boolean} aParams.expectDragLeave * Set to true if the drop event will be converted to a * dragleave before it is sent (e.g. it was rejected by a * content analysis check). - * @param {Boolean} aParams.expectNoDragEvents + * @param {boolean} aParams.expectNoDragEvents * Set to true if no mouse or drag events should be received * on the source or target. - * @param {Boolean} aParams.expectNoDragTargetEvents + * @param {boolean} aParams.expectNoDragTargetEvents * Set to true if the drag should be blocked from sending * events to the target. - * @param {Boolean} aParams.dropPromise + * @param {boolean} aParams.dropPromise * A promise that the caller will resolve before we check * that the drop has happened. Default is a pre-resolved * promise. - * @param {String} aParms.contextLabel + * @param {string} aParms.contextLabel * Label that will appear in each output message. Useful to * distinguish between concurrent calls. Default is none. - * @param {Boolean} aParams.throwOnExtraMessage + * @param {boolean} aParams.throwOnExtraMessage * Throw an exception in child process when an unexpected * event is received. Used for debugging. Default is false. * @param {Function} aParams.record @@ -4404,7 +4404,7 @@ async function _synthesizeMockDndFromChild(aParams) { * call this from content, to skip testing of DND internals. * This parameter is required in the parent process and is * optional in content processes. - * @param {Object} aParams.dragController + * @param {object} aParams.dragController * MockDragController that the function should use. This * function will automatically generate one if none is given. * This can only be set in the parent process. diff --git a/testing/mochitest/tests/SimpleTest/SimpleTest.js b/testing/mochitest/tests/SimpleTest/SimpleTest.js @@ -835,7 +835,7 @@ SimpleTest.waitForExplicitFinish = function () { * "SimpleTest.requestLongerTimeout(5)" will give it 5 times as long to * finish. * - * @param {Number} factor + * @param {number} factor * The multiplication factor to use on the timeout for this test. */ SimpleTest.requestLongerTimeout = function (factor) { @@ -934,7 +934,7 @@ window.setTimeout = function SimpleTest_setTimeoutShim() { * using it. Such magic timeout values could result in intermittent * failures in your test, and are almost never necessary! * - * @param {String} reason + * @param {string} reason * A string representation of the reason why the test needs timeouts. */ SimpleTest.requestFlakyTimeout = function (reason) { @@ -1088,7 +1088,7 @@ const kTextHtmlSuffixClipboardDataWindows = * on the clipboard. This only uses the global clipboard and only for text/plain * values. * - * @param {String|Function} aExpectedStringOrValidatorFn + * @param {string | Function} aExpectedStringOrValidatorFn * The string value that is expected to be on the clipboard, or a * validator function getting expected clipboard data and returning a bool. * If you specify string value, line breakers in clipboard are treated @@ -1109,9 +1109,9 @@ const kTextHtmlSuffixClipboardDataWindows = * @param {Function} aFailureFn * A function called if the expected value isn't found on the clipboard * within 5s. It can also be called if the known value can't be found. - * @param {String} [aFlavor="text/plain"] + * @param {string} [aFlavor="text/plain"] * The flavor to look for. - * @param {Number} [aTimeout=5000] + * @param {number} [aTimeout=5000] * The timeout (in milliseconds) to wait for a clipboard change. * @param {boolean} [aExpectFailure=false] * If true, fail if the clipboard contents are modified within the timeout @@ -1278,7 +1278,7 @@ SimpleTest.promiseClipboardChange = async function ( * A function returns the result of the condition * @param {Function} aCallback * A function called after the condition is passed or timeout. - * @param {String} aErrorMsg + * @param {string} aErrorMsg * The message displayed when the condition failed to pass * before timeout. * @param interval diff --git a/testing/modules/Assert.sys.mjs b/testing/modules/Assert.sys.mjs @@ -159,7 +159,7 @@ Assert.prototype._reporter = null; * @callback reporterFunc * @param {AssertionError|null} err * An error object when the assertion failed, or null when it passed. - * @param {String} message + * @param {string} message * Message describing the assertion. * @param {Stack} stack * Stack trace of the assertion function. @@ -206,9 +206,9 @@ Assert.prototype.setReporter = function (reporterFunc) { * The result of evaluating the assertion. * @param {*} [expected] * Expected result from the test author. - * @param {String} [message] + * @param {string} [message] * Short explanation of the expected result. - * @param {String} [operator] + * @param {string} [operator] * Operation qualifier used by the assertion method (ex: '=='). * @param {boolean} [truncate=true] * Whether or not ``actual`` and ``expected`` should be truncated when printing. @@ -260,7 +260,7 @@ Assert.prototype.report = function ( * * @param {*} value * Test subject to be evaluated as truthy. - * @param {String} [message] + * @param {string} [message] * Short explanation of the expected result. */ Assert.prototype.ok = function (value, message) { @@ -285,7 +285,7 @@ Assert.prototype.ok = function (value, message) { * Test subject to be evaluated as equivalent to ``expected``. * @param {*} expected * Test reference to evaluate against ``actual``. - * @param {String} [message] + * @param {string} [message] * Short explanation of the expected result. */ Assert.prototype.equal = function equal(actual, expected, message) { @@ -303,7 +303,7 @@ Assert.prototype.equal = function equal(actual, expected, message) { * Test subject to be evaluated as NOT equivalent to ``expected``. * @param {*} expected * Test reference to evaluate against ``actual``. - * @param {String} [message] + * @param {string} [message] * Short explanation of the expected result. */ Assert.prototype.notEqual = function notEqual(actual, expected, message) { @@ -323,7 +323,7 @@ Assert.prototype.notEqual = function notEqual(actual, expected, message) { * Test subject to be evaluated as equivalent to ``expected``, including nested properties. * @param {*} expected * Test reference to evaluate against ``actual``. - * @param {String} [message] + * @param {string} [message] * Short explanation of the expected result. */ Assert.prototype.deepEqual = function deepEqual(actual, expected, message) { @@ -346,7 +346,7 @@ Assert.prototype.deepEqual = function deepEqual(actual, expected, message) { * properties. * @param {*} expected * Test reference to evaluate against ``actual``. - * @param {String} [message] + * @param {string} [message] * Short explanation of the expected result. */ Assert.prototype.notDeepEqual = function notDeepEqual( @@ -372,7 +372,7 @@ Assert.prototype.notDeepEqual = function notDeepEqual( * Test subject to be evaluated as strictly equivalent to ``expected``. * @param {*} expected * Test reference to evaluate against ``actual``. - * @param {String} [message] + * @param {string} [message] * Short explanation of the expected result. */ Assert.prototype.strictEqual = function strictEqual(actual, expected, message) { @@ -387,7 +387,7 @@ Assert.prototype.strictEqual = function strictEqual(actual, expected, message) { * Test subject to be evaluated as NOT strictly equivalent to ``expected``. * @param {*} expected * Test reference to evaluate against ``actual``. - * @param {String} [message] + * @param {string} [message] * Short explanation of the expected result. */ Assert.prototype.notStrictEqual = function notStrictEqual( @@ -457,7 +457,7 @@ function expectedException(actual, expected) { * This parameter can be either a RegExp or a function. The function is * either the error type's constructor, or it's a method that returns * a boolean that describes the test outcome. - * @param {String} [message] + * @param {string} [message] * Short explanation of the expected result. */ Assert.prototype.throws = function (block, expected, message) { @@ -520,7 +520,7 @@ Assert.prototype.throws = function (block, expected, message) { * A promise that is expected to reject. * @param {?} [expected] * Test reference to evaluate against the rejection result. - * @param {String} [message] + * @param {string} [message] * Short explanation of the expected result. */ Assert.prototype.rejects = function (promise, expected, message) { @@ -595,11 +595,11 @@ function compareNumbers(expression, lhs, rhs, message, operator) { * The lhs must be greater than the rhs. * assert.greater(lhs, rhs, message_opt); * - * @param {Number} lhs + * @param {number} lhs * The left-hand side value. - * @param {Number} rhs + * @param {number} rhs * The right-hand side value. - * @param {String} [message] + * @param {string} [message] * Short explanation of the comparison result. */ Assert.prototype.greater = function greater(lhs, rhs, message) { @@ -610,11 +610,11 @@ Assert.prototype.greater = function greater(lhs, rhs, message) { * The lhs must be greater than or equal to the rhs. * assert.greaterOrEqual(lhs, rhs, message_opt); * - * @param {Number} [lhs] + * @param {number} [lhs] * The left-hand side value. - * @param {Number} [rhs] + * @param {number} [rhs] * The right-hand side value. - * @param {String} [message] + * @param {string} [message] * Short explanation of the comparison result. */ Assert.prototype.greaterOrEqual = function greaterOrEqual(lhs, rhs, message) { @@ -625,11 +625,11 @@ Assert.prototype.greaterOrEqual = function greaterOrEqual(lhs, rhs, message) { * The lhs must be less than the rhs. * assert.less(lhs, rhs, message_opt); * - * @param {Number} [lhs] + * @param {number} [lhs] * The left-hand side value. - * @param {Number} [rhs] + * @param {number} [rhs] * The right-hand side value. - * @param {String} [message] + * @param {string} [message] * Short explanation of the comparison result. */ Assert.prototype.less = function less(lhs, rhs, message) { @@ -640,11 +640,11 @@ Assert.prototype.less = function less(lhs, rhs, message) { * The lhs must be less than or equal to the rhs. * assert.lessOrEqual(lhs, rhs, message_opt); * - * @param {Number} [lhs] + * @param {number} [lhs] * The left-hand side value. - * @param {Number} [rhs] + * @param {number} [rhs] * The right-hand side value. - * @param {String} [message] + * @param {string} [message] * Short explanation of the comparison result. */ Assert.prototype.lessOrEqual = function lessOrEqual(lhs, rhs, message) { @@ -657,13 +657,13 @@ Assert.prototype.lessOrEqual = function lessOrEqual(lhs, rhs, message) { * string it will be interpreted as a regular expression so take care to escape * special characters such as "?" or "(" if you need the actual characters. * - * @param {String} lhs + * @param {string} lhs * The string to be tested. - * @param {String|RegExp} rhs + * @param {string | RegExp} rhs * The regular expression that the string will be tested with. * Note that if passed as a string, this will be interpreted. * as a regular expression. - * @param {String} [message] + * @param {string} [message] * Short explanation of the comparison result. */ Assert.prototype.stringMatches = function stringMatches(lhs, rhs, message) { @@ -708,11 +708,11 @@ Assert.prototype.stringMatches = function stringMatches(lhs, rhs, message) { /** * The lhs must be a string that contains the rhs string. * - * @param {String} lhs + * @param {string} lhs * The string to be tested (haystack). - * @param {String} rhs + * @param {string} rhs * The string to be found (needle). - * @param {String} [message] + * @param {string} [message] * Short explanation of the expected result. */ Assert.prototype.stringContains = function stringContains(lhs, rhs, message) { diff --git a/testing/specialpowers/content/ContentTaskUtils.sys.mjs b/testing/specialpowers/content/ContentTaskUtils.sys.mjs @@ -188,7 +188,7 @@ export var ContentTaskUtils = { * * @param {Element} subject * The element on which to observe mutations. - * @param {Object} options + * @param {object} options * The options to pass to MutationObserver.observe(); * @param {function} checkFn [optional] * Function that returns true when it wants the promise to be resolved. diff --git a/testing/talos/talos/tests/devtools/addon/content/tests/debugger/debugger-helpers.js b/testing/talos/talos/tests/devtools/addon/content/tests/debugger/debugger-helpers.js @@ -210,8 +210,8 @@ async function waitForLoadedScopes(dbg) { * Waits for the currently triggered scroll to complete * * @param {*} dbg - * @param {Object} options - * @param {Boolean} options.useTimeoutFallback - defaults to true. When set to false + * @param {object} options + * @param {boolean} options.useTimeoutFallback - defaults to true. When set to false * a scroll must happen for the wait for scrolling to complete * @returns */ @@ -229,8 +229,8 @@ async function waitForScrolling(dbg, { useTimeoutFallback = true } = {}) { * Scrolls a specific line and column into view in the editor * * @param {*} dbg - * @param {Number} line - * @param {Number} column + * @param {number} line + * @param {number} column * @returns */ async function scrollEditorIntoView(dbg, line, column) { diff --git a/testing/talos/talos/tests/devtools/addon/content/tests/webconsole/webconsole-helpers.js b/testing/talos/talos/tests/devtools/addon/content/tests/webconsole/webconsole-helpers.js @@ -10,9 +10,9 @@ const { } = require("damp-test/tests/head"); /** - * @param {String} label: The name of the test. + * @param {string} label: The name of the test. * @param {Toolbox} toolbox: The DevTools toolbox. - * @param {Number|Array} expectedMessages: This can be, either the number of messages that + * @param {number | Array} expectedMessages: This can be, either the number of messages that * need to be displayed in the console, or an array of objects representing the * messages that need to be in the output. The objects must have the following shape: * - {String} text: A string that should be in the message. diff --git a/toolkit/actors/AutoCompleteParent.sys.mjs b/toolkit/actors/AutoCompleteParent.sys.mjs @@ -526,11 +526,11 @@ export class AutoCompleteParent extends JSWindowActorParent { * @param {string} searchString * The input string used to query autocomplete entries across different * autocomplete providers. - * @param {Array<Object>} providers + * @param {Array<object>} providers * An array of objects where each object has a `name` used to identify the actor * name of the provider and `options` that are passed to the `searchAutoCompleteEntries` * method of the actor. - * @returns {Array<Object>} An array of results objects with `name` of the provider and `entries` + * @returns {Array<object>} An array of results objects with `name` of the provider and `entries` * that are returned from the provider module's `searchAutoCompleteEntries` method. */ async #startSearch(searchString, providers) { diff --git a/toolkit/actors/ContentMetaChild.sys.mjs b/toolkit/actors/ContentMetaChild.sys.mjs @@ -30,12 +30,12 @@ const PREVIEW_IMAGE_RULES = [ * * @param {Array} aRules * The list of rules for a given type of meta tag - * @param {String} aTag + * @param {string} aTag * The name or property of the incoming meta tag - * @param {String} aEntry + * @param {string} aEntry * The current best entry for the given meta tag * - * @returns {Boolean} true if the incoming meta tag is better than the current + * @returns {boolean} true if the incoming meta tag is better than the current * best meta tag of that same kind, false otherwise */ function shouldExtractMetadata(aRules, aTag, aEntry) { @@ -48,7 +48,7 @@ function shouldExtractMetadata(aRules, aTag, aEntry) { * @param {URL} aURL * A URL object that needs to be checked for valid principal and protocol * - * @returns {Boolean} true if the preview URL is safe and can be stored, false otherwise + * @returns {boolean} true if the preview URL is safe and can be stored, false otherwise */ function checkLoadURIStr(aURL) { if (!ACCEPTED_PROTOCOLS.has(aURL.protocol)) { diff --git a/toolkit/actors/PictureInPictureChild.sys.mjs b/toolkit/actors/PictureInPictureChild.sys.mjs @@ -110,7 +110,7 @@ ChromeUtils.defineLazyGetter(lazy, "logConsole", () => { * The Picture-In-Picture add-on can use this to provide site-specific wrappers for * sites that require special massaging to control. * - * @param {Object} pipChild reference to PictureInPictureChild class calling this function + * @param {object} pipChild reference to PictureInPictureChild class calling this function * @param {Element} originatingVideo * The <video> element to wrap. * @returns {PictureInPictureChildVideoWrapper} instance of PictureInPictureChildVideoWrapper @@ -168,10 +168,10 @@ export class PictureInPictureLauncherChild extends JSWindowActorChild { * Picture-in-Picture window existing, this tells the parent to * close it before opening the new one. * - * @param {Object} pipObject + * @param {object} pipObject * @param {HTMLVideoElement} pipObject.video - * @param {String} pipObject.reason What toggled PiP, e.g. "shortcut" - * @param {Object} pipObject.eventExtraKeys Extra telemetry keys to record + * @param {string} pipObject.reason What toggled PiP, e.g. "shortcut" + * @param {object} pipObject.eventExtraKeys Extra telemetry keys to record * @param {boolean} autoFocus Autofocus the PiP window (default: true) * * @return {Promise} @@ -701,7 +701,7 @@ export class PictureInPictureToggleChild extends JSWindowActorChild { * end date is reached when hovering over a video. The end date is calculated according to the timestamp * indicating when the PiP toggle was first seen. * - * @param {Number} firstSeenStartSeconds the timestamp in seconds indicating when the PiP toggle was first seen + * @param {number} firstSeenStartSeconds the timestamp in seconds indicating when the PiP toggle was first seen */ changeToIconIfDurationEnd(firstSeenStartSeconds) { const { displayDuration } = @@ -1481,7 +1481,7 @@ export class PictureInPictureToggleChild extends JSWindowActorChild { * @param {Element} toggle The Picture-in-Picture toggle. * @param {MouseEvent} event A MouseEvent to test. * - * @return {Boolean} + * @return {boolean} */ isMouseOverToggle(toggle, event) { let toggleRect = @@ -1729,7 +1729,7 @@ export class PictureInPictureChild extends JSWindowActorChild { * and define a new relative bottom position according to pip window size and the * position of video controls. * - * @param {Object} data args needed to determine if text tracks must be moved + * @param {object} data args needed to determine if text tracks must be moved */ moveTextTracks(data) { const { @@ -1898,7 +1898,7 @@ export class PictureInPictureChild extends JSWindowActorChild { * * @param {Element} video The <video> element to check. * - * @return {Boolean} + * @return {boolean} */ inPictureInPicture(video) { return this.getWeakVideo() === video; @@ -2210,7 +2210,7 @@ export class PictureInPictureChild extends JSWindowActorChild { /** * Set the current time of the video based of the position of the scrubber * - * @param {Number} scrubberPosition A number between 0 and 1 representing the position of the scrubber + * @param {number} scrubberPosition A number between 0 and 1 representing the position of the scrubber */ setVideoTime(scrubberPosition, wasPlaying) { const video = this.getWeakVideo(); @@ -2776,13 +2776,13 @@ class PictureInPictureChildVideoWrapper { /** * Create a wrapper for the original <video> * - * @param {String|null} videoWrapperScriptPath + * @param {string | null} videoWrapperScriptPath * Path to a wrapper script from the Picture-in-Picture addon. If a wrapper isn't * provided to the class, then we fallback on a default implementation for * commanding the original <video>. * @param {HTMLVideoElement} video * The original <video> we want to create a wrapper class for. - * @param {Object} pipChild + * @param {object} pipChild * Reference to PictureInPictureChild class calling this function. */ constructor(videoWrapperScriptPath, video, pipChild) { @@ -2797,7 +2797,7 @@ class PictureInPictureChildVideoWrapper { * controls operations on the source video. If the method doesn't exist, * or if an error is thrown while calling it, use a fallback implementation. * - * @param {String} methodInfo.name + * @param {string} methodInfo.name * The method name to call. * @param {Array} methodInfo.args * Arguments to pass to the site wrapper method being called. @@ -2849,7 +2849,7 @@ class PictureInPictureChildVideoWrapper { * sandbox to perform video controls operations on the originating video * (content code) and still be protected from direct access by it. * - * @param {String} videoWrapperScriptPath + * @param {string} videoWrapperScriptPath * Path to a wrapper script from the Picture-in-Picture addon. * @param {HTMLVideoElement} video * The source video element whose window to create a sandbox for. @@ -2913,8 +2913,8 @@ class PictureInPictureChildVideoWrapper { /** * Function to display the captions on the PiP window * - * @param {String} text - Raw text to be displayed - * @param {String} type - Optional type of text track. If "vtt" or "html", the text + * @param {string} text - Raw text to be displayed + * @param {string} type - Optional type of text track. If "vtt" or "html", the text * will be parsed and displayed as a WebVTT cue. If not provided, the text will * be displayed as plain text. */ @@ -2990,7 +2990,7 @@ class PictureInPictureChildVideoWrapper { * * @param {HTMLVideoElement} video * The originating video source element - * @returns {Boolean} Boolean value true if paused, or false if video is still playing + * @returns {boolean} Boolean value true if paused, or false if video is still playing */ getPaused(video) { return this.#callWrapperMethod({ @@ -3008,7 +3008,7 @@ class PictureInPictureChildVideoWrapper { * * @param {HTMLVideoElement} video * The originating video source element - * @returns {Boolean} Boolean value true if the video has ended, or false if still playing + * @returns {boolean} Boolean value true if the video has ended, or false if still playing */ getEnded(video) { return this.#callWrapperMethod({ @@ -3026,7 +3026,7 @@ class PictureInPictureChildVideoWrapper { * * @param {HTMLVideoElement} video * The originating video source element - * @returns {Number} Duration of the video in seconds + * @returns {number} Duration of the video in seconds */ getDuration(video) { return this.#callWrapperMethod({ @@ -3044,7 +3044,7 @@ class PictureInPictureChildVideoWrapper { * * @param {HTMLVideoElement} video * The originating video source element - * @returns {Number} Current time of the video in seconds + * @returns {number} Current time of the video in seconds */ getCurrentTime(video) { return this.#callWrapperMethod({ @@ -3062,9 +3062,9 @@ class PictureInPictureChildVideoWrapper { * * @param {HTMLVideoElement} video * The originating video source element - * @param {Number} position + * @param {number} position * The current playback time of the video - * @param {Boolean} wasPlaying + * @param {boolean} wasPlaying * True if the video was playing before seeking else false */ setCurrentTime(video, position, wasPlaying) { @@ -3081,9 +3081,9 @@ class PictureInPictureChildVideoWrapper { /** * Return hours, minutes, and seconds from seconds * - * @param {Number} aSeconds + * @param {number} aSeconds * The time in seconds - * @returns {String} Timestamp string + * @returns {string} Timestamp string */ timeFromSeconds(aSeconds) { aSeconds = isNaN(aSeconds) ? 0 : Math.round(aSeconds); @@ -3101,11 +3101,11 @@ class PictureInPictureChildVideoWrapper { * Format a timestamp from current time and total duration, * output as a string in the form '0:00 / 0:00' * - * @param {Number} aCurrentTime + * @param {number} aCurrentTime * The current time in seconds - * @param {Number} aDuration + * @param {number} aDuration * The total duration in seconds - * @returns {String} Formatted timestamp + * @returns {string} Formatted timestamp */ formatTimestamp(aCurrentTime, aDuration) { // We can't format numbers that can't be represented as decimal digits. @@ -3125,7 +3125,7 @@ class PictureInPictureChildVideoWrapper { * * @param {HTMLVideoElement} video * The originating video source element - * @returns {Number} Volume of the video between 0 (muted) and 1 (loudest) + * @returns {number} Volume of the video between 0 (muted) and 1 (loudest) */ getVolume(video) { return this.#callWrapperMethod({ @@ -3143,7 +3143,7 @@ class PictureInPictureChildVideoWrapper { * * @param {HTMLVideoElement} video * The originating video source element - * @param {Number} volume + * @param {number} volume * Value between 0 (muted) and 1 (loudest) */ setVolume(video, volume) { @@ -3164,7 +3164,7 @@ class PictureInPictureChildVideoWrapper { * * @param {HTMLVideoElement} video * The originating video source element - * @param {Boolean} shouldMute + * @param {boolean} shouldMute * Boolean value true to mute the video, or false to unmute the video */ isMuted(video) { @@ -3183,7 +3183,7 @@ class PictureInPictureChildVideoWrapper { * * @param {HTMLVideoElement} video * The originating video source element - * @param {Boolean} shouldMute + * @param {boolean} shouldMute * Boolean value true to mute the video, or false to unmute the video */ setMuted(video, shouldMute) { @@ -3248,7 +3248,7 @@ class PictureInPictureChildVideoWrapper { * * @param {HTMLVideoElement} video * The originating video source element - * @returns {Boolean} Boolean value true if the pip toggle should be hidden by the site wrapper, or false if it should not + * @returns {boolean} Boolean value true if the pip toggle should be hidden by the site wrapper, or false if it should not */ shouldHideToggle(video) { return this.#callWrapperMethod({ diff --git a/toolkit/actors/PopupAndRedirectBlockingChild.sys.mjs b/toolkit/actors/PopupAndRedirectBlockingChild.sys.mjs @@ -18,7 +18,7 @@ import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs"; */ export class PopupAndRedirectBlockingChild extends JSWindowActorChild { /** - * @typedef {Object} DocState + * @typedef {object} DocState * @property {Array<{ * popupWindowURISpec: string, * popupWindowFeatures: string, diff --git a/toolkit/actors/SelectParent.sys.mjs b/toolkit/actors/SelectParent.sys.mjs @@ -72,13 +72,13 @@ export var SelectParentHelper = { * * @param {Element} menulist * @param {Array<Element>} items - * @param {Array<Object>} uniqueItemStyles - * @param {Number} selectedIndex - * @param {Number} zoom - * @param {Boolean} custom - * @param {Boolean} isDarkBackground - * @param {Object} uaStyle - * @param {Object} selectStyle + * @param {Array<object>} uniqueItemStyles + * @param {number} selectedIndex + * @param {number} zoom + * @param {boolean} custom + * @param {boolean} isDarkBackground + * @param {object} uaStyle + * @param {object} selectStyle */ populate( menulist, @@ -488,13 +488,13 @@ export var SelectParentHelper = { * * @param {Element} menulist * @param {Array<Element>} options - * @param {Array<Object>} uniqueOptionStyles - * @param {Number} selectedIndex + * @param {Array<object>} uniqueOptionStyles + * @param {number} selectedIndex * @param {Element} parentElement - * @param {Boolean} isGroupDisabled - * @param {Boolean} addSearch - * @param {Number} nthChildIndex - * @returns {Number} + * @param {boolean} isGroupDisabled + * @param {boolean} addSearch + * @param {number} nthChildIndex + * @returns {number} */ populateChildren( menulist, diff --git a/toolkit/actors/UserCharacteristicsChild.sys.mjs b/toolkit/actors/UserCharacteristicsChild.sys.mjs @@ -20,7 +20,7 @@ export class UserCharacteristicsChild extends JSWindowActorChild { /** * A placeholder for the collected data. * - * @typedef {Object} userDataDetails + * @typedef {object} userDataDetails * @property {string} debug - The debug messages. * @property {Array<string>} gamepads - The user characteristics data for gamepads. * @property {Map<string, number | string | boolean>} output - The user characteristics data. diff --git a/toolkit/components/aboutprocesses/content/aboutProcesses.js b/toolkit/components/aboutprocesses/content/aboutProcesses.js @@ -446,7 +446,7 @@ var View = { * Display a row showing a single process (without its threads). * * @param {ProcessDelta} data The data to display. - * @param {Number} maxSlopeCpu The largest slopeCpu value. + * @param {number} maxSlopeCpu The largest slopeCpu value. * @return {DOMElement} The row displaying the process. */ displayProcessRow(data, maxSlopeCpu) { @@ -947,7 +947,7 @@ var View = { * Display a row showing a single thread. * * @param {ThreadDelta} data The data to display. - * @param {Number} maxSlopeCpu The largest slopeCpu value. + * @param {number} maxSlopeCpu The largest slopeCpu value. */ displayThreadRow(data, maxSlopeCpu) { const cellCount = 3; @@ -1007,7 +1007,7 @@ var View = { * As a special case, we also handle `null`, which represents the case in which we do * not have sufficient information to compute an amount of memory. * - * @param {Number?} value The value to format. Must be either `null` or a non-negative number. + * @param {number?} value The value to format. Must be either `null` or a non-negative number. * @return { {unit: "GB" | "MB" | "KB" | B" | "?"}, amount: Number } The formated amount and its * unit, which may be used for e.g. additional CSS formating. */ diff --git a/toolkit/components/antitracking/bouncetrackingprotection/test/browser/browser_bouncetracking_cookie_behavior.js b/toolkit/components/antitracking/bouncetrackingprotection/test/browser/browser_bouncetracking_cookie_behavior.js @@ -10,8 +10,8 @@ requestLongerTimeout(3); * Helper function for testing that BTP gets enabled/disabled for a specific * cookie behavior. * - * @param {Number} cookieBehavior - One of Ci.nsICookieService.BEHAVIOR* values. - * @param {Number} privateBrowsingId - Run test in private/non-private mode. + * @param {number} cookieBehavior - One of Ci.nsICookieService.BEHAVIOR* values. + * @param {number} privateBrowsingId - Run test in private/non-private mode. */ async function runTestCookieBehavior( cookieBehavior, diff --git a/toolkit/components/antitracking/bouncetrackingprotection/test/browser/browser_bouncetracking_mode_prefs.js b/toolkit/components/antitracking/bouncetrackingprotection/test/browser/browser_bouncetracking_mode_prefs.js @@ -15,7 +15,7 @@ const BTP_MODE_PREF = "privacy.bounceTrackingProtection.mode"; /** * Run a bounce test with a custom bounce tracking protection mode. * - * @param {Number} mode - Mode to set for BTP. Any of + * @param {number} mode - Mode to set for BTP. Any of * Ci.nsIBounceTrackingProtection.MODE_* * @param {boolean} shouldBeEnabled - Whether BTP should classify + purge in * this mode. diff --git a/toolkit/components/antitracking/bouncetrackingprotection/test/browser/browser_bouncetracking_remoteExceptions.js b/toolkit/components/antitracking/bouncetrackingprotection/test/browser/browser_bouncetracking_remoteExceptions.js @@ -105,10 +105,10 @@ async function waitForAllowListState(allowedSiteHosts) { /** * Dispatch a RemoteSettings "sync" event. * - * @param {Object} data - The event's data payload. - * @param {Object} [data.created] - Records that were created. - * @param {Object} [data.updated] - Records that were updated. - * @param {Object} [data.deleted] - Records that were removed. + * @param {object} data - The event's data payload. + * @param {object} [data.created] - Records that were created. + * @param {object} [data.updated] - Records that were updated. + * @param {object} [data.deleted] - Records that were removed. */ async function remoteSettingsSync({ created, updated, deleted }) { await RemoteSettings(COLLECTION_NAME).emit("sync", { diff --git a/toolkit/components/antitracking/bouncetrackingprotection/test/browser/browser_bouncetracking_webAuthUserActivation.js b/toolkit/components/antitracking/bouncetrackingprotection/test/browser/browser_bouncetracking_webAuthUserActivation.js @@ -51,7 +51,7 @@ function promiseWebAuthnGetAssertionDiscoverableBC( * Test that a webauthn request triggers BTP user activation. * * @param {Function} triggerFn - Function that runs the webauthn request. - * @param {String} userActivationSiteHost - The expected user activation site host in BTP. + * @param {string} userActivationSiteHost - The expected user activation site host in BTP. */ async function runWebAuthTest(triggerFn, userActivationSiteHost) { is( diff --git a/toolkit/components/antitracking/bouncetrackingprotection/test/browser/head.js b/toolkit/components/antitracking/bouncetrackingprotection/test/browser/head.js @@ -165,7 +165,7 @@ function getBounceURL({ * * @param {MozBrowser} browser - Browser to insert the link in. * @param {URL} targetURL - Destination for navigation. - * @param {Object} options - Additional options. + * @param {object} options - Additional options. * @param {string} [options.spawnWindow] - If set to "newTab" or "popup" the * link will be opened in a new tab or popup window respectively. If unset the * link is opened in the given browser. diff --git a/toolkit/components/antitracking/test/browser/browser_allowListPreference.js b/toolkit/components/antitracking/test/browser/browser_allowListPreference.js @@ -97,9 +97,9 @@ add_setup(async function () { /** * Set exceptions via RemoteSettings. * - * @param {Boolean} baseline - If true, set baseline allow list entries. - * @param {Boolean} convenience - If true, set convenience allow list entries. - * @param {String} category - The content blocking category to set. + * @param {boolean} baseline - If true, set baseline allow list entries. + * @param {boolean} convenience - If true, set convenience allow list entries. + * @param {string} category - The content blocking category to set. */ async function setAllowListPrefs(baseline, convenience, category) { info("Set allow list baseline and convenience prefs"); diff --git a/toolkit/components/antitracking/test/browser/browser_contentBlockingAllowListPrincipal.js b/toolkit/components/antitracking/test/browser/browser_contentBlockingAllowListPrincipal.js @@ -16,7 +16,7 @@ const TEST_SANDBOX_URL = * * @param {Browser} browser - Browser to test. * @param {("content"|"system")} type - Expected principal type. - * @param {String} [origin] - Expected origin of principal. Defaults to the + * @param {string} [origin] - Expected origin of principal. Defaults to the * origin of the browsers content principal. */ function checkAllowListPrincipal( @@ -48,7 +48,7 @@ function checkAllowListPrincipal( /** * Runs a given test in a normal window and in a private browsing window. * - * @param {String} initialUrl - URL to load in the initial test tab. + * @param {string} initialUrl - URL to load in the initial test tab. * @param {Function} testCallback - Test function to run in both windows. */ async function runTestInNormalAndPrivateMode(initialUrl, testCallback) { @@ -73,9 +73,9 @@ async function runTestInNormalAndPrivateMode(initialUrl, testCallback) { * Creates an iframe in the passed browser and waits for it to load. * * @param {Browser} browser - Browser to create the frame in. - * @param {String} src - Frame source url. - * @param {String} id - Frame id. - * @param {String} [sandboxAttr] - Optional list of sandbox attributes to set + * @param {string} src - Frame source url. + * @param {string} id - Frame id. + * @param {string} [sandboxAttr] - Optional list of sandbox attributes to set * for the iframe. Defaults to no sandbox. * @returns {Promise} - Resolves once the frame has loaded. */ diff --git a/toolkit/components/antitracking/test/browser/browser_partitionedClearSiteDataHeader.js b/toolkit/components/antitracking/test/browser/browser_partitionedClearSiteDataHeader.js @@ -35,8 +35,8 @@ const skipLocalStorageTests = Services.prefs.getBoolPref( * Creates an iframe in the passed browser and waits for it to load. * * @param {Browser} browser - Browser to create the frame in. - * @param {String} src - Frame source url. - * @param {String} id - Frame id. + * @param {string} src - Frame source url. + * @param {string} id - Frame id. * @param {boolean} sandbox - Whether the frame should be sandboxed. * @returns {Promise} - Resolves once the frame has loaded. */ @@ -63,9 +63,9 @@ function createFrame(browser, src, id, sandbox) { * Creates a new tab, loads a url and creates an iframe. * Callers need to clean up the tab before the test ends. * - * @param {String} firstPartyUrl - Url to load in tab. - * @param {String} thirdPartyUrl - Url to load in frame. - * @param {String} frameId - Id of iframe element. + * @param {string} firstPartyUrl - Url to load in tab. + * @param {string} thirdPartyUrl - Url to load in frame. + * @param {string} frameId - Id of iframe element. * @param {boolean} sandbox - Whether the frame should be sandboxed. * @returns {Promise} - Resolves with the tab and the frame BrowsingContext once * the tab and the frame have loaded. @@ -187,9 +187,9 @@ async function runClearSiteDataTest( /** * Create an origin with partitionKey. * - * @param {String} originNoSuffix - Origin without origin attributes. - * @param {String} [firstParty] - First party to create partitionKey. - * @returns {String} Origin with suffix. If not passed this will return the + * @param {string} originNoSuffix - Origin without origin attributes. + * @param {string} [firstParty] - First party to create partitionKey. + * @returns {string} Origin with suffix. If not passed this will return the * umodified origin. */ function getOrigin(originNoSuffix, firstParty) { @@ -205,11 +205,11 @@ function getOrigin(originNoSuffix, firstParty) { * Sets a storage item for an origin. * * @param {("cookie"|"localStorage")} storageType - Which storage type to use. - * @param {String} originNoSuffix - Context to set storage item in. - * @param {String} [firstParty] - Optional first party domain to partition + * @param {string} originNoSuffix - Context to set storage item in. + * @param {string} [firstParty] - Optional first party domain to partition * under. - * @param {String} key - Key of the entry. - * @param {String} value - Value of the entry. + * @param {string} key - Key of the entry. + * @param {string} value - Value of the entry. */ function setStorageEntry(storageType, originNoSuffix, firstParty, key, value) { if (storageType != "cookie" && storageType != "localStorage") { @@ -234,11 +234,11 @@ function setStorageEntry(storageType, originNoSuffix, firstParty, key, value) { * This performs cookie lookups directly via the cookie service. * * @param {boolean} hasCookie - Whether we expect to see a cookie. - * @param {String} originNoSuffix - Origin the cookie is stored for. - * @param {String|null} firstParty - Whether to test for a partitioned cookie. + * @param {string} originNoSuffix - Origin the cookie is stored for. + * @param {string | null} firstParty - Whether to test for a partitioned cookie. * If set this will be used to construct the partitionKey. - * @param {String} [key] - Expected key / name of the cookie. - * @param {String} [value] - Expected value of the cookie. + * @param {string} [key] - Expected key / name of the cookie. + * @param {string} [value] - Expected value of the cookie. */ function testHasCookie(hasCookie, originNoSuffix, firstParty, key, value) { let origin = getOrigin(originNoSuffix, firstParty); @@ -265,10 +265,10 @@ function testHasCookie(hasCookie, originNoSuffix, firstParty, key, value) { * Tests whether a context has a localStorage entry. * * @param {boolean} hasEntry - Whether we expect to see an entry. - * @param {String} originNoSuffix - Origin to test localStorage for. - * @param {String} [firstParty] - First party context to test under. - * @param {String} key - key of the localStorage item. - * @param {String} [expectedValue] - Expected value of the item. + * @param {string} originNoSuffix - Origin to test localStorage for. + * @param {string} [firstParty] - First party context to test under. + * @param {string} key - key of the localStorage item. + * @param {string} [expectedValue] - Expected value of the item. */ function testHasLocalStorageEntry( hasEntry, diff --git a/toolkit/components/antitracking/test/browser/head.js b/toolkit/components/antitracking/test/browser/head.js @@ -205,11 +205,11 @@ async function waitForContentBlockingEvent(win) { * Dispatch a RemoteSettings "sync" event. * * @param {string} collectionName - The remote setting collection name - * @param {Object} data - The event's data payload. - * @param {Object} [data.created] - Records that were created. - * @param {Object} [data.updated] - Records that were updated. - * @param {Object} [data.deleted] - Records that were removed. - * @param {Object} [data.current] - The current list of records. + * @param {object} data - The event's data payload. + * @param {object} [data.created] - Records that were created. + * @param {object} [data.updated] - Records that were updated. + * @param {object} [data.deleted] - Records that were removed. + * @param {object} [data.current] - The current list of records. */ async function remoteSettingsSync( collectionName, @@ -229,9 +229,9 @@ async function remoteSettingsSync( /** * Set exceptions via RemoteSettings. * - * @param {Object[]} entries - The entries to set. If empty, the exceptions will be cleared. - * @param {Object} db - The Remote Settings collections database. - * @param {Object} collectionName The remote setting collection name + * @param {object[]} entries - The entries to set. If empty, the exceptions will be cleared. + * @param {object} db - The Remote Settings collections database. + * @param {object} collectionName The remote setting collection name */ async function setExceptions(entries, db, collectionName) { info("Set exceptions via RemoteSettings"); diff --git a/toolkit/components/backgroundtasks/BackgroundTasksManager.sys.mjs b/toolkit/components/backgroundtasks/BackgroundTasksManager.sys.mjs @@ -98,7 +98,7 @@ function locationsForBackgroundTaskNamed(name) { * which is registered at `resource://testing-common`, the standard * location for test-only modules. * - * @return {Object} The imported module. + * @return {object} The imported module. * @throws NS_ERROR_NOT_AVAILABLE if a background task with the given `name` is * not found. */ diff --git a/toolkit/components/cleardata/ClearDataService.sys.mjs b/toolkit/components/cleardata/ClearDataService.sys.mjs @@ -92,7 +92,7 @@ function maybeFixupIpv6(host) { * aSchemelessSite and aOriginAttributesPattern. * @param {string} aSchemelessSite - Domain to check for. Must be a valid, * non-empty baseDomain string. - * @param {Object} [aOriginAttributesPattern] - Additional OriginAttributes + * @param {object} [aOriginAttributesPattern] - Additional OriginAttributes * filtering using an OriginAttributesPattern. Defaults to {} which matches all. * @returns {boolean} Whether the (host, originAttributes) or principal matches * the site. @@ -1168,7 +1168,7 @@ const PushNotificationsCleaner = { * Clear entries for aDomain including subdomains of aDomain. * * @param {string} aDomain - Domain to clear data for. - * @param {Object} aOriginAttributesPattern - Optional pattern to filter OriginAttributes. + * @param {object} aOriginAttributesPattern - Optional pattern to filter OriginAttributes. * @returns {Promise} a promise which resolves once data has been cleared. */ _deleteByRootDomain(aDomain, aOriginAttributesPattern = null) { diff --git a/toolkit/components/cleardata/PrincipalsCollector.sys.mjs b/toolkit/components/cleardata/PrincipalsCollector.sys.mjs @@ -76,7 +76,7 @@ export class PrincipalsCollector { * This function will cache its result and return the same list on second call, * even if the actual number of principals with cookies and site data changed. * - * @param {Object} [optional] progress A Sanitizer.sys.mjs progress object that + * @param {object} [optional] progress A Sanitizer.sys.mjs progress object that * will be updated to reflect the current step of fetching principals. * @returns {Array<nsIPrincipal>} the list of principals */ diff --git a/toolkit/components/cleardata/SiteDataTestUtils.sys.mjs b/toolkit/components/cleardata/SiteDataTestUtils.sys.mjs @@ -26,7 +26,7 @@ export var SiteDataTestUtils = { /** * Makes an origin have persistent data storage. * - * @param {String} origin - the origin of the site to give persistent storage + * @param {string} origin - the origin of the site to give persistent storage * * @returns a Promise that resolves when storage was persisted */ @@ -42,8 +42,8 @@ export var SiteDataTestUtils = { /** * Adds a new blob entry to a dummy indexedDB database for the specified origin. * - * @param {String} origin - the origin of the site to add test data for - * @param {Number} size [optional] - the size of the entry in bytes + * @param {string} origin - the origin of the site to add test data for + * @param {number} size [optional] - the size of the entry in bytes * * @returns a Promise that resolves when the data was added successfully. */ @@ -73,14 +73,14 @@ export var SiteDataTestUtils = { * specified contents. The cookie will be valid for one day. * * @param {object} options - * @param {String} [options.origin] - Origin of the site to add test data for. + * @param {string} [options.origin] - Origin of the site to add test data for. * If set, overrides host, path and originAttributes args. - * @param {String} [options.host] - Host of the site to add test data for. - * @param {String} [options.path] - Path to set cookie for. - * @param {Object} [options.originAttributes] - Object of origin attributes to + * @param {string} [options.host] - Host of the site to add test data for. + * @param {string} [options.path] - Path to set cookie for. + * @param {object} [options.originAttributes] - Object of origin attributes to * set cookie for. - * @param {String} [options.name] - Cookie name - * @param {String} [options.value] - Cookie value + * @param {string} [options.name] - Cookie name + * @param {string} [options.value] - Cookie value */ addToCookies({ origin, @@ -125,9 +125,9 @@ export var SiteDataTestUtils = { * This method requires the pref dom.storage.client_validation=false in order * to access LS without a window. * - * @param {String} origin - the origin of the site to add test data for - * @param {String} [key] - the localStorage key - * @param {String} [value] - the localStorage value + * @param {string} origin - the origin of the site to add test data for + * @param {string} [key] - the localStorage key + * @param {string} [value] - the localStorage value */ addToLocalStorage(origin, key = "foo", value = "bar") { let principal = @@ -144,14 +144,14 @@ export var SiteDataTestUtils = { /** * Checks whether the given origin is storing data in localStorage * - * @param {String} origin - the origin of the site to check - * @param {{key: String, value: String}[]} [testEntries] - An array of entries + * @param {string} origin - the origin of the site to check + * @param {{key: string, value: string}[]} [testEntries] - An array of entries * to test for. * * This method requires the pref dom.storage.client_validation=false in order * to access LS without a window. * - * @returns {Boolean} whether the origin has localStorage data + * @returns {boolean} whether the origin has localStorage data */ hasLocalStorage(origin, testEntries) { let principal = @@ -178,15 +178,15 @@ export var SiteDataTestUtils = { * Adds a new serviceworker with the specified path. Note that this method * will open a new tab at the domain of the SW path to that effect. * - * @param {Object} options + * @param {object} options * @param {Window} options.win - The window to open the tab in where the SW is * registered. - * @param {String} options.path - the path to the service worker to add. - * @param {String} [options.topLevelPath] - If specified this path will be + * @param {string} options.path - the path to the service worker to add. + * @param {string} [options.topLevelPath] - If specified this path will be * used for the top level and the service worker will be registered in a frame * with 'path'. If omitted the service worker gets registered in the top level * (tab). - * @param {Number} [options.userContextId] - User context to register the + * @param {number} [options.userContextId] - User context to register the * service worker in. By default this targets the default user context (no * container). * @@ -366,10 +366,10 @@ export var SiteDataTestUtils = { /** * Checks whether the specified origin has registered ServiceWorkers. * - * @param {String} origin - the origin of the site to check, excluding the + * @param {string} origin - the origin of the site to check, excluding the * OriginAttributes suffix. * - * @returns {Boolean} whether or not the site has ServiceWorkers. + * @returns {boolean} whether or not the site has ServiceWorkers. */ hasServiceWorkers(origin) { let serviceWorkers = lazy.swm.getAllRegistrations(); @@ -388,7 +388,7 @@ export var SiteDataTestUtils = { /** * Waits for a ServiceWorker to be registered. * - * @param {String} the url of the ServiceWorker to wait for + * @param {string} the url of the ServiceWorker to wait for * * @returns a Promise that resolves when a ServiceWorker at the * specified location has been registered. @@ -415,7 +415,7 @@ export var SiteDataTestUtils = { /** * Waits for a ServiceWorker to be unregistered. * - * @param {String} the url of the ServiceWorker to wait for + * @param {string} the url of the ServiceWorker to wait for * * @returns a Promise that resolves when a ServiceWorker at the * specified location has been unregistered. diff --git a/toolkit/components/cleardata/tests/unit/test_network_cache.js b/toolkit/components/cleardata/tests/unit/test_network_cache.js @@ -29,9 +29,9 @@ function getPartitionedLoadContextInfo( * For now, we need to actively wait for the cache to be cleared before we can proceed. * This needs to be removed once bug 1839340 is resolved. * - * @param {String} url - Waiting until there is no entry of this url in the cache anymore + * @param {string} url - Waiting until there is no entry of this url in the cache anymore * @param {string[]} cacheTypes - The caches that should be chacked, e.g ["disk", "memory"] - * @param {Object[]} partitionContexts - Defines which partitions should be checked in addition. + * @param {object[]} partitionContexts - Defines which partitions should be checked in addition. * The objects hold a url and a base domain, for each cacheType it will be checked if there is still data * of the url under the base domain. */ diff --git a/toolkit/components/cleardata/tests/unit/test_quota.js b/toolkit/components/cleardata/tests/unit/test_quota.js @@ -21,11 +21,11 @@ const skipLocalStorageTests = Services.prefs.getBoolPref( /** * Create an origin with partitionKey. * - * @param {String} host - Host portion of origin to create. - * @param {String} [topLevelBaseDomain] - Optional first party base domain to use for partitionKey. - * @param {Object} [originAttributes] - Optional object of origin attributes to + * @param {string} host - Host portion of origin to create. + * @param {string} [topLevelBaseDomain] - Optional first party base domain to use for partitionKey. + * @param {object} [originAttributes] - Optional object of origin attributes to * set. If topLevelBaseDomain is passed, the partitionKey will be overwritten. - * @returns {String} Origin with suffix. + * @returns {string} Origin with suffix. */ function getOrigin(host, topLevelBaseDomain, originAttributes = {}) { return getPrincipal(host, topLevelBaseDomain, originAttributes).origin; diff --git a/toolkit/components/cookiebanners/test/browser/browser_cookiebanner_telemetry.js b/toolkit/components/cookiebanners/test/browser/browser_cookiebanner_telemetry.js @@ -35,9 +35,9 @@ function convertModeToTelemetryString(mode) { /** * A helper function to verify the reload telemetry. * - * @param {Number} length The expected length of the telemetry array. - * @param {Number} idx The index of the telemetry to be verified. - * @param {Object} expected An object that describe the expected value. + * @param {number} length The expected length of the telemetry array. + * @param {number} idx The index of the telemetry to be verified. + * @param {object} expected An object that describe the expected value. */ function verifyReloadTelemetry(length, idx, expected) { let events = Glean.cookieBanners.reload.testGetValue(); @@ -65,7 +65,7 @@ function verifyReloadTelemetry(length, idx, expected) { * A helper function to reload the browser and wait until it loads. * * @param {Browser} browser The browser object. - * @param {String} url The URL to be loaded. + * @param {string} url The URL to be loaded. */ async function reloadBrowser(browser, url) { let reloaded = BrowserTestUtils.browserLoaded(browser, false, url); @@ -80,8 +80,8 @@ async function reloadBrowser(browser, url) { * * @param {browser} browser The browser element * @param {boolean} testInTop To indicate the page should be opened in top level - * @param {String} page The url of the testing page - * @param {String} domain The domain of the testing page + * @param {string} page The url of the testing page + * @param {string} domain The domain of the testing page */ async function openLookUpTelemetryTestPage(browser, testInTop, page, domain) { let clickFinishPromise = promiseBannerClickingFinish(domain); diff --git a/toolkit/components/cookiebanners/test/browser/head.js b/toolkit/components/cookiebanners/test/browser/head.js @@ -94,7 +94,7 @@ async function cookieInjectorTestSetup() { * A helper function returns a promise which resolves when the banner clicking * is finished for the given domain. * - * @param {String} domain the domain that should run the banner clicking. + * @param {string} domain the domain that should run the banner clicking. */ function promiseBannerClickingFinish(domain) { return new Promise(resolve => { @@ -149,8 +149,8 @@ async function verifyBannerState(bc, visible, expected, bannerId = "banner") { * A helper function to open the test page and verify the banner state. * * @param {Window} [win] - the chrome window object. - * @param {String} domain - the domain of the testing page. - * @param {String} testURL - the url of the testing page. + * @param {string} domain - the domain of the testing page. + * @param {string} testURL - the url of the testing page. * @param {boolean} visible - if the banner should be visible. * @param {boolean} expected - the expected banner click state. * @param {string} [bannerId] - id of the cookie banner element. @@ -190,8 +190,8 @@ async function openPageAndVerify({ * state in the iframe. * * @param {Window} win - the chrome window object. - * @param {String} domain - the domain of the testing iframe page. - * @param {String} testURL - the url of the testing iframe page. + * @param {string} domain - the domain of the testing iframe page. + * @param {string} testURL - the url of the testing iframe page. * @param {boolean} visible - if the banner should be visible. * @param {boolean} expected - the expected banner click state. */ diff --git a/toolkit/components/crashes/CrashManager.in.sys.mjs b/toolkit/components/crashes/CrashManager.in.sys.mjs @@ -33,9 +33,9 @@ export function dateToDays(date) { * Get a field from the specified object and remove it. * * @param obj {Object} The object holding the field - * @param field {String} The name of the field to be parsed and removed + * @param field {string} The name of the field to be parsed and removed * - * @returns {String} the field contents as a string, null if none was found + * @returns {string} the field contents as a string, null if none was found */ function getAndRemoveField(obj, field) { let value = null; @@ -52,10 +52,10 @@ function getAndRemoveField(obj, field) { * Parse the string stored in the specified field as JSON and then remove the * field from the object. * - * @param obj {Object} The object holding the field + * @param obj {object} The object holding the field * @param field {String} The name of the field to be parsed and removed * - * @returns {Object} the parsed object, null if none was found + * @returns {object} the parsed object, null if none was found */ function parseAndRemoveField(obj, field) { let value = null; @@ -76,9 +76,9 @@ function parseAndRemoveField(obj, field) { /** * Convert a legacy Telemetry `StackTraces` layout to that expected by Glean. * - * @param stackTraces {Object} The legacy Telemetry StackTraces object. + * @param stackTraces {object} The legacy Telemetry StackTraces object. * - * @returns {Object} The stack traces layout expected by the Glean crash.stackTraces metric. + * @returns {object} The stack traces layout expected by the Glean crash.stackTraces metric. */ function stackTracesLegacyToGlean(stackTraces) { let ret = {}; @@ -125,7 +125,7 @@ function stackTracesLegacyToGlean(stackTraces) { * * @param value {String} The legacy Telemetry value. * - * @returns {Object} The object appropriate for being `.set()` on the Glean + * @returns {object} The object appropriate for being `.set()` on the Glean * crash.asyncShutdownTimeout metric. */ function asyncShutdownTimeoutLegacyToGlean(value) { diff --git a/toolkit/components/downloads/DownloadCore.sys.mjs b/toolkit/components/downloads/DownloadCore.sys.mjs @@ -1618,7 +1618,7 @@ DownloadSource.prototype = { * @param aStatus * The HTTP status in question * - * @return {Boolean} Download can progress + * @return {boolean} Download can progress */ allowHttpStatus: null, diff --git a/toolkit/components/downloads/DownloadHistory.sys.mjs b/toolkit/components/downloads/DownloadHistory.sys.mjs @@ -242,8 +242,8 @@ let DownloadCache = { /** * This returns an object containing the meta data for the supplied URL. * - * @param {String} url The url to get the meta data for. - * @return {Object|null} Returns an empty object if there is no meta data found, or + * @param {string} url The url to get the meta data for. + * @return {object | null} Returns an empty object if there is no meta data found, or * an object containing the meta data. The meta data * will look like: * @@ -312,8 +312,8 @@ let DownloadCache = { * for the given url, it will be overwritten (note: the targetFileSpec will be * maintained). * - * @param {String} url The url to set the meta data for. - * @param {Object} metadata The new metaData to save in the cache. + * @param {string} url The url to set the meta data for. + * @param {object} metadata The new metaData to save in the cache. */ async setMetadata(url, metadata) { await this.ensureInitialized(); @@ -398,14 +398,14 @@ class HistoryDownload { /** * History downloads are never in progress. * - * @type {Boolean} + * @type {boolean} */ stopped = true; /** * No percentage indication is shown for history downloads. * - * @type {Boolean} + * @type {boolean} */ hasProgress = false; @@ -416,7 +416,7 @@ class HistoryDownload { * instead of the history download. In case this session download is not * available, we show the history download as canceled, not paused. * - * @type {Boolean} + * @type {boolean} */ hasPartialData = false; @@ -635,7 +635,7 @@ class DownloadHistoryList extends DownloadList { * Index of the first slot that contains a session download. This is equal to * the length of the list when there are no session downloads. * - * @type {Number} + * @type {number} */ _firstSessionSlotIndex = 0; @@ -664,8 +664,8 @@ class DownloadHistoryList extends DownloadList { * Updates the download history item when the meta data or destination file * changes. * - * @param {String} sourceUrl The sourceUrl which was updated. - * @param {Object} metaData The new meta data for the sourceUrl. + * @param {string} sourceUrl The sourceUrl which was updated. + * @param {object} metaData The new meta data for the sourceUrl. */ updateForMetaDataChange(sourceUrl, metaData) { let slotsForUrl = this._slotsForUrl.get(sourceUrl); diff --git a/toolkit/components/glean/tests/browser/browser_fog_gmp.js b/toolkit/components/glean/tests/browser/browser_fog_gmp.js @@ -6,7 +6,7 @@ /** * Return a web-based URL for a given file based on the testing directory. * - * @param {String} fileName + * @param {string} fileName * file that caller wants its web-based url */ function GetTestWebBasedURL(fileName) { diff --git a/toolkit/components/glean/tests/browser/browser_fog_rdd.js b/toolkit/components/glean/tests/browser/browser_fog_rdd.js @@ -6,7 +6,7 @@ /** * Return a web-based URL for a given file based on the testing directory. * - * @param {String} fileName + * @param {string} fileName * file that caller wants its web-based url */ function GetTestWebBasedURL(fileName) { diff --git a/toolkit/components/messaging-system/lib/SpecialMessageActions.sys.mjs b/toolkit/components/messaging-system/lib/SpecialMessageActions.sys.mjs @@ -238,7 +238,7 @@ export const SpecialMessageActions = { /** * Set prefs with special message actions * - * @param {Object} pref - A pref to be updated. + * @param {object} pref - A pref to be updated. * @param {string} pref.name - The name of the pref to be updated * @param {string} [pref.value] - The value of the pref to be updated. If not included, the pref will be reset. * @param {boolean} onImpression - Whether the setPref action was triggered on diff --git a/toolkit/components/mozintl/mozIntl.sys.mjs b/toolkit/components/mozintl/mozIntl.sys.mjs @@ -47,8 +47,8 @@ const day = 864e5; * Allows for defining a cached getter to perform * calculations only once. * - * @param {Object} obj - Object to place the getter on. - * @param {String} prop - Name of the property. + * @param {object} obj - Object to place the getter on. + * @param {string} prop - Name of the property. * @param {Function} get - Function that will be used as a getter. */ function defineCachedGetter(obj, prop, get) { @@ -65,8 +65,8 @@ function defineCachedGetter(obj, prop, get) { * * Defines a getter on an object * - * @param {Object} obj - Object to place the getter on. - * @param {String} prop - Name of the property. + * @param {object} obj - Object to place the getter on. + * @param {string} prop - Name of the property. * @param {Function} get - Function that will be used as a getter. */ function defineGetter(obj, prop, get) { @@ -80,7 +80,7 @@ function defineGetter(obj, prop, get) { * a period for discrete distances. * * @param {Date} date - Date of which we're looking to find a start of. - * @param {String} unit - Period to calculate the start of. + * @param {string} unit - Period to calculate the start of. * * @returns {Date} */ @@ -114,9 +114,9 @@ function startOf(date, unit) { * Calculates the best fit unit to use for an absolute diff distance based * on thresholds. * - * @param {Object} absDiff - Object with absolute diff per unit calculated. + * @param {object} absDiff - Object with absolute diff per unit calculated. * - * @returns {String} + * @returns {string} */ function bestFit(absDiff) { switch (true) { diff --git a/toolkit/components/nimbus/lib/ExperimentManager.sys.mjs b/toolkit/components/nimbus/lib/ExperimentManager.sys.mjs @@ -212,7 +212,7 @@ export class ExperimentManager { * * `isFirstStartup`: a boolean indicating whether or not the current enrollment * is performed during the first startup * - * @returns {Object} A context object + * @returns {object} A context object */ createTargetingContext() { let context = { diff --git a/toolkit/components/nimbus/lib/ExperimentStore.sys.mjs b/toolkit/components/nimbus/lib/ExperimentStore.sys.mjs @@ -76,7 +76,7 @@ ChromeUtils.defineLazyGetter(lazy, "syncDataStore", () => { * { childPref: value } * where value is parsed to the appropriate type * - * @returns {Object[]} + * @returns {object[]} */ _getBranchChildValues(prefBranch, featureId) { const branch = Services.prefs.getBranch(prefBranch); diff --git a/toolkit/components/nimbus/lib/RemoteSettingsExperimentLoader.sys.mjs b/toolkit/components/nimbus/lib/RemoteSettingsExperimentLoader.sys.mjs @@ -247,7 +247,7 @@ export class RemoteSettingsExperimentLoader { /** * Initialize the loader, updating recipes from Remote Settings. * - * @param {Object} options additional options. + * @param {object} options additional options. * @param {bool} options.forceSync force Remote Settings to sync recipe collection * before updating recipes; throw if sync fails. * @return {Promise} which resolves after initialization and recipes diff --git a/toolkit/components/nimbus/test/NimbusTestUtils.sys.mjs b/toolkit/components/nimbus/test/NimbusTestUtils.sys.mjs @@ -501,7 +501,7 @@ export const NimbusTestUtils = { /** * A migration state that represents no migrations. * - * @type {Record<Phase, Number>} + * @type {Record<Phase, number>} */ UNMIGRATED: Object.freeze({}), @@ -524,7 +524,7 @@ export const NimbusTestUtils = { /** * A migration state that represents all migrations applied. * - * @type {Record<Phase, Number>} + * @type {Record<Phase, number>} */ get LATEST() { return NimbusTestUtils.migrationState.IMPORTED_ENROLLMENTS_TO_SQL; diff --git a/toolkit/components/normandy/actions/BranchedAddonStudyAction.sys.mjs b/toolkit/components/normandy/actions/BranchedAddonStudyAction.sys.mjs @@ -728,9 +728,9 @@ export class BranchedAddonStudyAction extends BaseStudyAction { * The deadline is 7 days from the first time that recipe failed, as * reckoned by the client's clock. * - * @param {Object} args + * @param {object} args * @param {Study} args.study The enrolled study to potentially unenroll. - * @param {String} args.reason If the study should end, the reason it is ending. + * @param {string} args.reason If the study should end, the reason it is ending. */ async _considerTemporaryError({ study, reason }) { if (!study?.active) { diff --git a/toolkit/components/normandy/actions/PreferenceExperimentAction.sys.mjs b/toolkit/components/normandy/actions/PreferenceExperimentAction.sys.mjs @@ -236,9 +236,9 @@ export class PreferenceExperimentAction extends BaseStudyAction { * The deadline is 7 days from the first time that recipe failed, as * reckoned by the client's clock. * - * @param {Object} args + * @param {object} args * @param {Experiment} args.experiment The enrolled experiment to potentially unenroll. - * @param {String} args.reason If the recipe should end, the reason it is ending. + * @param {string} args.reason If the recipe should end, the reason it is ending. */ async _considerTemporaryError({ experiment, reason }) { if (!experiment || experiment.expired) { diff --git a/toolkit/components/normandy/actions/ShowHeartbeatAction.sys.mjs b/toolkit/components/normandy/actions/ShowHeartbeatAction.sys.mjs @@ -144,7 +144,7 @@ export class ShowHeartbeatAction extends BaseAction { * ID, then the client ID is attached to the surveyId in the format * `${surveyId}::${userId}`. * - * @return {String} Survey ID, possibly with user UUID + * @return {string} Survey ID, possibly with user UUID */ generateSurveyId(recipe) { const { includeTelemetryUUID, surveyId } = recipe.arguments; @@ -158,7 +158,7 @@ export class ShowHeartbeatAction extends BaseAction { * Generate the appropriate post-answer URL for a recipe. * * @param recipe - * @return {String} URL with post-answer query params + * @return {string} URL with post-answer query params */ async generatePostAnswerURL(recipe) { const { postAnswerUrl, message, includeTelemetryUUID } = recipe.arguments; diff --git a/toolkit/components/normandy/content/AboutPages.sys.mjs b/toolkit/components/normandy/content/AboutPages.sys.mjs @@ -170,8 +170,8 @@ ChromeUtils.defineLazyGetter(AboutPages, "aboutStudies", () => { /** * Disable an active add-on study and remove its add-on. * - * @param {String} recipeId the id of the addon to remove - * @param {String} reason the reason for removal + * @param {string} recipeId the id of the addon to remove + * @param {string} reason the reason for removal */ async removeAddonStudy(recipeId, reason) { try { @@ -195,8 +195,8 @@ ChromeUtils.defineLazyGetter(AboutPages, "aboutStudies", () => { /** * Disable an active preference study. * - * @param {String} experimentName the name of the experiment to remove - * @param {String} reason the reason for removal + * @param {string} experimentName the name of the experiment to remove + * @param {string} reason the reason for removal */ async removePreferenceStudy(experimentName, reason) { try { diff --git a/toolkit/components/normandy/content/ShieldFrameChild.sys.mjs b/toolkit/components/normandy/content/ShieldFrameChild.sys.mjs @@ -155,8 +155,8 @@ export class ShieldFrameChild extends JSWindowActorChild { /** * Trigger an event to communicate with the unprivileged about:studies page. * - * @param {String} type The type of event to trigger. - * @param {Object} detail The data to pass along to the event. + * @param {string} type The type of event to trigger. + * @param {object} detail The data to pass along to the event. */ triggerPageCallback(type, detail) { // Clone details and use the event class from the unprivileged context. diff --git a/toolkit/components/normandy/content/about-studies/about-studies.js b/toolkit/components/normandy/content/about-studies/about-studies.js @@ -13,8 +13,8 @@ const r = React.createElement; /** * Dispatches a page event to the privileged frame script for this tab. * - * @param {String} action - * @param {Object} data + * @param {string} action + * @param {object} data */ function sendPageEvent(action, data) { const event = new CustomEvent("ShieldPageEvent", { diff --git a/toolkit/components/normandy/lib/AddonRollouts.sys.mjs b/toolkit/components/normandy/lib/AddonRollouts.sys.mjs @@ -66,7 +66,7 @@ function getDatabase() { * Get a transaction for interacting with the rollout store. * * @param {IDBDatabase} db - * @param {String} mode Either "readonly" or "readwrite" + * @param {string} mode Either "readonly" or "readwrite" * * NOTE: Methods on the store returned by this function MUST be called * synchronously, otherwise the transaction with the store will expire. diff --git a/toolkit/components/normandy/lib/AddonStudies.sys.mjs b/toolkit/components/normandy/lib/AddonStudies.sys.mjs @@ -3,11 +3,11 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /** - * @typedef {Object} Study - * @property {Number} recipeId + * @typedef {object} Study + * @property {number} recipeId * ID of the recipe that created the study. Used as the primary key of the * study. - * @property {Number} slug + * @property {number} slug * String code used to identify the study for use in Telemetry and logging. * @property {string} userFacingName * Name of the study to show to the user @@ -92,7 +92,7 @@ async function getDatabase() { * Get a transaction for interacting with the study store. * * @param {IDBDatabase} db - * @param {String} mode Either "readonly" or "readwrite" + * @param {string} mode Either "readonly" or "readwrite" * * NOTE: Methods on the store returned by this function MUST be called * synchronously, otherwise the transaction with the store will expire. @@ -260,8 +260,8 @@ export var AddonStudies = { /** * Test whether there is a study in storage for the given recipe ID. * - * @param {Number} recipeId - * @returns {Boolean} + * @param {number} recipeId + * @returns {boolean} */ async has(recipeId) { const db = await getDatabase(); @@ -272,7 +272,7 @@ export var AddonStudies = { /** * Fetch a study from storage. * - * @param {Number} recipeId + * @param {number} recipeId * @return {Study} The requested study, or null if none with that ID exist. */ async get(recipeId) { @@ -387,7 +387,7 @@ export var AddonStudies = { * * @param {IDBDatabase} db * @param {Study} study - * @param {String} reason Why the study is ending. + * @param {string} reason Why the study is ending. */ async markAsEnded(study, reason = "unknown") { if (reason === "unknown") { diff --git a/toolkit/components/normandy/lib/ClientEnvironment.sys.mjs b/toolkit/components/normandy/lib/ClientEnvironment.sys.mjs @@ -41,7 +41,7 @@ export class ClientEnvironment extends ClientEnvironmentBase { /** * Test wrapper that mocks the server request for classifying the client. * - * @param {Object} data Fake server data to use + * @param {object} data Fake server data to use * @param {Function} testFunction Test function to execute while mock data is in effect. */ static withMockClassify(data, testFunction) { diff --git a/toolkit/components/normandy/lib/Heartbeat.sys.mjs b/toolkit/components/normandy/lib/Heartbeat.sys.mjs @@ -35,29 +35,29 @@ CleanupManager.addCleanupHandler(() => { * * @param chromeWindow * The chrome window that the heartbeat notification is displayed in. - * @param {Object} options Options object. - * @param {String} options.message + * @param {object} options Options object. + * @param {string} options.message * The message, or question, to display on the notification. - * @param {String} options.thanksMessage + * @param {string} options.thanksMessage * The thank you message to display after user votes. - * @param {String} options.flowId + * @param {string} options.flowId * An identifier for this rating flow. Please note that this is only used to * identify the notification box. - * @param {String} [options.engagementButtonLabel=null] + * @param {string} [options.engagementButtonLabel=null] * The text of the engagement button to use instead of stars. If this is null * or invalid, rating stars are used. - * @param {String} [options.learnMoreMessage=null] + * @param {string} [options.learnMoreMessage=null] * The label of the learn more link. No link will be shown if this is null. - * @param {String} [options.learnMoreUrl=null] + * @param {string} [options.learnMoreUrl=null] * The learn more URL to open when clicking on the learn more link. No learn more * will be shown if this is an invalid URL. - * @param {String} [options.surveyId] + * @param {string} [options.surveyId] * An ID for the survey, reflected in the Telemetry ping. - * @param {Number} [options.surveyVersion] + * @param {number} [options.surveyVersion] * Survey's version number, reflected in the Telemetry ping. * @param {boolean} [options.testing] * Whether this is a test survey, reflected in the Telemetry ping. - * @param {String} [options.postAnswerURL=null] + * @param {string} [options.postAnswerURL=null] * The url to visit after the user answers the question. */ export var Heartbeat = class { diff --git a/toolkit/components/normandy/lib/LogManager.sys.mjs b/toolkit/components/normandy/lib/LogManager.sys.mjs @@ -12,7 +12,7 @@ export var LogManager = { * Configure the root logger for the Recipe Client. Must be called at * least once before using any loggers created via getLogger. * - * @param {Number} loggingLevel + * @param {number} loggingLevel * Logging level to use as defined in Log.sys.mjs */ configure(loggingLevel) { @@ -26,7 +26,7 @@ export var LogManager = { /** * Obtain a named logger with the recipe client logger as its parent. * - * @param {String} name + * @param {string} name * Name of the logger to obtain. * @return {Logger} */ diff --git a/toolkit/components/normandy/lib/NormandyApi.sys.mjs b/toolkit/components/normandy/lib/NormandyApi.sys.mjs @@ -86,11 +86,11 @@ export var NormandyApi = { * If the the signature is not valid, an error is thrown. Otherwise this * function returns undefined. * - * @param {object|String} data The object (or string) to be checked + * @param {object | string} data The object (or string) to be checked * @param {object} signaturePayload The signature information - * @param {String} signaturePayload.x5u The certificate chain URL - * @param {String} signaturePayload.signature base64 signature bytes - * @param {String} type The object type (eg. `"recipe"`, `"action"`) + * @param {string} signaturePayload.x5u The certificate chain URL + * @param {string} signaturePayload.signature base64 signature bytes + * @param {string} type The object type (eg. `"recipe"`, `"action"`) * @returns {Promise<undefined>} If the signature is valid, this function returns without error * @throws {NormandyApi.InvalidSignatureError} if signature is invalid. */ @@ -146,7 +146,7 @@ export var NormandyApi = { * Fetch details for an extension from the server. * * @param extensionId {integer} The ID of the extension to look up - * @resolves {Object} + * @resolves {object} */ async fetchExtensionDetails(extensionId) { const baseUrl = await this.getApiUrl("extension-list"); diff --git a/toolkit/components/normandy/lib/PreferenceExperiments.sys.mjs b/toolkit/components/normandy/lib/PreferenceExperiments.sys.mjs @@ -20,7 +20,7 @@ /** * Experiments store info about an active or expired preference experiment. * - * @typedef {Object} Experiment + * @typedef {object} Experiment * @property {string} slug * A string uniquely identifying the experiment. Used for telemetry, and other * machine-oriented use cases. Used as a display name if `userFacingName` is @@ -41,7 +41,7 @@ * ISO-formatted date string of when temporary errors with this experiment * should not longer be considered temporary. After this point, further errors * will result in unenrollment. - * @property {Object} preferences + * @property {object} preferences * An object consisting of all the preferences that are set by this experiment. * Keys are the name of each preference affected by this experiment. Values are * Preference Objects, about which see below. @@ -106,7 +106,7 @@ const DefaultPreferences = Services.prefs.getDefaultBranch(""); /** * Enum storing Preference modules for each type of preference branch. * - * @enum {Object} + * @enum {object} */ const PreferenceBranchType = { user: UserPreferences, @@ -323,7 +323,7 @@ export var PreferenceExperiments = { /** * Start a new preference experiment. * - * @param {Object} experiment + * @param {object} experiment * @param {string} experiment.slug * @param {string} experiment.actionName The action who knows about this * experiment and is responsible for cleaning it up. This should @@ -584,7 +584,7 @@ export var PreferenceExperiments = { * Check if a preference observer is active for an experiment. * * @param {string} experimentSlug - * @return {Boolean} + * @return {boolean} */ hasObserver(experimentSlug) { log.debug(`PreferenceExperiments.hasObserver(${experimentSlug})`); @@ -699,11 +699,11 @@ export var PreferenceExperiments = { * reset the associated preference to its previous value. * * @param {string} experimentSlug - * @param {Object} options + * @param {object} options * @param {boolean} [options.resetValue = true] * If true, reset the preference to its original value prior to * the experiment. Optional, defaults to true. - * @param {String} [options.reason = "unknown"] + * @param {string} [options.reason = "unknown"] * Reason that the experiment is ending. Optional, defaults to * "unknown". * @rejects {Error} diff --git a/toolkit/components/normandy/lib/PreferenceRollouts.sys.mjs b/toolkit/components/normandy/lib/PreferenceRollouts.sys.mjs @@ -77,7 +77,7 @@ function getDatabase() { * Get a transaction for interacting with the rollout store. * * @param {IDBDatabase} db - * @param {String} mode Either "readonly" or "readwrite" + * @param {string} mode Either "readonly" or "readwrite" * * NOTE: Methods on the store returned by this function MUST be called * synchronously, otherwise the transaction with the store will expire. diff --git a/toolkit/components/normandy/lib/RecipeRunner.sys.mjs b/toolkit/components/normandy/lib/RecipeRunner.sys.mjs @@ -388,7 +388,7 @@ export var RecipeRunner = { * * This is used to pre-filter recipes that aren't compatible with this client. * - * @returns {Set<String>} The capabilities supported by this client. + * @returns {Set<string>} The capabilities supported by this client. */ getCapabilities() { let capabilities = new Set([ @@ -464,7 +464,7 @@ export var RecipeRunner = { * @param {object} recipe * @param {object} signature * @param {string} recipe.filter_expression The expression to evaluate against the environment. - * @param {Set<String>} runnerCapabilities The capabilities provided by this runner. + * @param {Set<string>} runnerCapabilities The capabilities provided by this runner. * @return {Promise<BaseAction.suitability>} The recipe's suitability */ async getRecipeSuitability(recipe, signature) { diff --git a/toolkit/components/normandy/test/browser/browser_PreferenceExperiments.js b/toolkit/components/normandy/test/browser/browser_PreferenceExperiments.js @@ -214,7 +214,7 @@ const migrationsInfo = [ * Make a mock `JsonFile` object with a no-op `saveSoon` method and a deep copy * of the data passed. * - * @param {Object} data the data in the store + * @param {object} data the data in the store */ function makeMockJsonFile(data = {}) { return { diff --git a/toolkit/components/passwordmgr/InsecurePasswordUtils.sys.mjs b/toolkit/components/passwordmgr/InsecurePasswordUtils.sys.mjs @@ -65,7 +65,7 @@ export const InsecurePasswordUtils = { * * @param {FormLike} aForm A form-like object. @See {FormLikeFactory} * - * @returns {Object} An object with the following boolean values: + * @returns {object} An object with the following boolean values: * isFormSubmitHTTP: if the submit action is an http:// URL * isFormSubmitSecure: if the submit action URL is secure, * either because it is HTTPS or because its origin is considered trustworthy diff --git a/toolkit/components/passwordmgr/LoginCSVImport.sys.mjs b/toolkit/components/passwordmgr/LoginCSVImport.sys.mjs @@ -105,7 +105,7 @@ export class LoginCSVImport { * Existing logins may be updated in the process. * * @param {string} filePath - * @returns {Object[]} An array of rows where each is mapped to a row in the CSV and it's import information. + * @returns {object[]} An array of rows where each is mapped to a row in the CSV and it's import information. */ static async importFromCSV(filePath) { let csvColumnToFieldMap = LoginCSVImport._getCSVColumnToFieldMap(); diff --git a/toolkit/components/passwordmgr/LoginHelper.sys.mjs b/toolkit/components/passwordmgr/LoginHelper.sys.mjs @@ -357,7 +357,7 @@ class ImportRowProcessor { * It makes sure that if the `timePasswordChanged` field is present it will be used to decide if it's a "no_change" or "added". * The entry with the oldest `timePasswordChanged` will be "added", the rest will be "no_change". * - * @returns {Object[]} An entry for each processed row containing how the row was processed and the login data. + * @returns {object[]} An entry for each processed row containing how the row was processed and the login data. */ async processLoginsAndBuildSummary() { this.markLastTimePasswordChangedAsModified(); @@ -631,7 +631,7 @@ export const LoginHelper = { /** * Returns a new XPCOM property bag with the provided properties. * - * @param {Object} aProperties + * @param {object} aProperties * Each property of this object is copied to the property bag. This * parameter can be omitted to return an empty property bag. * @@ -659,7 +659,7 @@ export const LoginHelper = { * * @deprecated Use Services.logins.searchLoginsAsync instead. * - * @param {Object} aSearchOptions - A regular JS object to copy to a property bag before searching + * @param {object} aSearchOptions - A regular JS object to copy to a property bag before searching * @return {nsILoginInfo[]} - The result of calling searchLogins. */ searchLoginsWithObject(aSearchOptions) { @@ -694,9 +694,9 @@ export const LoginHelper = { }, /** - * @param {String} aLoginOrigin - An origin value from a stored login's + * @param {string} aLoginOrigin - An origin value from a stored login's * origin or formActionOrigin properties. - * @param {String} aSearchOrigin - The origin that was are looking to match + * @param {string} aSearchOrigin - The origin that was are looking to match * with aLoginOrigin. This would normally come * from a form or page that we are considering. * @param {nsILoginFindOptions} aOptions - Options to affect whether the origin @@ -1274,11 +1274,11 @@ export const LoginHelper = { * * @param {Element} element * the field we want to check. - * @param {Object} options + * @param {object} options * @param {bool} [options.ignoreConnect] - Whether to ignore checking isConnected * of the element. * - * @returns {Boolean} true if the field can + * @returns {boolean} true if the field can * be treated as a password input */ isPasswordFieldType(element, { ignoreConnect = false } = {}) { @@ -1290,11 +1290,11 @@ export const LoginHelper = { * * @param {Element} element * the field we want to check. - * @param {Object} options + * @param {object} options * @param {bool} [options.ignoreConnect] - Whether to ignore checking isConnected * of the element. * - * @returns {Boolean} true if the field type is one + * @returns {boolean} true if the field type is one * of the username types. */ isUsernameFieldType(element, { ignoreConnect = false } = {}) { @@ -1421,8 +1421,8 @@ export const LoginHelper = { * For each login, add the login to the password manager if a similar one * doesn't already exist. Merge it otherwise with the similar existing ones. * - * @param {Object[]} loginDatas - For each login, the data that needs to be added. - * @returns {Object[]} An entry for each processed row containing how the row was processed and the login data. + * @param {object[]} loginDatas - For each login, the data that needs to be added. + * @returns {object[]} An entry for each processed row containing how the row was processed and the login data. */ async maybeImportLogins(loginDatas) { // by setting this flag we ensure no events are submitted diff --git a/toolkit/components/passwordmgr/LoginManager.shared.sys.mjs b/toolkit/components/passwordmgr/LoginManager.shared.sys.mjs @@ -92,11 +92,11 @@ class Logic { * * @param {Element} element * the field we want to check. - * @param {Object} options + * @param {object} options * @param {bool} [options.ignoreConnect] - Whether to ignore checking isConnected * of the element. * - * @returns {Boolean} true if the field type is one + * @returns {boolean} true if the field type is one * of the username types. */ static isUsernameFieldType(element, { ignoreConnect = false } = {}) { @@ -142,11 +142,11 @@ class Logic { * * @param {Element} element * the field we want to check. - * @param {Object} options + * @param {object} options * @param {bool} [options.ignoreConnect] - Whether to ignore checking isConnected * of the element. * - * @returns {Boolean} true if the field can + * @returns {boolean} true if the field can * be treated as a password input */ static isPasswordFieldType(element, { ignoreConnect = false } = {}) { @@ -261,7 +261,7 @@ class Logic { * @example * // Returns a Map with a key-value pair of "allowed": "ascii-printable" * transformRulesToMap([{ _name: "allowed", value: [{ _name: "ascii-printable" }] }]) - * @param {Object[]} rules rules from PasswordRulesParser.parsePasswordRules + * @param {object[]} rules rules from PasswordRulesParser.parsePasswordRules * @return {Map} mapped rules */ static transformRulesToMap(rules) { diff --git a/toolkit/components/passwordmgr/LoginManager.sys.mjs b/toolkit/components/passwordmgr/LoginManager.sys.mjs @@ -354,9 +354,9 @@ LoginManager.prototype = { /** * Get a list of all origins for which logins are disabled. * - * @param {Number} count - only needed for XPCOM. + * @param {number} count - only needed for XPCOM. * - * @return {String[]} of disabled origins. If there are no disabled origins, + * @return {string[]} of disabled origins. If there are no disabled origins, * the array is empty. */ getAllDisabledHosts() { diff --git a/toolkit/components/passwordmgr/LoginManagerChild.sys.mjs b/toolkit/components/passwordmgr/LoginManagerChild.sys.mjs @@ -541,7 +541,7 @@ export class LoginFormState { * * @param {HTMLInputElement} aUsernameField element contained in a LoginForm * cached in LoginFormFactory. - * @returns {Boolean} whether the username and password fields still have the + * @returns {boolean} whether the username and password fields still have the * last-filled values, if previously filled. */ #isLoginAlreadyFilled(aUsernameField) { @@ -780,7 +780,7 @@ export class LoginFormState { * * @param {FormLike} form * the form to check. - * @param {Object} recipe=null + * @param {object} recipe=null * A relevant field override recipe to use. * @returns {Element} The username field or null (if the form is not a * username-only form). @@ -825,11 +825,11 @@ export class LoginFormState { /** * @param {LoginForm} form - the LoginForm to look for password fields in. - * @param {Object} options + * @param {object} options * @param {bool} [options.skipEmptyFields=false] - Whether to ignore password fields with no value. * Used at capture time since saving empty values isn't * useful. - * @param {Object} [options.fieldOverrideRecipe=null] - A relevant field override recipe to use. + * @param {object} [options.fieldOverrideRecipe=null] - A relevant field override recipe to use. * @return {Array|null} Array of password field elements for the specified form. * If no pw fields are found, or if more than 5 are found, then null * is returned. @@ -984,10 +984,10 @@ export class LoginFormState { * @param {LoginForm} form * @param {bool} isSubmission * @param {Set} recipes - * @param {Object} options + * @param {object} options * @param {bool} [options.ignoreConnect] - Whether to ignore checking isConnected * of the element. - * @return {Object} {usernameField, newPasswordField, oldPasswordField, confirmPasswordField} + * @return {object} {usernameField, newPasswordField, oldPasswordField, confirmPasswordField} * * usernameField may be null. * newPasswordField may be null. If null, this is a username-only form. @@ -1272,7 +1272,7 @@ export class LoginFormState { * @param {Element} aField * A form field we want to verify. * - * @returns {Object} an object with information about the + * @returns {object} an object with information about the * LoginForm username and password field * or null if the passed field is invalid. */ @@ -1512,7 +1512,7 @@ export class LoginManagerChild extends JSWindowActorChild { * Get relevant logins and recipes from the parent * * @param {HTMLFormElement} form - form to get login data for - * @param {Object} options + * @param {object} options * @param {boolean} options.guid - guid of a login to retrieve * @param {boolean} options.showPrimaryPassword - whether to show a primary password prompt */ @@ -2311,7 +2311,7 @@ export class LoginManagerChild extends JSWindowActorChild { * generated password being filled into a form-like element. * @param {boolean?} options.ignoreConnect Whether to ignore isConnected attribute of a element. * - * @returns {Boolean} whether the message is sent to the parent process. + * @returns {boolean} whether the message is sent to the parent process. */ _maybeSendFormInteractionMessage( form, @@ -2712,7 +2712,7 @@ export class LoginManagerChild extends JSWindowActorChild { * which are only used when the fill is userTriggered * @param {Set} recipes a set of recipes that could be used to affect how the * form is filled - * @param {Object} [options = {}] a list of options for this method + * @param {object} [options = {}] a list of options for this method * @param {HTMLInputElement} [options.inputElement = null] an optional target * input element we want to fill * @param {bool} [options.autofillForm = false] denotes if we should fill the diff --git a/toolkit/components/passwordmgr/LoginManagerContextMenu.sys.mjs b/toolkit/components/passwordmgr/LoginManagerContextMenu.sys.mjs @@ -15,7 +15,7 @@ export const LoginManagerContextMenu = { /** * Look for login items and add them to the contextual menu. * - * @param {Object} inputElementIdentifier + * @param {object} inputElementIdentifier * An identifier generated for the input element via ContentDOMReference. * @param {xul:browser} browser * The browser for the document the context menu was open on. @@ -168,7 +168,7 @@ export const LoginManagerContextMenu = { /** * @param {nsILoginInfo} login * The login we want to fill the form with. - * @param {Object} inputElementIdentifier + * @param {object} inputElementIdentifier * An identifier generated for the input element via ContentDOMReference. * @param {xul:browser} browser * The target tab browser. diff --git a/toolkit/components/passwordmgr/LoginManagerParent.sys.mjs b/toolkit/components/passwordmgr/LoginManagerParent.sys.mjs @@ -160,7 +160,7 @@ Services.ppmm.addMessageListener("PasswordManager:findRecipes", message => { * Lazily create a Map of origins to array of browsers with importable logins. * * @param {origin} formOrigin - * @returns {Object?} containing array of migration browsers and experiment state. + * @returns {object?} containing array of migration browsers and experiment state. */ async function getImportableLogins(formOrigin) { // Include the experiment state for data and UI decisions; otherwise skip @@ -1152,8 +1152,8 @@ export class LoginManagerParent extends JSWindowActorParent { * @param {string} formOrigin * @param {string} options.formActionOrigin * @param {string?} options.autoFilledLoginGuid - * @param {Object} options.newPasswordField - * @param {Object?} options.usernameField + * @param {object} options.newPasswordField + * @param {object?} options.usernameField * @param {Element?} options.oldPasswordField * @param {boolean} [options.triggeredByFillingGenerated = false] */ diff --git a/toolkit/components/passwordmgr/LoginManagerPrompter.sys.mjs b/toolkit/components/passwordmgr/LoginManagerPrompter.sys.mjs @@ -108,8 +108,8 @@ export class LoginManagerPrompter { * @param {object?} possibleValues * Contains values from anything that we think, but are not sure, might be * a username or password. Has two properties, 'usernames' and 'passwords'. - * @param {Set<String>} possibleValues.usernames - * @param {Set<String>} possibleValues.passwords + * @param {Set<string>} possibleValues.usernames + * @param {Set<string>} possibleValues.passwords */ promptToSavePassword( aBrowser, @@ -170,8 +170,8 @@ export class LoginManagerPrompter { * @param {object?} possibleValues * Contains values from anything that we think, but are not sure, might be * a username or password. Has two properties, 'usernames' and 'passwords'. - * @param {Set<String>} possibleValues.usernames - * @param {Set<String>} possibleValues.passwords + * @param {Set<string>} possibleValues.usernames + * @param {Set<string>} possibleValues.passwords */ static _showLoginCaptureDoorhanger( browser, @@ -750,8 +750,8 @@ export class LoginManagerPrompter { * @param {object?} possibleValues * Contains values from anything that we think, but are not sure, might be * a username or password. Has two properties, 'usernames' and 'passwords'. - * @param {Set<String>} possibleValues.usernames - * @param {Set<String>} possibleValues.passwords + * @param {Set<string>} possibleValues.usernames + * @param {Set<string>} possibleValues.passwords */ promptToChangePassword( aBrowser, @@ -899,7 +899,7 @@ export class LoginManagerPrompter { * Retrieves the message of the given id from fluent * and extracts the label and accesskey * - * @param {String} id message id + * @param {string} id message id * @returns label and accesskey */ static getLabelAndAccessKey(id) { @@ -951,7 +951,7 @@ export class LoginManagerPrompter { * login to use as filter. * @param {nsILoginInfo[]} aLoginList * Array of logins to filter. - * @param {String} includeGUID + * @param {string} includeGUID * guid value for login that not be filtered out * @returns {nsILoginInfo[]} the filtered array of logins. */ @@ -968,7 +968,7 @@ export class LoginManagerPrompter { * Set the values that will be used the next time the username autocomplete popup is opened. * * @param {nsILoginInfo} login - used only for its information about the current domain. - * @param {Set<String>?} possibleUsernames - values that we believe may be new/changed login usernames. + * @param {Set<string>?} possibleUsernames - values that we believe may be new/changed login usernames. */ static async _setUsernameAutocomplete(login, possibleUsernames = new Set()) { const result = Cc[ @@ -999,7 +999,7 @@ export class LoginManagerPrompter { /** * @param {nsILoginInfo} login - used only for its information about the current domain. - * @param {Set<String>?} possibleUsernames - values that we believe may be new/changed login usernames. + * @param {Set<string>?} possibleUsernames - values that we believe may be new/changed login usernames. * * @returns {object[]} an ordered list of usernames to be used the next time the username autocomplete popup is opened. */ diff --git a/toolkit/components/passwordmgr/LoginRecipes.sys.mjs b/toolkit/components/passwordmgr/LoginRecipes.sys.mjs @@ -33,7 +33,7 @@ ChromeUtils.defineLazyGetter(lazy, "log", () => * calling methods on the object. * * @constructor - * @param {String} [aOptions.defaults=null] the URI to load the recipes from. + * @param {string} [aOptions.defaults=null] the URI to load the recipes from. * If it's null, nothing is loaded. */ export function LoginRecipesParent(aOptions = { defaults: null }) { @@ -66,13 +66,13 @@ LoginRecipesParent.prototype = { _recipesByHost: null, /** - * @type {Object} Instance of Remote Settings client that has access to the + * @type {object} Instance of Remote Settings client that has access to the * "password-recipes" collection */ _rsClient: null, /** - * @param {Object} aRecipes an object containing recipes to load for use. The object + * @param {object} aRecipes an object containing recipes to load for use. The object * should be compatible with JSON (e.g. no RegExp). * @return {Promise} resolving when the recipes are loaded */ @@ -141,7 +141,7 @@ LoginRecipesParent.prototype = { /** * Validate the recipe is sane and then add it to the set of recipes. * - * @param {Object} recipe + * @param {object} recipe */ add(recipe) { let recipeKeys = Object.keys(recipe); @@ -197,7 +197,7 @@ LoginRecipesParent.prototype = { /** * Currently only exact host matches are returned but this will eventually handle parent domains. * - * @param {String} aHost (e.g. example.com:8080 [non-default port] or sub.example.com) + * @param {string} aHost (e.g. example.com:8080 [non-default port] or sub.example.com) * @return {Set} of recipes that apply to the host ordered by host priority */ getRecipesForHost(aHost) { @@ -212,7 +212,7 @@ LoginRecipesParent.prototype = { /** * Handles the Remote Settings sync event for the "password-recipes" collection. * - * @param {Object} aEvent + * @param {object} aEvent * @param {Array} event.current Records in the "password-recipes" collection after the sync event * @param {Array} event.created Records that were created with this particular sync * @param {Array} event.updated Records that were updated with this particular sync @@ -242,8 +242,8 @@ export const LoginRecipesContent = { /** * Locally caches recipes for a given host. * - * @param {String} aHost (e.g. example.com:8080 [non-default port] or sub.example.com) - * @param {Object} win - the window of the host + * @param {string} aHost (e.g. example.com:8080 [non-default port] or sub.example.com) + * @param {object} win - the window of the host * @param {Set} recipes - recipes that apply to the host */ cacheRecipes(aHost, win, recipes) { @@ -261,8 +261,8 @@ export const LoginRecipesContent = { * Tries to fetch recipes for a given host, using a local cache if possible. * Otherwise, the recipes are cached for later use. * - * @param {String} aHost (e.g. example.com:8080 [non-default port] or sub.example.com) - * @param {Object} win - the window of the host + * @param {string} aHost (e.g. example.com:8080 [non-default port] or sub.example.com) + * @param {object} win - the window of the host * @return {Set} of recipes that apply to the host */ getRecipes(aHost, win) { @@ -323,7 +323,7 @@ export const LoginRecipesContent = { * * @param {Set} aRecipes The set of recipes to consider for the form * @param {FormLike} aForm The form where login fields exist. - * @return {Object} The recipe that is most applicable for the form. + * @return {object} The recipe that is most applicable for the form. */ getFieldOverrides(aRecipes, aForm) { let recipes = this._filterRecipesForForm(aRecipes, aForm); diff --git a/toolkit/components/passwordmgr/LoginRelatedRealms.sys.mjs b/toolkit/components/passwordmgr/LoginRelatedRealms.sys.mjs @@ -31,7 +31,7 @@ export class LoginRelatedRealmsParent extends JSWindowActorParent { /** * Handles the Remote Settings sync event * - * @param {Object} aEvent + * @param {object} aEvent * @param {Array} aEvent.current Records that are currently in the collection after the sync event * @param {Array} aEvent.created Records that were created * @param {Array} aEvent.updated Records that were updated diff --git a/toolkit/components/passwordmgr/shared/PasswordGenerator.sys.mjs b/toolkit/components/passwordmgr/shared/PasswordGenerator.sys.mjs @@ -43,7 +43,7 @@ DEFAULT_RULES.set(REQUIRED, [UPPER, LOWER, DIGIT, SPECIAL]); export const PasswordGenerator = { /** - * @param {Object} options + * @param {object} options * @param {number} options.length - length of the generated password if there are no rules that override the length * @param {Map} options.rules - map of password rules * @returns {string} password that was generated diff --git a/toolkit/components/passwordmgr/storage-json.sys.mjs b/toolkit/components/passwordmgr/storage-json.sys.mjs @@ -750,9 +750,9 @@ export class LoginManagerStorage_json { /** * Checks if the given login item matches the specified matchData. * - * @param {Object} aLoginItem The login item to check. - * @param {Object} aMatchData The match data to compare against. keyed by - * @param {Object} [aOptions] Additional options for matching + * @param {object} aLoginItem The login item to check. + * @param {object} aMatchData The match data to compare against. keyed by + * @param {object} [aOptions] Additional options for matching * * @returns {boolean} - Returns true if the login item matches the match data, */ diff --git a/toolkit/components/passwordmgr/test/browser/browser_basicAuth_multiTab.js b/toolkit/components/passwordmgr/test/browser/browser_basicAuth_multiTab.js @@ -18,13 +18,13 @@ const AUTH_PATH = /** * Opens a tab and navigates to the auth test path. * - * @param {String} origin - Origin to open with test path. - * @param {Object} authOptions - Authentication options to pass to server and + * @param {string} origin - Origin to open with test path. + * @param {object} authOptions - Authentication options to pass to server and * test for. - * @param {String} authOptions.user - Expected username. - * @param {String} authOptions.pass - Expected password. - * @param {String} authOptions.realm - Realm to return on auth request. - * @returns {Object} - An object containing passed origin and authOptions, + * @param {string} authOptions.user - Expected username. + * @param {string} authOptions.pass - Expected password. + * @param {string} authOptions.realm - Realm to return on auth request. + * @returns {object} - An object containing passed origin and authOptions, * opened tab, a promise which resolves once the tab loads, a promise which * resolves once the prompt has been opened. */ @@ -56,7 +56,7 @@ async function openTabWithAuthPrompt(origin, authOptions) { * Waits for tab to load and tests for expected auth state. * * @param {boolean} expectAuthed - true: auth success, false otherwise. - * @param {Object} tabInfo - Information about the tab as generated by + * @param {object} tabInfo - Information about the tab as generated by * openTabWithAuthPrompt. */ async function testTabAuthed(expectAuthed, { tab, loadPromise, authOptions }) { diff --git a/toolkit/components/passwordmgr/test/browser/browser_context_menu.js b/toolkit/components/passwordmgr/test/browser/browser_context_menu.js @@ -602,7 +602,7 @@ async function assertContextMenuFill( * Check if every login that matches the page origin are available at the context menu. * * @param {Element} contextMenu - * @param {Number} expectedCount - Number of logins expected in the context menu. Used to ensure + * @param {number} expectedCount - Number of logins expected in the context menu. Used to ensure * we continue testing something useful. */ function checkMenu(contextMenu, expectedCount) { diff --git a/toolkit/components/passwordmgr/test/browser/browser_telemetry_SignUpFormRuleset.js b/toolkit/components/passwordmgr/test/browser/browser_telemetry_SignUpFormRuleset.js @@ -5,7 +5,7 @@ const TEST_URL = `https://example.com${DIRECTORY_PATH}form_signup_detection.html /** * - * @param {Object} histogramData The histogram data to examine + * @param {object} histogramData The histogram data to examine * @returns The amount of entries found in the histogram data */ function countEntries(histogramData) { @@ -15,8 +15,8 @@ function countEntries(histogramData) { } /** - * @param {String} id The histogram to examine - * @param {Number} expected The expected amount of entries for a histogram + * @param {string} id The histogram to examine + * @param {number} expected The expected amount of entries for a histogram */ async function countEntriesOfChildHistogram(id, expected) { let histogram; diff --git a/toolkit/components/passwordmgr/test/browser/head.js b/toolkit/components/passwordmgr/test/browser/head.js @@ -54,7 +54,7 @@ registerCleanupFunction( /** * Compared logins in storage to expected values * - * @param {array} expectedLogins + * @param {Array} expectedLogins * An array of expected login properties * @return {nsILoginInfo[]} - All saved logins sorted by timeCreated */ @@ -117,7 +117,7 @@ async function verifyLogins(expectedLogins = []) { * Submit the content form and return a promise resolving to the username and * password values echoed out in the response * - * @param {Object} [browser] - browser with the form + * @param {object} [browser] - browser with the form * @param {String = ""} formAction - Optional url to set the form's action to before submitting * @param {Object = null} selectorValues - Optional object with field values to set before form submission * @param {Object = null} responseSelectors - Optional object with selectors to find the username and password in the response @@ -178,8 +178,8 @@ async function submitFormAndGetResults( * Wait for a given result page to load and return a promise resolving to an object with the parsed-out * username/password values from the response * - * @param {Object} [browser] - browser which is loading this page - * @param {String} resultURL - the path or filename to look for in the content.location + * @param {object} [browser] - browser which is loading this page + * @param {string} resultURL - the path or filename to look for in the content.location * @param {Object = null} - Optional object with selectors to find the username and password in the response */ async function getFormSubmitResponseResult( @@ -224,9 +224,9 @@ async function getFormSubmitResponseResult( * Loads a test page in `DIRECTORY_URL` which automatically submits to formsubmit.sjs and returns a * promise resolving with the field values when the optional `aTaskFn` is done. * - * @param {String} aPageFile - test page file name which auto-submits to formsubmit.sjs + * @param {string} aPageFile - test page file name which auto-submits to formsubmit.sjs * @param {Function} aTaskFn - task which can be run before the tab closes. - * @param {String} [aOrigin="https://example.com"] - origin of the server to use + * @param {string} [aOrigin="https://example.com"] - origin of the server to use * to load `aPageFile`. */ function testSubmittingLoginForm( @@ -257,9 +257,9 @@ function testSubmittingLoginForm( * Loads a test page in `DIRECTORY_URL` which automatically submits to formsubmit.sjs and returns a * promise resolving with the field values when the optional `aTaskFn` is done. * - * @param {String} aPageFile - test page file name which auto-submits to formsubmit.sjs + * @param {string} aPageFile - test page file name which auto-submits to formsubmit.sjs * @param {Function} aTaskFn - task which can be run before the tab closes. - * @param {String} [aOrigin="http://example.com"] - origin of the server to use + * @param {string} [aOrigin="http://example.com"] - origin of the server to use * to load `aPageFile`. */ function testSubmittingLoginFormHTTP( @@ -321,9 +321,9 @@ const REMOVE_LOGIN_MENUITEM = 0; * Checks if we have a password capture popup notification * of the right type and with the right label. * - * @param {String} aKind The desired `passwordNotificationType` ("any" for any type) - * @param {Object} [popupNotifications = PopupNotifications] - * @param {Object} [browser = null] Optional browser whose notifications should be searched. + * @param {string} aKind The desired `passwordNotificationType` ("any" for any type) + * @param {object} [popupNotifications = PopupNotifications] + * @param {object} [browser = null] Optional browser whose notifications should be searched. * @return the found password popup notification. */ function getCaptureDoorhanger( @@ -424,7 +424,7 @@ function getDoorhangerButton(aPopup, aButtonIndex) { * Clicks the specified popup notification button. * * @param {Element} aPopup Popup Notification element - * @param {Number} aButtonIndex Number indicating which button to click. + * @param {number} aButtonIndex Number indicating which button to click. * See the constants in this file. */ function clickDoorhangerButton(aPopup, aButtonIndex) { @@ -477,8 +477,8 @@ async function clearMessageCache(browser) { /** * Checks the doorhanger's username and password. * - * @param {String} username The username. - * @param {String} password The password. + * @param {string} username The username. + * @param {string} password The password. */ async function checkDoorhangerUsernamePassword(username, password) { await BrowserTestUtils.waitForCondition(() => { @@ -500,7 +500,7 @@ async function checkDoorhangerUsernamePassword(username, password) { * An optional string value to replace whatever is in the password field * @param {string} [newValues.username = undefined] * An optional string value to replace whatever is in the username field - * @param {Object} [popupNotifications = PopupNotifications] + * @param {object} [popupNotifications = PopupNotifications] */ async function updateDoorhangerInputValues( newValues, diff --git a/toolkit/components/passwordmgr/test/mochitest/pwmgr_common.js b/toolkit/components/passwordmgr/test/mochitest/pwmgr_common.js @@ -825,9 +825,9 @@ async function promisePromptShown(expectedTopic) { /** * Run a function synchronously in the parent process and destroy it in the test cleanup function. * - * @param {Function|String} aFunctionOrURL - either a function that will be stringified and run + * @param {Function | string} aFunctionOrURL - either a function that will be stringified and run * or the URL to a JS file. - * @return {Object} - the return value of loadChromeScript providing message-related methods. + * @return {object} - the return value of loadChromeScript providing message-related methods. * @see loadChromeScript in specialpowersAPI.js */ function runInParent(aFunctionOrURL) { @@ -893,7 +893,7 @@ function manageLoginsInParent() { /** * Initialize with a list of logins. The logins are added within the parent chrome process. * - * @param {array} aLogins - a list of logins to add. Each login is an array of the arguments + * @param {Array} aLogins - a list of logins to add. Each login is an array of the arguments * that would be passed to nsLoginInfo.init(). */ async function addLoginsInParent(...aLogins) { @@ -906,7 +906,7 @@ async function addLoginsInParent(...aLogins) { * Initialize with a list of logins, after removing all user facing logins. * The logins are added within the parent chrome process. * - * @param {array} aLogins - a list of logins to add. Each login is an array of the arguments + * @param {Array} aLogins - a list of logins to add. Each login is an array of the arguments * that would be passed to nsLoginInfo.init(). */ async function setStoredLoginsAsync(...aLogins) { @@ -921,7 +921,7 @@ async function setStoredLoginsAsync(...aLogins) { * removed and finally restored when the test is finished. * The logins are added within the parent chrome process. * - * @param {array} logins - a list of logins to add. Each login is an array of the arguments + * @param {Array} logins - a list of logins to add. Each login is an array of the arguments * that would be passed to nsLoginInfo.init(). */ async function setStoredLoginsDuringTest(...logins) { @@ -939,7 +939,7 @@ async function setStoredLoginsDuringTest(...logins) { * Sets given logins for the duration of the task. Existing logins are first * removed and finally restored when the task is finished. * - * @param {array} logins - a list of logins to add. Each login is an array of the arguments + * @param {Array} logins - a list of logins to add. Each login is an array of the arguments * that would be passed to nsLoginInfo.init(). */ async function setStoredLoginsDuringTask(...logins) { @@ -1116,7 +1116,7 @@ this.LoginManager = new Proxy( * Returns the first child node of the newly created content div for convenient * access of the newly created dom node. * - * @param {String} html + * @param {string} html * string of dom content or dom element to be inserted into content element */ function setContentForTask(html) { @@ -1168,7 +1168,7 @@ SimpleTest.registerTaskCleanupFunction(() => { * Works with forms processed in the past since the task started and in the future, * across parent and child processes. * - * @param {String} formId / the id of the form of which to expect formautofill events + * @param {string} formId / the id of the form of which to expect formautofill events * @returns promise, resolving with the autofill result. */ async function formAutofillResult(formId) { diff --git a/toolkit/components/passwordmgr/test/unit/test_logins_change.js b/toolkit/components/passwordmgr/test/unit/test_logins_change.js @@ -66,10 +66,10 @@ async function checkLoginInvalid(aLoginInfo, aExpectedError) { * Verifies that two objects are not the same instance * but have equal attributes. * - * @param {Object} objectA + * @param {object} objectA * An object to compare. * - * @param {Object} objectB + * @param {object} objectB * Another object to compare. * * @param {string[]} attributes diff --git a/toolkit/components/passwordmgr/test/unit/test_module_LoginCSVImport.js b/toolkit/components/passwordmgr/test/unit/test_module_LoginCSVImport.js @@ -69,9 +69,9 @@ function checkLoginNewlyCreated(login) { /** * Asserts histogram telemetry for the categories of logins * - * @param {Object} histogram Histogram object returned from `TelemetryTestUtils.getAndClearHistogram()` - * @param {Number} index Index representing one of the following values in order: ["added", "modified", "error", "no_change"]. See `toolkit/components/telemetry/Histogram.json` for more information - * @param {Number} expected The expected number of entries in the histogram at the passed index + * @param {object} histogram Histogram object returned from `TelemetryTestUtils.getAndClearHistogram()` + * @param {number} index Index representing one of the following values in order: ["added", "modified", "error", "no_change"]. See `toolkit/components/telemetry/Histogram.json` for more information + * @param {number} expected The expected number of entries in the histogram at the passed index */ function assertHistogramTelemetry(histogram, index, expected) { TTU.assertHistogram(histogram, index, expected); diff --git a/toolkit/components/passwordmgr/test/unit/test_search_schemeUpgrades.js b/toolkit/components/passwordmgr/test/unit/test_search_schemeUpgrades.js @@ -10,7 +10,7 @@ const HTTP_ORIGIN = "http://www.example.com"; * Returns a list of new nsILoginInfo objects that are a subset of the test * data, built to match the specified query. * - * @param {Object} aQuery + * @param {object} aQuery * Each property and value of this object restricts the search to those * entries from the test data that match the property exactly. */ @@ -33,10 +33,10 @@ function buildExpectedLogins(aQuery) { /** * Tests the searchLogins function. * - * @param {Object} aQuery + * @param {object} aQuery * Each property and value of this object is translated to an entry in * the nsIPropertyBag parameter of searchLogins. - * @param {Number} aExpectedCount + * @param {number} aExpectedCount * Number of logins from the test data that should be found. The actual * list of logins is obtained using the buildExpectedLogins helper, and * this value is just used to verify that modifications to the test data diff --git a/toolkit/components/pdfjs/content/PdfStreamConverter.sys.mjs b/toolkit/components/pdfjs/content/PdfStreamConverter.sys.mjs @@ -617,7 +617,7 @@ class ChromeActions { * Set the different editor states in order to be able to update the context * menu. * - * @param {Object} details + * @param {object} details */ updateEditorStates({ details }) { const doc = this.domWindow.document; diff --git a/toolkit/components/pdfjs/test/browser_pdfjs_editing_contextmenu.js b/toolkit/components/pdfjs/test/browser_pdfjs_editing_contextmenu.js @@ -31,8 +31,8 @@ async function openContextMenuAt(browser, x, y) { /** * Open a context menu and get the pdfjs entries * - * @param {Object} browser - * @param {Object} box + * @param {object} browser + * @param {object} box * @returns {Promise<Map<string,HTMLElement>>} the pdfjs menu entries. */ function getContextMenuItems(browser, box) { @@ -70,7 +70,7 @@ function getContextMenuItems(browser, box) { * Open a context menu on the element corresponding to the given selector * and returs the pdfjs menu entries. * - * @param {Object} browser + * @param {object} browser * @param {string} selector * @returns {Promise<Map<string,HTMLElement>>} the pdfjs menu entries. */ @@ -90,7 +90,7 @@ async function getContextMenuItemsOn(browser, selector) { /** * Hide the context menu. * - * @param {Object} browser + * @param {object} browser */ async function hideContextMenu(browser) { await new Promise(resolve => diff --git a/toolkit/components/pdfjs/test/browser_pdfjs_filters.js b/toolkit/components/pdfjs/test/browser_pdfjs_filters.js @@ -7,8 +7,8 @@ const TESTROOT = "https://example.com/browser/" + RELATIVE_DIR; /** * Get the number of red pixels in the canvas. * - * @param {Object} browser - * @returns {Object} + * @param {object} browser + * @returns {object} */ async function getRedPixels(browser) { return SpecialPowers.spawn(browser, [], async function () { diff --git a/toolkit/components/pdfjs/test/browser_pdfjs_hcm.js b/toolkit/components/pdfjs/test/browser_pdfjs_hcm.js @@ -7,8 +7,8 @@ const TESTROOT = "http://example.com/browser/" + RELATIVE_DIR; /** * Get the first and last pixels on the drawn canvas. * - * @param {Object} browser - * @returns {Object} + * @param {object} browser + * @returns {object} */ async function getFirstLastPixels(browser) { return SpecialPowers.spawn(browser, [], async function () { diff --git a/toolkit/components/pdfjs/test/browser_pdfjs_jpeg2000.js b/toolkit/components/pdfjs/test/browser_pdfjs_jpeg2000.js @@ -7,8 +7,8 @@ const TESTROOT = "https://example.com/browser/" + RELATIVE_DIR; /** * Get the the pixels on the drawn canvas. * - * @param {Object} browser - * @returns {Object} + * @param {object} browser + * @returns {object} */ async function getPixels(browser) { return SpecialPowers.spawn(browser, [], async function () { diff --git a/toolkit/components/pdfjs/test/head.js b/toolkit/components/pdfjs/test/head.js @@ -186,7 +186,7 @@ async function waitForTelemetry(browser) { /** * Enable an editor (Ink, FreeText, ...). * - * @param {Object} browser + * @param {object} browser * @param {string} name */ async function enableEditor(browser, name, expectedPageRendered) { @@ -234,9 +234,9 @@ async function enableEditor(browser, name, expectedPageRendered) { /** * The text layer contains some spans with the text of the pdf. * - * @param {Object} browser + * @param {object} browser * @param {string} text - * @returns {Object} the bbox of the span containing the text. + * @returns {object} the bbox of the span containing the text. */ async function getSpanBox(browser, text, pageNumber = 1) { return SpecialPowers.spawn( @@ -277,7 +277,7 @@ async function getSpanBox(browser, text, pageNumber = 1) { /** * Count the number of elements corresponding to the given selector. * - * @param {Object} browser + * @param {object} browser * @param {string} selector * @returns */ @@ -294,7 +294,7 @@ async function countElements(browser, selector) { /** * Click at the given coordinates. * - * @param {Object} browser + * @param {object} browser * @param {number} x * @param {number} y * @param {number} n @@ -327,7 +327,7 @@ async function clickAt(browser, x, y, n = 1) { /** * Click on the element corresponding to the given selector. * - * @param {Object} browser + * @param {object} browser * @param {string} selector */ async function clickOn(browser, selector) { @@ -355,7 +355,7 @@ function focusEditorLayer(browser) { /** * Focus an element corresponding to the given selector. * - * @param {Object} browser + * @param {object} browser * @param {string} selector * @returns */ @@ -394,7 +394,7 @@ async function hitKey(browser, char) { /** * Write some text using the keyboard. * - * @param {Object} browser + * @param {object} browser * @param {string} text */ async function write(browser, text) { @@ -415,9 +415,9 @@ async function escape(browser) { /** * Add a FreeText annotation and write some text inside. * - * @param {Object} browser + * @param {object} browser * @param {string} text - * @param {Object} box + * @param {object} box */ async function addFreeText(browser, text, box) { info("Add FreeText: " + text); diff --git a/toolkit/components/pictureinpicture/PictureInPicture.sys.mjs b/toolkit/components/pictureinpicture/PictureInPicture.sys.mjs @@ -520,7 +520,7 @@ export var PictureInPicture = { * respective WindowGlobal. * * @param {BrowsingContext} browsingContext The BrowsingContext with eligible videos - * @param {Object} object + * @param {object} object * pipCount: The number of eligible videos for the respective WindowGlobal * pipDisabledCount: The number of disablePiP videos for the respective WindowGlobal */ @@ -587,7 +587,7 @@ export var PictureInPicture = { * * @param {Document} document The window document * @param {Element} pipToggle The urlbar PiP button - * @param {String} dataL10nId The data l10n id of the string we want to show + * @param {string} dataL10nId The data l10n id of the string we want to show */ updateUrlbarHoverText(document, pipToggle, dataL10nId) { let shortcut = document.getElementById("key_togglePictureInPicture"); @@ -830,7 +830,7 @@ export var PictureInPicture = { * Closes a single PiP window. Used exclusively in conjunction with support * for multiple PiP windows * - * @param {Object} closeData + * @param {object} closeData * Additional data required to complete a close operation on a PiP window * @param {PictureInPictureParent} closeData.actorRef * The PictureInPictureParent actor associated with the PiP window being closed @@ -1541,7 +1541,7 @@ export var PictureInPicture = { * @param {Screen} screen * The screen we need to get the size and coordinates of * - * @returns {array} + * @returns {Array} * Size and location of screen in desktop pixels. * * screenLeft.value (int): diff --git a/toolkit/components/pictureinpicture/content/player.js b/toolkit/components/pictureinpicture/content/player.js @@ -69,7 +69,7 @@ const BOTTOM_RIGHT_QUADRANT = 4; * Public function to be called from PictureInPicture.sys.mjs. This is the main * entrypoint for initializing the player window. * - * @param {Number} id + * @param {number} id * A unique numeric ID for the window, used for Telemetry Events. * @param {WindowGlobalParent} wgp * The WindowGlobalParent that is hosting the originating video. @@ -85,7 +85,7 @@ function setupPlayer(id, wgp, videoRef, autoFocus) { * Public function to be called from PictureInPicture.sys.mjs. This update the * controls based on whether or not the video is playing. * - * @param {Boolean} isPlaying + * @param {boolean} isPlaying * True if the Picture-in-Picture video is playing. */ function setIsPlayingState(isPlaying) { @@ -96,7 +96,7 @@ function setIsPlayingState(isPlaying) { * Public function to be called from PictureInPicture.sys.mjs. This update the * controls based on whether or not the video is muted. * - * @param {Boolean} isMuted + * @param {boolean} isMuted * True if the Picture-in-Picture video is muted. */ function setIsMutedState(isMuted) { @@ -106,7 +106,7 @@ function setIsMutedState(isMuted) { /** * Function to resize and reposition the PiP window * - * @param {Object} rect + * @param {object} rect * An object containing `left`, `top`, `width`, and `height` for the PiP * window */ @@ -212,7 +212,7 @@ let Player = { /** * Initializes the player browser, and sets up the initial state. * - * @param {Number} id + * @param {number} id * A unique numeric ID for the window, used for Telemetry Events. * @param {WindowGlobalParent} wgp * The WindowGlobalParent that is hosting the originating video. @@ -607,7 +607,7 @@ let Player = { * If the volume is changed via the keyboard, onKeyDown will set * this.preventNextInputEvent to true. * - * @param {Number} volume A number between 0 and 1 that represents the volume + * @param {number} volume A number between 0 and 1 that represents the volume */ handleAudioScrubbing(volume) { // When using the keyboard to adjust the volume, we get both a keydown and @@ -775,7 +775,7 @@ let Player = { /** * Function to toggle the visibility of the subtitles settings panel * - * @param {Object} options [optional] Object containing options for the function + * @param {object} options [optional] Object containing options for the function * - forceHide: true to force hide the subtitles settings panel * - isKeyboard: true if the subtitles button was activated using the keyboard * to show or hide the subtitles settings panel @@ -1272,7 +1272,7 @@ let Player = { * SET isPlaying to true if the video is playing, false otherwise. This will * update the internal state and displayed controls. * - * @type {Boolean} + * @type {boolean} */ get isPlaying() { return this._isPlaying; @@ -1311,7 +1311,7 @@ let Player = { * SET isMuted to true if the video is muted, false otherwise. This will * update the internal state and displayed controls. * - * @type {Boolean} + * @type {boolean} */ get isMuted() { return this._isMuted; @@ -1384,7 +1384,7 @@ let Player = { /** * Makes the player controls visible. * - * @param {Boolean} revealIndefinitely + * @param {boolean} revealIndefinitely * If false, this will hide the controls again after * CONTROLS_FADE_TIMEOUT_MS milliseconds has passed. If true, the controls * will remain visible until revealControls is called again with @@ -1432,9 +1432,9 @@ let Player = { * impose a minimum window size. For other platforms, this function is a * no-op. * - * @param {Number} width + * @param {number} width * The width of the video being played. - * @param {Number} height + * @param {number} height * The height of the video being played. */ computeAndSetMinimumSize(width, height) { diff --git a/toolkit/components/pictureinpicture/tests/browser_changePiPSrcInFullscreen.js b/toolkit/components/pictureinpicture/tests/browser_changePiPSrcInFullscreen.js @@ -19,9 +19,9 @@ async function switchVideoSource(browser, src) { /** * - * @param {Object} actual The actual size and position of the window - * @param {Object} expected The expected size and position of the window - * @param {String} message A message to print before asserting the size and position + * @param {object} actual The actual size and position of the window + * @param {object} expected The expected size and position of the window + * @param {string} message A message to print before asserting the size and position */ function assertEvent(actual, expected, message) { info(message); diff --git a/toolkit/components/pictureinpicture/tests/browser_contextMenu.js b/toolkit/components/pictureinpicture/tests/browser_contextMenu.js @@ -9,10 +9,10 @@ * * @param {Element} browser The <xul:browser> hosting the <video> * - * @param {String} videoID The ID of the video to open the context + * @param {string} videoID The ID of the video to open the context * menu with. * - * @param {Object} modifiers The properties to pass to synthesizeMouseAtCenter. + * @param {object} modifiers The properties to pass to synthesizeMouseAtCenter. * * @returns Promise * @resolves With the context menu DOM node once opened. diff --git a/toolkit/components/pictureinpicture/tests/browser_reversePiP.js b/toolkit/components/pictureinpicture/tests/browser_reversePiP.js @@ -78,7 +78,7 @@ add_task(async () => { * A helper function used to get the "flipped" attribute of the video's shadowRoot's first child. * * @param {Element} browser The <xul:browser> hosting the <video> - * @param {String} videoID The ID of the video being checked + * @param {string} videoID The ID of the video being checked */ async function getFlippedAttribute(browser, videoID) { let videoFlippedAttribute = await SpecialPowers.spawn( diff --git a/toolkit/components/pictureinpicture/tests/browser_text_tracks_webvtt_3.js b/toolkit/components/pictureinpicture/tests/browser_text_tracks_webvtt_3.js @@ -7,10 +7,10 @@ * Verifies the value of a cue's .line property. * * @param {Element} browser The <xul:browser> hosting the <video> - * @param {String} videoID The ID of the video being checked + * @param {string} videoID The ID of the video being checked * @param {Integer} trackIndex The index of the track to be loaded * @param {Integer} cueIndex The index of the cue to be tested on - * @param {Integer|String} expectedValue The expected line value of the cue + * @param {Integer | string} expectedValue The expected line value of the cue */ async function verifyLineForCue( browser, diff --git a/toolkit/components/pictureinpicture/tests/head.js b/toolkit/components/pictureinpicture/tests/head.js @@ -106,7 +106,7 @@ const DEFAULT_TOGGLE_STYLES = { * @param {Element,BrowsingContext} browser The <xul:browser> or * BrowsingContext hosting the <video> * - * @param {String} videoID The ID of the video to trigger + * @param {string} videoID The ID of the video to trigger * Picture-in-Picture on. * * @param {boolean} triggerFn Use the given function to open the pip window, @@ -162,7 +162,7 @@ async function triggerPictureInPicture(browser, videoID, triggerFn) { * @param {Element,BrowsingContext} browser The <xul:browser> or * BrowsingContext hosting the <video> * - * @param {String} videoID The ID of the video to trigger + * @param {string} videoID The ID of the video to trigger * Picture-in-Picture on. * * @param {bool} expected True if we expect the message to be showing. @@ -239,11 +239,11 @@ async function ensureVideosReady(browser) { * a reasonable time. * * @param {Element} browser The <xul:browser> that has the <video> in it. - * @param {String} videoID The ID of the video element that we expect the toggle + * @param {string} videoID The ID of the video element that we expect the toggle * to appear on. - * @param {String} stage The stage for which the opacity is going to change. This + * @param {string} stage The stage for which the opacity is going to change. This * should be one of "hoverVideo" or "hoverToggle". - * @param {Object} toggleStyles Optional argument. See the documentation for the + * @param {object} toggleStyles Optional argument. See the documentation for the * DEFAULT_TOGGLE_STYLES object for a sense of what styleRules is expected to be. * * @return Promise @@ -307,9 +307,9 @@ async function toggleOpacityReachesThreshold( * will soon be visible. * * @param {Element} browser The <xul:browser> that has the <video> in it. - * @param {String} videoID The ID of the video element that we expect the toggle + * @param {string} videoID The ID of the video element that we expect the toggle * to appear on. - * @param {Number} policy Optional argument. If policy is defined, then it should + * @param {number} policy Optional argument. If policy is defined, then it should * be one of the values in the TOGGLE_POLICIES from PictureInPictureControls.sys.mjs. * If undefined, this function will ensure no policy attribute is set. * @@ -427,7 +427,7 @@ async function assertSawClickEventOnly(browser) { * as whether or not the <video> element is showing the built-in controls. * * @param {Element} browser The <xul:browser> that has the <video> loaded in it. - * @param {String} videoID The ID of the video that has the toggle. + * @param {string} videoID The ID of the video that has the toggle. * * @return Promise * @resolves With the following Object structure: @@ -504,7 +504,7 @@ async function prepareForToggleClick(browser, videoID) { * associated ID. * * @param {Element} browser The <xul:browser> that has the <video> loaded in it. - * @param {String} videoID The ID of the video that has the toggle. + * @param {string} videoID The ID of the video that has the toggle. * * @return Promise * @resolves With the following Object structure: @@ -609,8 +609,8 @@ async function hoverToggle(browser, videoID) { * tests the provided video elements for the toggle both appearing and * opening the Picture-in-Picture window in the expected cases. * - * @param {String} testURL The URL of the page with the <video> elements. - * @param {Object} expectations An object with the following schema: + * @param {string} testURL The URL of the page with the <video> elements. + * @param {object} expectations An object with the following schema: * <video-element-id>: { * canToggle: {Boolean} * policy: {Number} (optional) @@ -672,12 +672,12 @@ async function testToggle(testURL, expectations, prepFn = async () => {}) { * with by the mouse. * * @param {Element} browser The <xul:browser> that has the <video> loaded in it. - * @param {String} videoID The ID of the video that has the toggle. - * @param {Boolean} canToggle True if we expect the toggle to be visible and + * @param {string} videoID The ID of the video that has the toggle. + * @param {boolean} canToggle True if we expect the toggle to be visible and * clickable by the mouse for the associated video. - * @param {Number} policy Optional argument. If policy is defined, then it should + * @param {number} policy Optional argument. If policy is defined, then it should * be one of the values in the TOGGLE_POLICIES from PictureInPictureControls.sys.mjs. - * @param {Object} toggleStyles Optional argument. See the documentation for the + * @param {object} toggleStyles Optional argument. See the documentation for the * DEFAULT_TOGGLE_STYLES object for a sense of what styleRules is expected to be. * * @return Promise @@ -932,9 +932,9 @@ async function promiseFullscreenExited(window, asyncFn) { * then closes the player window * * @param {Element} browser The <xul:browser> that has the <video> loaded in it. - * @param {String} videoID The ID of the video that has the toggle. + * @param {string} videoID The ID of the video that has the toggle. * @param {Element} pipWin The Picture-in-Picture window that was opened - * @param {Boolean} iframe True if the test is on an Iframe, which modifies + * @param {boolean} iframe True if the test is on an Iframe, which modifies * the test behavior */ async function ensureMessageAndClosePiP(browser, videoID, pipWin, isIframe) { @@ -967,7 +967,7 @@ async function ensureMessageAndClosePiP(browser, videoID, pipWin, isIframe) { * and False if the specified video is not paused. * * @param {Element} browser The <xul:browser> that has the <video> loaded in it. - * @param {String} videoID The ID of the video to check. + * @param {string} videoID The ID of the video to check. */ async function isVideoPaused(browser, videoID) { return SpecialPowers.spawn(browser, [videoID], async videoID => { @@ -980,7 +980,7 @@ async function isVideoPaused(browser, videoID) { * and False if the specified video is not muted. * * @param {Element} browser The <xul:browser> that has the <video> loaded in it. - * @param {String} videoID The ID of the video to check. + * @param {string} videoID The ID of the video to check. */ async function isVideoMuted(browser, videoID) { return SpecialPowers.spawn(browser, [videoID], async videoID => { @@ -995,9 +995,9 @@ async function isVideoMuted(browser, videoID) { * so that text tracks are loaded. * * @param {Element} browser The <xul:browser> hosting the <video> - * @param {String} videoID The ID of the video being checked + * @param {string} videoID The ID of the video being checked * @param {Integer} defaultTrackIndex The index of the track to be loaded, or none if -1 - * @param {String} trackMode the mode that the video's textTracks should be set to + * @param {string} trackMode the mode that the video's textTracks should be set to */ async function prepareVideosAndWebVTTTracks( browser, @@ -1039,7 +1039,7 @@ async function prepareVideosAndWebVTTTracks( * Once the next cue is loaded, pause the video. * * @param {Element} browser The <xul:browser> hosting the <video> - * @param {String} videoID The ID of the video being checked + * @param {string} videoID The ID of the video being checked * @param {Integer} textTrackIndex The index of the track to be loaded, or none if -1 */ async function waitForNextCue(browser, videoID, textTrackIndex = 0) { @@ -1094,8 +1094,8 @@ function overrideSavedPosition(left, top, width, height) { * Function used to filter events when waiting for the correct number * telemetry events. * - * @param {String} expected The expected string or undefined - * @param {String} actual The actual string + * @param {string} expected The expected string or undefined + * @param {string} actual The actual string * @returns true if the expected is undefined or if expected matches actual */ function matches(expected, actual) { @@ -1108,14 +1108,14 @@ function matches(expected, actual) { /** * Function that waits for the expected number of events aftering filtering. * - * @param {Object} filter An object containing optional filters + * @param {object} filter An object containing optional filters * { * category: (optional) The category of the event. Ex. "pictureinpicture" * method: (optional) The method of the event. Ex. "create" * object: (optional) The object of the event. Ex. "player" * } - * @param {Number} length The number of events to wait for - * @param {String} process Should be "content" or "parent" depending on the event + * @param {number} length The number of events to wait for + * @param {string} process Should be "content" or "parent" depending on the event */ async function waitForTelemeryEvents(filter, length, process) { let { diff --git a/toolkit/components/processtools/tests/browser/browser_test_powerMetrics.js b/toolkit/components/processtools/tests/browser/browser_test_powerMetrics.js @@ -6,7 +6,7 @@ /** * Return a web-based URL for a given file based on the testing directory. * - * @param {String} fileName + * @param {string} fileName * file that caller wants its web-based url */ function GetTestWebBasedURL(fileName) { diff --git a/toolkit/components/prompts/src/Prompter.sys.mjs b/toolkit/components/prompts/src/Prompter.sys.mjs @@ -68,8 +68,8 @@ Prompter.prototype = { * Puts up an alert dialog with an OK button. * * @param {mozIDOMWindowProxy} domWin - The parent window or null. - * @param {String} title - Text to appear in the title of the dialog. - * @param {String} text - Text to appear in the body of the dialog. + * @param {string} title - Text to appear in the title of the dialog. + * @param {string} text - Text to appear in the body of the dialog. */ alert(domWin, title, text) { let p = this.pickPrompter({ domWin }); @@ -81,10 +81,10 @@ Prompter.prototype = { * * @param {BrowsingContext} browsingContext - The browsing context the * prompt should be opened for. - * @param {Number} modalType - The modal type of the prompt. + * @param {number} modalType - The modal type of the prompt. * nsIPromptService.<MODAL_TYPE_WINDOW|MODAL_TYPE_TAB|MODAL_TYPE_CONTENT> - * @param {String} title - Text to appear in the title of the dialog. - * @param {String} text - Text to appear in the body of the dialog. + * @param {string} title - Text to appear in the title of the dialog. + * @param {string} text - Text to appear in the body of the dialog. */ alertBC(browsingContext, modalType, ...promptArgs) { let p = this.pickPrompter({ browsingContext, modalType }); @@ -96,10 +96,10 @@ Prompter.prototype = { * * @param {BrowsingContext} browsingContext - The browsing context the * prompt should be opened for. - * @param {Number} modalType - The modal type of the prompt. + * @param {number} modalType - The modal type of the prompt. * nsIPromptService.<MODAL_TYPE_WINDOW|MODAL_TYPE_TAB|MODAL_TYPE_CONTENT> - * @param {String} title - Text to appear in the title of the dialog. - * @param {String} text - Text to appear in the body of the dialog. + * @param {string} title - Text to appear in the title of the dialog. + * @param {string} text - Text to appear in the body of the dialog. * @returns {Promise} A promise which resolves when the prompt is dismissed. */ asyncAlert(browsingContext, modalType, ...promptArgs) { @@ -111,10 +111,10 @@ Prompter.prototype = { * Puts up an alert dialog with an OK button and a labeled checkbox. * * @param {mozIDOMWindowProxy} domWin - The parent window or null. - * @param {String} title - Text to appear in the title of the dialog. - * @param {String} text - Text to appear in the body of the dialog. - * @param {String} checkLabel - Text to appear with the checkbox. - * @param {Object} checkValue - Contains the initial checked state of the + * @param {string} title - Text to appear in the title of the dialog. + * @param {string} text - Text to appear in the body of the dialog. + * @param {string} checkLabel - Text to appear with the checkbox. + * @param {object} checkValue - Contains the initial checked state of the * checkbox when this method is called and the final checked state * after this method returns. */ @@ -128,12 +128,12 @@ Prompter.prototype = { * * @param {BrowsingContext} browsingContext - The browsing context the * prompt should be opened for. - * @param {Number} modalType - The modal type of the prompt. + * @param {number} modalType - The modal type of the prompt. * nsIPromptService.<MODAL_TYPE_WINDOW|MODAL_TYPE_TAB|MODAL_TYPE_CONTENT> - * @param {String} title - Text to appear in the title of the dialog. - * @param {String} text - Text to appear in the body of the dialog. - * @param {String} checkLabel - Text to appear with the checkbox. - * @param {Object} checkValue - Contains the initial checked state of the + * @param {string} title - Text to appear in the title of the dialog. + * @param {string} text - Text to appear in the body of the dialog. + * @param {string} checkLabel - Text to appear with the checkbox. + * @param {object} checkValue - Contains the initial checked state of the * checkbox when this method is called and the final checked state * after this method returns. */ @@ -147,13 +147,13 @@ Prompter.prototype = { * * @param {BrowsingContext} browsingContext - The browsing context the * prompt should be opened for. - * @param {Number} modalType - The modal type of the prompt. + * @param {number} modalType - The modal type of the prompt. * nsIPromptService.<MODAL_TYPE_WINDOW|MODAL_TYPE_TAB|MODAL_TYPE_CONTENT> - * @param {String} title - Text to appear in the title of the dialog. - * @param {String} text - Text to appear in the body of the dialog. - * @param {String} checkLabel - Text to appear with the checkbox. - * @param {Boolean} checkValue - The initial checked state of the checkbox. - * @returns {Promise<nsIPropertyBag<{ checked: Boolean }>>} + * @param {string} title - Text to appear in the title of the dialog. + * @param {string} text - Text to appear in the body of the dialog. + * @param {string} checkLabel - Text to appear with the checkbox. + * @param {boolean} checkValue - The initial checked state of the checkbox. + * @returns {Promise<nsIPropertyBag<{checked: boolean}>>} * A promise which resolves when the prompt is dismissed. */ asyncAlertCheck(browsingContext, modalType, ...promptArgs) { @@ -165,9 +165,9 @@ Prompter.prototype = { * Puts up a dialog with OK and Cancel buttons. * * @param {mozIDOMWindowProxy} domWin - The parent window or null. - * @param {String} title - Text to appear in the title of the dialog. - * @param {String} text - Text to appear in the body of the dialog. - * @returns {Boolean} true for OK, false for Cancel. + * @param {string} title - Text to appear in the title of the dialog. + * @param {string} text - Text to appear in the body of the dialog. + * @returns {boolean} true for OK, false for Cancel. */ confirm(domWin, title, text) { let p = this.pickPrompter({ domWin }); @@ -179,11 +179,11 @@ Prompter.prototype = { * * @param {BrowsingContext} browsingContext - The browsing context the * prompt should be opened for. - * @param {Number} modalType - The modal type of the prompt. + * @param {number} modalType - The modal type of the prompt. * nsIPromptService.<MODAL_TYPE_WINDOW|MODAL_TYPE_TAB|MODAL_TYPE_CONTENT> - * @param {String} title - Text to appear in the title of the dialog. - * @param {String} text - Text to appear in the body of the dialog. - * @returns {Boolean} true for OK, false for Cancel. + * @param {string} title - Text to appear in the title of the dialog. + * @param {string} text - Text to appear in the body of the dialog. + * @returns {boolean} true for OK, false for Cancel. */ confirmBC(browsingContext, modalType, ...promptArgs) { let p = this.pickPrompter({ browsingContext, modalType }); @@ -195,11 +195,11 @@ Prompter.prototype = { * * @param {BrowsingContext} browsingContext - The browsing context the * prompt should be opened for. - * @param {Number} modalType - The modal type of the prompt. + * @param {number} modalType - The modal type of the prompt. * nsIPromptService.<MODAL_TYPE_WINDOW|MODAL_TYPE_TAB|MODAL_TYPE_CONTENT> - * @param {String} title - Text to appear in the title of the dialog. - * @param {String} text - Text to appear in the body of the dialog. - * @returns {Promise<nsIPropertyBag<{ ok: Boolean }>>} + * @param {string} title - Text to appear in the title of the dialog. + * @param {string} text - Text to appear in the body of the dialog. + * @returns {Promise<nsIPropertyBag<{ok: boolean}>>} * A promise which resolves when the prompt is dismissed. */ asyncConfirm(browsingContext, modalType, ...promptArgs) { @@ -211,10 +211,10 @@ Prompter.prototype = { * Puts up a dialog with OK and Cancel buttons and a labeled checkbox. * * @param {mozIDOMWindowProxy} domWin - The parent window or null. - * @param {String} title - Text to appear in the title of the dialog. - * @param {String} text - Text to appear in the body of the dialog. - * @param {String} checkLabel - Text to appear with the checkbox. - * @param {Object} checkValue - Contains the initial checked state of the + * @param {string} title - Text to appear in the title of the dialog. + * @param {string} text - Text to appear in the body of the dialog. + * @param {string} checkLabel - Text to appear with the checkbox. + * @param {object} checkValue - Contains the initial checked state of the * checkbox when this method is called and the final checked state * after this method returns. */ @@ -228,15 +228,15 @@ Prompter.prototype = { * * @param {BrowsingContext} browsingContext - The browsing context the * prompt should be opened for. - * @param {Number} modalType - The modal type of the prompt. + * @param {number} modalType - The modal type of the prompt. * nsIPromptService.<MODAL_TYPE_WINDOW|MODAL_TYPE_TAB|MODAL_TYPE_CONTENT> - * @param {String} title - Text to appear in the title of the dialog. - * @param {String} text - Text to appear in the body of the dialog. - * @param {String} checkLabel - Text to appear with the checkbox. - * @param {Object} checkValue - Contains the initial checked state of the + * @param {string} title - Text to appear in the title of the dialog. + * @param {string} text - Text to appear in the body of the dialog. + * @param {string} checkLabel - Text to appear with the checkbox. + * @param {object} checkValue - Contains the initial checked state of the * checkbox when this method is called and the final checked state * after this method returns. - * @returns {Boolean} true for OK, false for Cancel + * @returns {boolean} true for OK, false for Cancel */ confirmCheckBC(browsingContext, modalType, ...promptArgs) { let p = this.pickPrompter({ browsingContext, modalType }); @@ -248,13 +248,13 @@ Prompter.prototype = { * * @param {BrowsingContext} browsingContext - The browsing context the * prompt should be opened for. - * @param {Number} modalType - The modal type of the prompt. + * @param {number} modalType - The modal type of the prompt. * nsIPromptService.<MODAL_TYPE_WINDOW|MODAL_TYPE_TAB|MODAL_TYPE_CONTENT> - * @param {String} title - Text to appear in the title of the dialog. - * @param {String} text - Text to appear in the body of the dialog. - * @param {String} checkLabel - Text to appear with the checkbox. - * @param {Boolean} checkValue - The initial checked state of the checkbox. - * @returns {Promise<nsIPropertyBag<{ ok: Boolean, checked: Boolean }>>} + * @param {string} title - Text to appear in the title of the dialog. + * @param {string} text - Text to appear in the body of the dialog. + * @param {string} checkLabel - Text to appear with the checkbox. + * @param {boolean} checkValue - The initial checked state of the checkbox. + * @returns {Promise<nsIPropertyBag<{ok: boolean, checked: boolean}>>} * A promise which resolves when the prompt is dismissed. */ asyncConfirmCheck(browsingContext, modalType, ...promptArgs) { @@ -283,18 +283,18 @@ Prompter.prototype = { * where "AAA" and "BBB" correspond to one of the button titles. * * @param {mozIDOMWindowProxy} domWin - The parent window or null. - * @param {String} title - Text to appear in the title of the dialog. - * @param {String} text - Text to appear in the body of the dialog. - * @param {Number} flags - A combination of Button Flags. - * @param {String} button0 - Used when button 0 uses TITLE_IS_STRING. - * @param {String} button1 - Used when button 1 uses TITLE_IS_STRING. - * @param {String} button2 - Used when button 2 uses TITLE_IS_STRING. - * @param {String} checkLabel - Text to appear with the checkbox. + * @param {string} title - Text to appear in the title of the dialog. + * @param {string} text - Text to appear in the body of the dialog. + * @param {number} flags - A combination of Button Flags. + * @param {string} button0 - Used when button 0 uses TITLE_IS_STRING. + * @param {string} button1 - Used when button 1 uses TITLE_IS_STRING. + * @param {string} button2 - Used when button 2 uses TITLE_IS_STRING. + * @param {string} checkLabel - Text to appear with the checkbox. * Null if no checkbox. - * @param {Object} checkValue - Contains the initial checked state of the + * @param {object} checkValue - Contains the initial checked state of the * checkbox when this method * is called and the final checked state after this method returns. - * @returns {Number} The index of the button pressed. + * @returns {number} The index of the button pressed. */ confirmEx( domWin, @@ -325,20 +325,20 @@ Prompter.prototype = { * * @param {BrowsingContext} browsingContext - The browsing context the * prompt should be opened for. - * @param {Number} modalType - The modal type of the prompt. + * @param {number} modalType - The modal type of the prompt. * nsIPromptService.<MODAL_TYPE_WINDOW|MODAL_TYPE_TAB|MODAL_TYPE_CONTENT> - * @param {String} title - Text to appear in the title of the dialog. - * @param {String} text - Text to appear in the body of the dialog. - * @param {Number} flags - A combination of Button Flags. - * @param {String} button0 - Used when button 0 uses TITLE_IS_STRING. - * @param {String} button1 - Used when button 1 uses TITLE_IS_STRING. - * @param {String} button2 - Used when button 2 uses TITLE_IS_STRING. - * @param {String} checkLabel - Text to appear with the checkbox. + * @param {string} title - Text to appear in the title of the dialog. + * @param {string} text - Text to appear in the body of the dialog. + * @param {number} flags - A combination of Button Flags. + * @param {string} button0 - Used when button 0 uses TITLE_IS_STRING. + * @param {string} button1 - Used when button 1 uses TITLE_IS_STRING. + * @param {string} button2 - Used when button 2 uses TITLE_IS_STRING. + * @param {string} checkLabel - Text to appear with the checkbox. * Null if no checkbox. - * @param {Object} checkValue - Contains the initial checked state of the + * @param {object} checkValue - Contains the initial checked state of the * checkbox when this method is called and the final checked state * after this method returns. - * @returns {Number} The index of the button pressed. + * @returns {number} The index of the button pressed. */ confirmExBC(browsingContext, modalType, ...promptArgs) { let p = this.pickPrompter({ browsingContext, modalType }); @@ -350,19 +350,19 @@ Prompter.prototype = { * * @param {BrowsingContext} browsingContext - The browsing context the * prompt should be opened for. - * @param {Number} modalType - The modal type of the prompt. + * @param {number} modalType - The modal type of the prompt. * nsIPromptService.<MODAL_TYPE_WINDOW|MODAL_TYPE_TAB|MODAL_TYPE_CONTENT> - * @param {String} title - Text to appear in the title of the dialog. - * @param {String} text - Text to appear in the body of the dialog. - * @param {Number} flags - A combination of Button Flags. - * @param {String} button0 - Used when button 0 uses TITLE_IS_STRING. - * @param {String} button1 - Used when button 1 uses TITLE_IS_STRING. - * @param {String} button2 - Used when button 2 uses TITLE_IS_STRING. - * @param {String} checkLabel - Text to appear with the checkbox. + * @param {string} title - Text to appear in the title of the dialog. + * @param {string} text - Text to appear in the body of the dialog. + * @param {number} flags - A combination of Button Flags. + * @param {string} button0 - Used when button 0 uses TITLE_IS_STRING. + * @param {string} button1 - Used when button 1 uses TITLE_IS_STRING. + * @param {string} button2 - Used when button 2 uses TITLE_IS_STRING. + * @param {string} checkLabel - Text to appear with the checkbox. * Null if no checkbox. - * @param {Boolean} checkValue - The initial checked state of the checkbox. - * @param {Object} [extraArgs] - Extra arguments for the prompt metadata. - * @returns {Promise<nsIPropertyBag<{ buttonNumClicked: Number, checked: Boolean, isExtra1Secondary: Boolean }>>} + * @param {boolean} checkValue - The initial checked state of the checkbox. + * @param {object} [extraArgs] - Extra arguments for the prompt metadata. + * @returns {Promise<nsIPropertyBag<{buttonNumClicked: number, checked: boolean, isExtra1Secondary: boolean}>>} */ asyncConfirmEx(browsingContext, modalType, ...promptArgs) { let p = this.pickPrompter({ browsingContext, modalType, async: true }); @@ -373,19 +373,19 @@ Prompter.prototype = { * Puts up a dialog with an edit field and an optional, labeled checkbox. * * @param {mozIDOMWindowProxy} domWin - The parent window or null. - * @param {String} title - Text to appear in the title of the dialog. - * @param {String} text - Text to appear in the body of the dialog. - * @param {Object} value - Contains the default value for the dialog field + * @param {string} title - Text to appear in the title of the dialog. + * @param {string} text - Text to appear in the body of the dialog. + * @param {object} value - Contains the default value for the dialog field * when this method is called (null value is ok). Upon return, if * the user pressed OK, then this parameter contains a newly * allocated string value. * Otherwise, the parameter's value is unmodified. - * @param {String} checkLabel - Text to appear with the checkbox. + * @param {string} checkLabel - Text to appear with the checkbox. * If null, check box will not be shown. - * @param {Object} checkValue - Contains the initial checked state of the + * @param {object} checkValue - Contains the initial checked state of the * checkbox when this method is called and the final checked state * after this method returns. - * @returns {Boolean} true for OK, false for Cancel. + * @returns {boolean} true for OK, false for Cancel. */ prompt(domWin, title, text, value, checkLabel, checkValue) { let p = this.pickPrompter({ domWin }); @@ -397,21 +397,21 @@ Prompter.prototype = { * * @param {BrowsingContext} browsingContext - The browsing context the * prompt should be opened for. - * @param {Number} modalType - The modal type of the prompt. + * @param {number} modalType - The modal type of the prompt. * nsIPromptService.<MODAL_TYPE_WINDOW|MODAL_TYPE_TAB|MODAL_TYPE_CONTENT> - * @param {String} title - Text to appear in the title of the dialog. - * @param {String} text - Text to appear in the body of the dialog. - * @param {Object} value - Contains the default value for the dialog field + * @param {string} title - Text to appear in the title of the dialog. + * @param {string} text - Text to appear in the body of the dialog. + * @param {object} value - Contains the default value for the dialog field * when this method is called (null value is ok). Upon return, if * the user pressed OK, then this parameter contains a newly * allocated string value. * Otherwise, the parameter's value is unmodified. - * @param {String} checkLabel - Text to appear with the checkbox. + * @param {string} checkLabel - Text to appear with the checkbox. * If null, check box will not be shown. - * @param {Object} checkValue - Contains the initial checked state of the + * @param {object} checkValue - Contains the initial checked state of the * checkbox when this method is called and the final checked state * after this method returns. - * @returns {Boolean} true for OK, false for Cancel. + * @returns {boolean} true for OK, false for Cancel. */ promptBC(browsingContext, modalType, ...promptArgs) { let p = this.pickPrompter({ browsingContext, modalType }); @@ -423,15 +423,15 @@ Prompter.prototype = { * * @param {BrowsingContext} browsingContext - The browsing context the * prompt should be opened for. - * @param {Number} modalType - The modal type of the prompt. + * @param {number} modalType - The modal type of the prompt. * nsIPromptService.<MODAL_TYPE_WINDOW|MODAL_TYPE_TAB|MODAL_TYPE_CONTENT> - * @param {String} title - Text to appear in the title of the dialog. - * @param {String} text - Text to appear in the body of the dialog. - * @param {String} value - The default value for the dialog text field. - * @param {String} checkLabel - Text to appear with the checkbox. + * @param {string} title - Text to appear in the title of the dialog. + * @param {string} text - Text to appear in the body of the dialog. + * @param {string} value - The default value for the dialog text field. + * @param {string} checkLabel - Text to appear with the checkbox. * If null, check box will not be shown. - * @param {Boolean} checkValue - The initial checked state of the checkbox. - * @returns {Promise<nsIPropertyBag<{ ok: Boolean, checked: Boolean, value: String }>>} + * @param {boolean} checkValue - The initial checked state of the checkbox. + * @returns {Promise<nsIPropertyBag<{ok: boolean, checked: boolean, value: string}>>} * A promise which resolves when the prompt is dismissed. */ asyncPrompt(browsingContext, modalType, ...promptArgs) { @@ -443,18 +443,18 @@ Prompter.prototype = { * Puts up a dialog with an edit field and a password field. * * @param {mozIDOMWindowProxy} domWin - The parent window or null. - * @param {String} title - Text to appear in the title of the dialog. - * @param {String} text - Text to appear in the body of the dialog. - * @param {Object} user - Contains the default value for the username + * @param {string} title - Text to appear in the title of the dialog. + * @param {string} text - Text to appear in the body of the dialog. + * @param {object} user - Contains the default value for the username * field when this method is called (null value is ok). * Upon return, if the user pressed OK, then this parameter contains * a newly allocated string value. Otherwise, the parameter's value * is unmodified. - * @param {Object} pass - Contains the default value for the password field + * @param {object} pass - Contains the default value for the password field * when this method is called (null value is ok). Upon return, if the * user pressed OK, this parameter contains a newly allocated string * value. Otherwise, the parameter's value is unmodified. - * @returns {Boolean} true for OK, false for Cancel. + * @returns {boolean} true for OK, false for Cancel. */ promptUsernameAndPassword(domWin, title, text, user, pass) { let p = this.pickPrompter({ domWin }); @@ -466,20 +466,20 @@ Prompter.prototype = { * * @param {BrowsingContext} browsingContext - The browsing context the * prompt should be opened for. - * @param {Number} modalType - The modal type of the prompt. + * @param {number} modalType - The modal type of the prompt. * nsIPromptService.<MODAL_TYPE_WINDOW|MODAL_TYPE_TAB|MODAL_TYPE_CONTENT> - * @param {String} title - Text to appear in the title of the dialog. - * @param {String} text - Text to appear in the body of the dialog. - * @param {Object} user - Contains the default value for the username + * @param {string} title - Text to appear in the title of the dialog. + * @param {string} text - Text to appear in the body of the dialog. + * @param {object} user - Contains the default value for the username * field when this method is called (null value is ok). * Upon return, if the user pressed OK, then this parameter contains * a newly allocated string value. Otherwise, the parameter's value * is unmodified. - * @param {Object} pass - Contains the default value for the password field + * @param {object} pass - Contains the default value for the password field * when this method is called (null value is ok). Upon return, if the * user pressed OK, this parameter contains a newly allocated string * value. Otherwise, the parameter's value is unmodified. - * @returns {Boolean} true for OK, false for Cancel. + * @returns {boolean} true for OK, false for Cancel. */ promptUsernameAndPasswordBC(browsingContext, modalType, ...promptArgs) { let p = this.pickPrompter({ browsingContext, modalType }); @@ -491,13 +491,13 @@ Prompter.prototype = { * * @param {BrowsingContext} browsingContext - The browsing context the * prompt should be opened for. - * @param {Number} modalType - The modal type of the prompt. + * @param {number} modalType - The modal type of the prompt. * nsIPromptService.<MODAL_TYPE_WINDOW|MODAL_TYPE_TAB|MODAL_TYPE_CONTENT> - * @param {String} title - Text to appear in the title of the dialog. - * @param {String} text - Text to appear in the body of the dialog. - * @param {String} user - Default value for the username field. - * @param {String} pass - Contains the default value for the password field. - * @returns {Promise<nsIPropertyBag<{ ok: Boolean, user: String, pass: String }>>} + * @param {string} title - Text to appear in the title of the dialog. + * @param {string} text - Text to appear in the body of the dialog. + * @param {string} user - Default value for the username field. + * @param {string} pass - Contains the default value for the password field. + * @returns {Promise<nsIPropertyBag<{ok: boolean, user: string, pass: string}>>} * A promise which resolves when the prompt is dismissed. */ asyncPromptUsernameAndPassword(browsingContext, modalType, ...promptArgs) { @@ -509,13 +509,13 @@ Prompter.prototype = { * Puts up a dialog with a password field. * * @param {mozIDOMWindowProxy} domWin - The parent window or null. - * @param {String} title - Text to appear in the title of the dialog. - * @param {String} text - Text to appear in the body of the dialog. - * @param {Object} pass - Contains the default value for the password field + * @param {string} title - Text to appear in the title of the dialog. + * @param {string} text - Text to appear in the body of the dialog. + * @param {object} pass - Contains the default value for the password field * when this method is called (null value is ok). Upon return, if the * user pressed OK, this parameter contains a newly allocated string * value. Otherwise, the parameter's value is unmodified. - * @returns {Boolean} true for OK, false for Cancel. + * @returns {boolean} true for OK, false for Cancel. */ promptPassword(domWin, title, text, pass) { let p = this.pickPrompter({ domWin }); @@ -532,15 +532,15 @@ Prompter.prototype = { * * @param {BrowsingContext} browsingContext - The browsing context the * prompt should be opened for. - * @param {Number} modalType - The modal type of the prompt. + * @param {number} modalType - The modal type of the prompt. * nsIPromptService.<MODAL_TYPE_WINDOW|MODAL_TYPE_TAB|MODAL_TYPE_CONTENT> - * @param {String} title - Text to appear in the title of the dialog. - * @param {String} text - Text to appear in the body of the dialog. - * @param {Object} pass - Contains the default value for the password field + * @param {string} title - Text to appear in the title of the dialog. + * @param {string} text - Text to appear in the body of the dialog. + * @param {object} pass - Contains the default value for the password field * when this method is called (null value is ok). Upon return, if the * user pressed OK, this parameter contains a newly allocated string * value. Otherwise, the parameter's value is unmodified. - * @returns {Boolean} true for OK, false for Cancel. + * @returns {boolean} true for OK, false for Cancel. */ promptPasswordBC(browsingContext, modalType, ...promptArgs) { let p = this.pickPrompter({ browsingContext, modalType }); @@ -552,12 +552,12 @@ Prompter.prototype = { * * @param {BrowsingContext} browsingContext - The browsing context the * prompt should be opened for. - * @param {Number} modalType - The modal type of the prompt. + * @param {number} modalType - The modal type of the prompt. * nsIPromptService.<MODAL_TYPE_WINDOW|MODAL_TYPE_TAB|MODAL_TYPE_CONTENT> - * @param {String} title - Text to appear in the title of the dialog. - * @param {String} text - Text to appear in the body of the dialog. - * @param {String} pass - Contains the default value for the password field. - * @returns {Promise<nsIPropertyBag<{ ok: Boolean, pass: String }>>} + * @param {string} title - Text to appear in the title of the dialog. + * @param {string} text - Text to appear in the body of the dialog. + * @param {string} pass - Contains the default value for the password field. + * @returns {Promise<nsIPropertyBag<{ok: boolean, pass: string}>>} * A promise which resolves when the prompt is dismissed. */ asyncPromptPassword(browsingContext, modalType, ...promptArgs) { @@ -570,12 +570,12 @@ Prompter.prototype = { * may make a single selection. * * @param {mozIDOMWindowProxy} domWin - The parent window or null. - * @param {String} title - Text to appear in the title of the dialog. - * @param {String} text - Text to appear in the body of the dialog. - * @param {String[]} list - The list of strings to display. - * @param {Object} selected - Contains the index of the selected item in the + * @param {string} title - Text to appear in the title of the dialog. + * @param {string} text - Text to appear in the body of the dialog. + * @param {string[]} list - The list of strings to display. + * @param {object} selected - Contains the index of the selected item in the * list when this method returns true. - * @returns {Boolean} true for OK, false for Cancel. + * @returns {boolean} true for OK, false for Cancel. */ select(domWin, title, text, list, selected) { let p = this.pickPrompter({ domWin }); @@ -588,14 +588,14 @@ Prompter.prototype = { * * @param {BrowsingContext} browsingContext - The browsing context the * prompt should be opened for. - * @param {Number} modalType - The modal type of the prompt. + * @param {number} modalType - The modal type of the prompt. * nsIPromptService.<MODAL_TYPE_WINDOW|MODAL_TYPE_TAB|MODAL_TYPE_CONTENT> - * @param {String} title - Text to appear in the title of the dialog. - * @param {String} text - Text to appear in the body of the dialog. - * @param {String[]} list - The list of strings to display. - * @param {Object} selected - Contains the index of the selected item in the + * @param {string} title - Text to appear in the title of the dialog. + * @param {string} text - Text to appear in the body of the dialog. + * @param {string[]} list - The list of strings to display. + * @param {object} selected - Contains the index of the selected item in the * list when this method returns true. - * @returns {Boolean} true for OK, false for Cancel. + * @returns {boolean} true for OK, false for Cancel. */ selectBC(browsingContext, modalType, ...promptArgs) { let p = this.pickPrompter({ browsingContext, modalType }); @@ -608,12 +608,12 @@ Prompter.prototype = { * * @param {BrowsingContext} browsingContext - The browsing context the * prompt should be opened for. - * @param {Number} modalType - The modal type of the prompt. + * @param {number} modalType - The modal type of the prompt. * nsIPromptService.<MODAL_TYPE_WINDOW|MODAL_TYPE_TAB|MODAL_TYPE_CONTENT> - * @param {String} title - Text to appear in the title of the dialog. - * @param {String} text - Text to appear in the body of the dialog. - * @param {String[]} list - The list of strings to display. - * @returns {Promise<nsIPropertyBag<{ selected: Number, ok: Boolean }>>} + * @param {string} title - Text to appear in the title of the dialog. + * @param {string} text - Text to appear in the body of the dialog. + * @param {string[]} list - The list of strings to display. + * @returns {Promise<nsIPropertyBag<{selected: number, ok: boolean}>>} * A promise which resolves when the prompt is dismissed. */ asyncSelect(browsingContext, modalType, ...promptArgs) { @@ -627,10 +627,10 @@ Prompter.prototype = { * * @param {mozIDOMWindowProxy} domWin - The parent window or null. * @param {nsIChannel} channel - The channel that requires authentication. - * @param {Number} level - Security level of the credential transmission. + * @param {number} level - Security level of the credential transmission. * Any of nsIAuthPrompt2.<LEVEL_NONE|LEVEL_PW_ENCRYPTED|LEVEL_SECURE> * @param {nsIAuthInformation} authInfo - Authentication information object. - * @returns {Boolean} + * @returns {boolean} * true: Authentication can proceed using the values * in the authInfo object. * false: Authentication should be cancelled, usually because the @@ -647,13 +647,13 @@ Prompter.prototype = { * * @param {BrowsingContext} browsingContext - The browsing context the * prompt should be opened for. - * @param {Number} modalType - The modal type of the prompt. + * @param {number} modalType - The modal type of the prompt. * nsIPromptService.<MODAL_TYPE_WINDOW|MODAL_TYPE_TAB|MODAL_TYPE_CONTENT> * @param {nsIChannel} channel - The channel that requires authentication. - * @param {Number} level - Security level of the credential transmission. + * @param {number} level - Security level of the credential transmission. * Any of nsIAuthPrompt2.<LEVEL_NONE|LEVEL_PW_ENCRYPTED|LEVEL_SECURE> * @param {nsIAuthInformation} authInfo - Authentication information object. - * @returns {Boolean} + * @returns {boolean} * true: Authentication can proceed using the values * in the authInfo object. * false: Authentication should be cancelled, usually because the @@ -670,13 +670,13 @@ Prompter.prototype = { * * @param {BrowsingContext} browsingContext - The browsing context the * prompt should be opened for. - * @param {Number} modalType - The modal type of the prompt. + * @param {number} modalType - The modal type of the prompt. * nsIPromptService.<MODAL_TYPE_WINDOW|MODAL_TYPE_TAB|MODAL_TYPE_CONTENT> * @param {nsIChannel} channel - The channel that requires authentication. - * @param {Number} level - Security level of the credential transmission. + * @param {number} level - Security level of the credential transmission. * Any of nsIAuthPrompt2.<LEVEL_NONE|LEVEL_PW_ENCRYPTED|LEVEL_SECURE> * @param {nsIAuthInformation} authInfo - Authentication information object. - * @returns {Promise<nsIPropertyBag<{ ok: Boolean }>>} + * @returns {Promise<nsIPropertyBag<{ok: boolean}>>} * A promise which resolves when the prompt is dismissed. */ asyncPromptAuth(browsingContext, modalType, ...promptArgs) { @@ -690,7 +690,7 @@ Prompter.prototype = { * * @param {WindowContext} windowContext - The window context that initiates * the clipboard operation. - * @returns {Promise<nsIPropertyBag<{ ok: Boolean }>>} + * @returns {Promise<nsIPropertyBag<{ok: boolean}>>} * A promise which resolves when the contextmenu is dismissed. */ confirmUserPaste() { @@ -1079,7 +1079,7 @@ class ModalPrompter { /** * Synchronous wrapper around {@link ModalPrompter#openPrompt} * - * @param {Object} args Prompt arguments. When prompt has been closed, they are updated to reflect the result state. + * @param {object} args Prompt arguments. When prompt has been closed, they are updated to reflect the result state. */ openPromptSync(args) { let closed = false; @@ -1280,7 +1280,7 @@ class ModalPrompter { * * @param {Window} [parentWindow] - The parent window for the prompt, may be * null. - * @param {Object} args - Prompt options and return values. + * @param {object} args - Prompt options and return values. */ openWindowPrompt(parentWindow = null, args) { let uri = args.promptType == "select" ? SELECT_DIALOG : COMMON_DIALOG; @@ -1312,7 +1312,7 @@ class ModalPrompter { * Calls async prompt method and optionally runs promise chained task on * result data. Converts result data to nsIPropertyBag. * - * @param {Object} args - Prompt arguments. + * @param {object} args - Prompt arguments. * @param {Function} [task] - Function which is called with the modified * prompt args object once the prompt has been closed. Must return a * result object for the prompt caller. diff --git a/toolkit/components/prompts/test/PromptTestUtils.sys.mjs b/toolkit/components/prompts/test/PromptTestUtils.sys.mjs @@ -17,8 +17,8 @@ export let PromptTestUtils = { * @param {Browser|Window} [parent] - Parent of the prompt. This can be * either the parent window or the browser. For tab prompts, if given a * window, the currently selected browser in that window will be used. - * @param {Object} promptOptions - @see waitForPrompt - * @param {Object} promptActions - @see handlePrompt + * @param {object} promptOptions - @see waitForPrompt + * @param {object} promptActions - @see handlePrompt * @returns {Promise} - A promise which resolves once the prompt has been * closed. */ @@ -31,15 +31,15 @@ export let PromptTestUtils = { * Interact with an existing prompt and close it. * * @param {Dialog} dialog - The dialog instance associated with the prompt. - * @param {Object} [actions] - Options on how to interact with the + * @param {object} [actions] - Options on how to interact with the * prompt and how to close it. - * @param {Boolean} [actions.checkboxState] - Set the checkbox state. + * @param {boolean} [actions.checkboxState] - Set the checkbox state. * true = checked, false = unchecked. - * @param {Number} [actions.buttonNumClick] - Which button to click to close + * @param {number} [actions.buttonNumClick] - Which button to click to close * the prompt. - * @param {String} [actions.loginInput] - Input text for the login text field. + * @param {string} [actions.loginInput] - Input text for the login text field. * This field is also used for text input for the "prompt" type. - * @param {String} [actions.passwordInput] - Input text for the password text + * @param {string} [actions.passwordInput] - Input text for the password text * field. * @returns {Promise} - A promise which resolves once the prompt has been * closed. @@ -96,10 +96,10 @@ export let PromptTestUtils = { * the parent window or the browser. For tab prompts, if given a window, the * currently selected browser in that window will be used. * If not given a parent, the method will return on prompts of any window. - * @param {Object} attrs - The prompt attributes to filter for. - * @param {Number} attrs.modalType - Whether the expected prompt is a content, tab or window prompt. + * @param {object} attrs - The prompt attributes to filter for. + * @param {number} attrs.modalType - Whether the expected prompt is a content, tab or window prompt. * nsIPromptService.<MODAL_TYPE_WINDOW|MODAL_TYPE_TAB|MODAL_TYPE_CONTENT> - * @param {String} [attrs.promptType] - Common dialog type of the prompt to filter for. + * @param {string} [attrs.promptType] - Common dialog type of the prompt to filter for. * @see {@link CommonDialog} for possible prompt types. * @returns {Promise<CommonDialog>} - A Promise which resolves with a dialog * object once the prompt has loaded. diff --git a/toolkit/components/prompts/test/prompt_common.js b/toolkit/components/prompts/test/prompt_common.js @@ -4,7 +4,7 @@ const { Cc, Ci, Cu: ChromeUtils } = SpecialPowers; * Converts a property bag to object. * * @param {nsIPropertyBag} bag - The property bag to convert - * @returns {Object} - The object representation of the nsIPropertyBag + * @returns {object} - The object representation of the nsIPropertyBag */ function propBagToObject(bag) { if (!(bag instanceof Ci.nsIPropertyBag)) { diff --git a/toolkit/components/prompts/test/test_subresources_prompts.html b/toolkit/components/prompts/test/test_subresources_prompts.html @@ -173,9 +173,9 @@ add_task(async function runTestAuth() { * Function to be passed to SpecialPowers.spawn that dispatches a MouseEvent * of a certain type to some element in a subframe. * - * @param {String} targetID The ID of the element that will have the event + * @param {string} targetID The ID of the element that will have the event * dispatched on. - * @param {String} type The type of MouseEvent. + * @param {string} type The type of MouseEvent. * @returns Promise * @resolves Once the event has been dispatched. */ diff --git a/toolkit/components/taskscheduler/TaskScheduler.sys.mjs b/toolkit/components/taskscheduler/TaskScheduler.sys.mjs @@ -76,7 +76,7 @@ export var TaskScheduler = { * @param intervalSeconds * Interval at which to run the command, in seconds. Minimum 1800 (30 minutes). * - * @param {Object} options + * @param {object} options * Optional, as are all of its properties: * { * options.args @@ -130,7 +130,7 @@ export var TaskScheduler = { /** * Delete a scheduled task previously created with registerTask. * - * @param {Object} options + * @param {object} options * Optional, as are all of its properties: * { * options.nameVersion @@ -150,7 +150,7 @@ export var TaskScheduler = { /** * Delete all tasks registered by this application. * - * @param {Object} options + * @param {object} options * Optional, as are all of its properties: * { * options.nameVersion @@ -172,7 +172,7 @@ export var TaskScheduler = { * @param id * A string representing the identifier of the task to look for. * - * @param {Object} options + * @param {object} options * Optional, as are all of its properties: * { * options.nameVersion diff --git a/toolkit/components/taskscheduler/TaskSchedulerWinImpl.sys.mjs b/toolkit/components/taskscheduler/TaskSchedulerWinImpl.sys.mjs @@ -275,7 +275,7 @@ export var WinImpl = { * @param id * A string representing the identifier of the task to format * - * @param {Object} options + * @param {object} options * Optional, as are all of its properties: * { * options.nameVersion diff --git a/toolkit/components/telemetry/app/ClientID.sys.mjs b/toolkit/components/telemetry/app/ClientID.sys.mjs @@ -49,8 +49,8 @@ const PREF_CACHED_USAGE_PROFILEGROUPID = /** * Checks if the string is a valid UUID (without braces). * - * @param {String} id A string containing an ID. - * @return {Boolean} True when the ID has valid format, or False otherwise. + * @param {string} id A string containing an ID. + * @return {boolean} True when the ID has valid format, or False otherwise. */ function isValidUUID(id) { const UUID_REGEX = @@ -103,7 +103,7 @@ export var ClientID = Object.freeze({ * Asynchronously updates the stable profile group ID we use for data * reporting. * - * @param {String} id A string containing the profile group ID. + * @param {string} id A string containing the profile group ID. * @return {Promise} Resolves when the ID is updated. */ setProfileGroupID(id) { @@ -114,7 +114,7 @@ export var ClientID = Object.freeze({ * Asynchronously updates the stable Usage Profile ID we use for DAU * reporting. * - * @param {String} id A string containing the Usage Profile ID. + * @param {string} id A string containing the Usage Profile ID. * @return {Promise} Resolves when the ID is updated. */ setUsageProfileID(id) { @@ -125,7 +125,7 @@ export var ClientID = Object.freeze({ * Asynchronously updates the stable Usage Profile Group ID we use for DAU * reporting. * - * @param {String} id A string containing the Usage Group Profile ID. + * @param {string} id A string containing the Usage Group Profile ID. * @return {Promise} Resolves when the ID is updated. */ setUsageProfileGroupID(id) { @@ -502,7 +502,7 @@ var ClientIDImpl = { * Asynchronously updates the stable profile group ID we use for data reporting * (FHR & Telemetry). * - * @param {String} id A string containing the profile group ID. + * @param {string} id A string containing the profile group ID. * @return {Promise} Resolves when the ID is updated. */ async setProfileGroupID(id) { @@ -529,7 +529,7 @@ var ClientIDImpl = { /** * Asynchronously updates the stable Usage Profile ID we use for DAU reporting. * - * @param {String} id A string containing the Usage Profile ID. + * @param {string} id A string containing the Usage Profile ID. * @return {Promise} Resolves when the ID is updated. */ async setUsageProfileID(id) { @@ -558,7 +558,7 @@ var ClientIDImpl = { * Asynchronously updates the stable Usage Profile Group ID we use for DAU * reporting. * - * @param {String} id A string containing the Usage Profile Group ID. + * @param {string} id A string containing the Usage Profile Group ID. * @return {Promise} Resolves when the ID is updated. */ async setUsageProfileGroupID(id) { @@ -869,8 +869,8 @@ var ClientIDImpl = { * Sets the client id to the given value and updates the value cached in * preferences only if the given id is a valid UUID. * - * @param {String} id A string containing the client ID. - * @return {Boolean} True when the client ID has valid format, or False + * @param {string} id A string containing the client ID. + * @return {boolean} True when the client ID has valid format, or False * otherwise. */ updateClientID(id) { @@ -893,8 +893,8 @@ var ClientIDImpl = { * Sets the profile group ID to the given value and updates the value cached * in preferences only if the given id is a valid UUID. * - * @param {String} id A string containing the profile group ID. - * @return {Boolean} True when the profile group ID has valid format, or False + * @param {string} id A string containing the profile group ID. + * @return {boolean} True when the profile group ID has valid format, or False * otherwise. */ updateProfileGroupID(id) { @@ -919,8 +919,8 @@ var ClientIDImpl = { * Sets the Usage Profile ID to the given value and updates the value cached * in preferences only if the given id is a valid UUID. * - * @param {String} id A string containing the Profile Usage ID. - * @return {Boolean} True when the Profile Usage ID has valid format, or False + * @param {string} id A string containing the Profile Usage ID. + * @return {boolean} True when the Profile Usage ID has valid format, or False * otherwise. */ updateUsageProfileID(id) { @@ -945,8 +945,8 @@ var ClientIDImpl = { * Sets the Usage Profile Group ID to the given value and updates the value * cached in preferences only if the given id is a valid UUID. * - * @param {String} id A string containing the Profile Group Usage ID. - * @return {Boolean} True when the Profile Group Usage ID has valid format, + * @param {string} id A string containing the Profile Group Usage ID. + * @return {boolean} True when the Profile Group Usage ID has valid format, * or False otherwise. */ updateUsageProfileGroupID(id) { diff --git a/toolkit/components/telemetry/app/TelemetryArchive.sys.mjs b/toolkit/components/telemetry/app/TelemetryArchive.sys.mjs @@ -21,7 +21,7 @@ export var TelemetryArchive = { * Note that scanning the archived pings on disk is delayed on startup, * use promizeInitialized() to access this after scanning. * - * @return {Promise<sequence<Object>>} + * @return {Promise<sequence<object>>} * A list of the archived ping info in the form: * { id: <string>, * timestampCreated: <number>, @@ -56,7 +56,7 @@ export var TelemetryArchive = { * Checks if pings can be archived. Some products (e.g. Thunderbird) might not want * to do that. * - * @return {Boolean} True if pings should be archived, false otherwise. + * @return {boolean} True if pings should be archived, false otherwise. */ function shouldArchivePings() { return Services.prefs.getBoolPref( diff --git a/toolkit/components/telemetry/app/TelemetryControllerBase.sys.mjs b/toolkit/components/telemetry/app/TelemetryControllerBase.sys.mjs @@ -114,7 +114,7 @@ export var TelemetryControllerBase = Object.freeze({ /** * Perform telemetry initialization for either chrome or content process. * - * @return {Boolean} True if Telemetry is allowed to record at least base (FHR) data, + * @return {boolean} True if Telemetry is allowed to record at least base (FHR) data, * false otherwise. */ enableTelemetryRecording: function enableTelemetryRecording() { diff --git a/toolkit/components/telemetry/app/TelemetryControllerContent.sys.mjs b/toolkit/components/telemetry/app/TelemetryControllerContent.sys.mjs @@ -41,7 +41,7 @@ var Impl = { /** * This triggers basic telemetry initialization for content processes. * - * @param {Boolean} [testing=false] True if we are in test mode, false otherwise. + * @param {boolean} [testing=false] True if we are in test mode, false otherwise. */ setupContentTelemetry(testing = false) { this._testMode = testing; diff --git a/toolkit/components/telemetry/app/TelemetryControllerParent.sys.mjs b/toolkit/components/telemetry/app/TelemetryControllerParent.sys.mjs @@ -145,18 +145,18 @@ export var TelemetryController = Object.freeze({ * it should only contain alphanumeric characters and '-' for separation, i.e. satisfy: * /^[a-z0-9][a-z0-9-]+[a-z0-9]$/i * - * @param {String} aType The type of the ping. - * @param {Object} aPayload The actual data payload for the ping. - * @param {Object} [aOptions] Options object. - * @param {Boolean} [aOptions.addClientId=false] true if the ping should contain the client + * @param {string} aType The type of the ping. + * @param {object} aPayload The actual data payload for the ping. + * @param {object} [aOptions] Options object. + * @param {boolean} [aOptions.addClientId=false] true if the ping should contain the client * id, false otherwise. - * @param {Boolean} [aOptions.addEnvironment=false] true if the ping should contain the + * @param {boolean} [aOptions.addEnvironment=false] true if the ping should contain the * environment data. - * @param {Object} [aOptions.overrideEnvironment=null] set to override the environment data. - * @param {Boolean} [aOptions.usePingSender=false] if true, send the ping using the PingSender. - * @param {String} [aOptions.overrideClientId=undefined] if set, override the + * @param {object} [aOptions.overrideEnvironment=null] set to override the environment data. + * @param {boolean} [aOptions.usePingSender=false] if true, send the ping using the PingSender. + * @param {string} [aOptions.overrideClientId=undefined] if set, override the * client id to the provided value. Implies aOptions.addClientId=true. - * @param {String} [aOptions.overrideProfileGroupId=undefined] if set, override the + * @param {string} [aOptions.overrideProfileGroupId=undefined] if set, override the * profile group id to the provided value. Implies aOptions.addClientId=true. * @returns {Promise} Test-only - a promise that resolves with the ping id once the ping is stored or sent. */ @@ -181,19 +181,19 @@ export var TelemetryController = Object.freeze({ /** * Save a ping to disk. * - * @param {String} aType The type of the ping. - * @param {Object} aPayload The actual data payload for the ping. - * @param {Object} [aOptions] Options object. - * @param {Boolean} [aOptions.addClientId=false] true if the ping should contain the client + * @param {string} aType The type of the ping. + * @param {object} aPayload The actual data payload for the ping. + * @param {object} [aOptions] Options object. + * @param {boolean} [aOptions.addClientId=false] true if the ping should contain the client * id, false otherwise. - * @param {Boolean} [aOptions.addEnvironment=false] true if the ping should contain the + * @param {boolean} [aOptions.addEnvironment=false] true if the ping should contain the * environment data. - * @param {Boolean} [aOptions.overwrite=false] true overwrites a ping with the same name, + * @param {boolean} [aOptions.overwrite=false] true overwrites a ping with the same name, * if found. - * @param {Object} [aOptions.overrideEnvironment=null] set to override the environment data. - * @param {String} [aOptions.overrideClientId=undefined] if set, override the + * @param {object} [aOptions.overrideEnvironment=null] set to override the environment data. + * @param {string} [aOptions.overrideClientId=undefined] if set, override the * client id to the provided value. Implies aOptions.addClientId=true. - * @param {String} [aOptions.overrideProfileGroupId=undefined] if set, override the + * @param {string} [aOptions.overrideProfileGroupId=undefined] if set, override the * profile group id to the provided value. Implies aOptions.addClientId=true. * * @returns {Promise} A promise that resolves with the ping id when the ping is saved to @@ -221,7 +221,7 @@ export var TelemetryController = Object.freeze({ /** * Save an aborted-session ping to disk without adding it to the pending pings. * - * @param {Object} aPayload The ping payload data. + * @param {object} aPayload The ping payload data. * @return {Promise} Promise that is resolved when the ping is saved. */ saveAbortedSessionPing(aPayload) { @@ -368,19 +368,19 @@ var Impl = { /** * Assemble a complete ping following the common ping format specification. * - * @param {String} aType The type of the ping. - * @param {Object} aPayload The actual data payload for the ping. - * @param {Object} aOptions Options object. - * @param {Boolean} aOptions.addClientId true if the ping should contain the client + * @param {string} aType The type of the ping. + * @param {object} aPayload The actual data payload for the ping. + * @param {object} aOptions Options object. + * @param {boolean} aOptions.addClientId true if the ping should contain the client * id, false otherwise. - * @param {Boolean} aOptions.addEnvironment true if the ping should contain the + * @param {boolean} aOptions.addEnvironment true if the ping should contain the * environment data. - * @param {Object} [aOptions.overrideEnvironment=null] set to override the environment data. - * @param {String} [aOptions.overrideClientId=undefined] if set, override the + * @param {object} [aOptions.overrideEnvironment=null] set to override the environment data. + * @param {string} [aOptions.overrideClientId=undefined] if set, override the * client id to the provided value. Implies aOptions.addClientId=true. - * @param {String} [aOptions.overrideProfileGroupId=undefined] if set, override the + * @param {string} [aOptions.overrideProfileGroupId=undefined] if set, override the * profile group id to the provided value. Implies aOptions.addClientId=true. - * @returns {Object} An object that contains the assembled ping data. + * @returns {object} An object that contains the assembled ping data. */ assemblePing: function assemblePing(aType, aPayload, aOptions = {}) { this._log.trace( @@ -440,18 +440,18 @@ var Impl = { * Depending on configuration, the ping will be sent to the server (immediately or later) * and archived locally. * - * @param {String} aType The type of the ping. - * @param {Object} aPayload The actual data payload for the ping. - * @param {Object} [aOptions] Options object. - * @param {Boolean} [aOptions.addClientId=false] true if the ping should contain the client + * @param {string} aType The type of the ping. + * @param {object} aPayload The actual data payload for the ping. + * @param {object} [aOptions] Options object. + * @param {boolean} [aOptions.addClientId=false] true if the ping should contain the client * id, false otherwise. - * @param {Boolean} [aOptions.addEnvironment=false] true if the ping should contain the + * @param {boolean} [aOptions.addEnvironment=false] true if the ping should contain the * environment data. - * @param {Object} [aOptions.overrideEnvironment=null] set to override the environment data. - * @param {Boolean} [aOptions.usePingSender=false] if true, send the ping using the PingSender. - * @param {String} [aOptions.overrideClientId=undefined] if set, override the + * @param {object} [aOptions.overrideEnvironment=null] set to override the environment data. + * @param {boolean} [aOptions.usePingSender=false] if true, send the ping using the PingSender. + * @param {string} [aOptions.overrideClientId=undefined] if set, override the * client id to the provided value. Implies aOptions.addClientId=true. - * @param {String} [aOptions.overrideProfileGroupId=undefined] if set, override the + * @param {string} [aOptions.overrideProfileGroupId=undefined] if set, override the * profile group id to the provided value. Implies aOptions.addClientId=true. * @returns {Promise} Test-only - a promise that is resolved with the ping id once the ping is stored or sent. */ @@ -505,18 +505,18 @@ var Impl = { /** * Submit ping payloads to Telemetry. * - * @param {String} aType The type of the ping. - * @param {Object} aPayload The actual data payload for the ping. - * @param {Object} [aOptions] Options object. - * @param {Boolean} [aOptions.addClientId=false] true if the ping should contain the client + * @param {string} aType The type of the ping. + * @param {object} aPayload The actual data payload for the ping. + * @param {object} [aOptions] Options object. + * @param {boolean} [aOptions.addClientId=false] true if the ping should contain the client * id, false otherwise. - * @param {Boolean} [aOptions.addEnvironment=false] true if the ping should contain the + * @param {boolean} [aOptions.addEnvironment=false] true if the ping should contain the * environment data. - * @param {Object} [aOptions.overrideEnvironment=null] set to override the environment data. - * @param {Boolean} [aOptions.usePingSender=false] if true, send the ping using the PingSender. - * @param {String} [aOptions.overrideClientId=undefined] if set, override the + * @param {object} [aOptions.overrideEnvironment=null] set to override the environment data. + * @param {boolean} [aOptions.usePingSender=false] if true, send the ping using the PingSender. + * @param {string} [aOptions.overrideClientId=undefined] if set, override the * client id to the provided value. Implies aOptions.addClientId=true. - * @param {String} [aOptions.overrideProfileGroupId=undefined] if set, override the + * @param {string} [aOptions.overrideProfileGroupId=undefined] if set, override the * profile group id to the provided value. Implies aOptions.addClientId=true. * @returns {Promise} Test-only - a promise that is resolved with the ping id once the ping is stored or sent. */ @@ -565,18 +565,18 @@ var Impl = { /** * Save a ping to disk. * - * @param {String} aType The type of the ping. - * @param {Object} aPayload The actual data payload for the ping. - * @param {Object} aOptions Options object. - * @param {Boolean} aOptions.addClientId true if the ping should contain the client id, + * @param {string} aType The type of the ping. + * @param {object} aPayload The actual data payload for the ping. + * @param {object} aOptions Options object. + * @param {boolean} aOptions.addClientId true if the ping should contain the client id, * false otherwise. - * @param {Boolean} aOptions.addEnvironment true if the ping should contain the + * @param {boolean} aOptions.addEnvironment true if the ping should contain the * environment data. - * @param {Boolean} aOptions.overwrite true overwrites a ping with the same name, if found. - * @param {Object} [aOptions.overrideEnvironment=null] set to override the environment data. - * @param {String} [aOptions.overrideClientId=undefined] if set, override the + * @param {boolean} aOptions.overwrite true overwrites a ping with the same name, if found. + * @param {object} [aOptions.overrideEnvironment=null] set to override the environment data. + * @param {string} [aOptions.overrideClientId=undefined] if set, override the * client id to the provided value. Implies aOptions.addClientId=true. - * @param {String} [aOptions.overrideProfileGroupId=undefined] if set, override the + * @param {string} [aOptions.overrideProfileGroupId=undefined] if set, override the * profile group id to the provided value. Implies aOptions.addClientId=true. * * @returns {Promise} A promise that resolves with the ping id when the ping is saved to @@ -641,7 +641,7 @@ var Impl = { /** * Save an aborted-session ping to disk without adding it to the pending pings. * - * @param {Object} aPayload The ping payload data. + * @param {object} aPayload The ping payload data. * @return {Promise} Promise that is resolved when the ping is saved. */ saveAbortedSessionPing(aPayload) { diff --git a/toolkit/components/telemetry/app/TelemetryEnvironment.sys.mjs b/toolkit/components/telemetry/app/TelemetryEnvironment.sys.mjs @@ -118,11 +118,11 @@ export var TelemetryEnvironment = { * If an annotation with the same id already exists, it will be overwritten. * This triggers a new subsession, subject to throttling. * - * @param {String} id The id of the active experiment. - * @param {String} branch The experiment branch. - * @param {Object} [options] Optional object with options. - * @param {String} [options.type=false] The specific experiment type. - * @param {String} [options.enrollmentId=undefined] The id of the enrollment. + * @param {string} id The id of the active experiment. + * @param {string} branch The experiment branch. + * @param {object} [options] Optional object with options. + * @param {string} [options.type=false] The specific experiment type. + * @param {string} [options.enrollmentId=undefined] The id of the enrollment. */ setExperimentActive(id, branch, options = {}) { if (gGlobalEnvironment) { @@ -136,7 +136,7 @@ export var TelemetryEnvironment = { * Remove an experiment annotation from the environment. * If the annotation exists, a new subsession will triggered. * - * @param {String} id The id of the active experiment. + * @param {string} id The id of the active experiment. */ setExperimentInactive(id) { if (gGlobalEnvironment) { @@ -516,10 +516,10 @@ function getGfxField(aPropertyName, aDefault) { /** * Returns a substring of the input string. * - * @param {String} aString The input string. + * @param {string} aString The input string. * @param {Integer} aMaxLength The maximum length of the returned substring. If this is * greater than the length of the input string, we return the whole input string. - * @return {String} The substring or null if the input string is null. + * @return {string} The substring or null if the input string is null. */ function limitStringToLength(aString, aMaxLength) { if (typeof aString !== "string") { diff --git a/toolkit/components/telemetry/app/TelemetryReportingPolicy.sys.mjs b/toolkit/components/telemetry/app/TelemetryReportingPolicy.sys.mjs @@ -94,7 +94,7 @@ export var Policy = { * If for whatever reason the callee could not display a notice, * it should call `onUserNotifyFailed`. * - * @param {Object} aLog The log object used to log the error in case of failures. + * @param {object} aLog The log object used to log the error in case of failures. * @param {function} aResolve Promise-like callback function, invoked with * `true` (complete) or `false` (error). */ @@ -163,7 +163,7 @@ export var TelemetryReportingPolicy = { * - The data submission preference should be true. * - The datachoices infobar should have been displayed. * - * @return {Boolean} True if we are allowed to upload data, false otherwise. + * @return {boolean} True if we are allowed to upload data, false otherwise. */ canUpload() { return TelemetryReportingPolicyImpl.canUpload(); @@ -278,7 +278,7 @@ var TelemetryReportingPolicyImpl = { /** * Get the date the policy was notified. * - * @return {Object} A date object or null on errors. + * @return {object} A date object or null on errors. */ get dataSubmissionPolicyNotifiedDate() { let prefString = Services.prefs.getStringPref( @@ -318,7 +318,7 @@ var TelemetryReportingPolicyImpl = { /** * Set the date the policy was notified. * - * @param {Object} aDate A valid date object. + * @param {object} aDate A valid date object. */ set dataSubmissionPolicyNotifiedDate(aDate) { this._log.trace("set dataSubmissionPolicyNotifiedDate - aDate: " + aDate); @@ -342,7 +342,7 @@ var TelemetryReportingPolicyImpl = { /** * Get the date the terms of use were accepted. * - * @return {Object} A date object or null on errors. + * @return {object} A date object or null on errors. */ get termsOfUseAcceptedDate() { // For consistency, we use the same method of parsing a stringified @@ -377,7 +377,7 @@ var TelemetryReportingPolicyImpl = { /** * Set the date the policy was notified. * - * @param {Object} aDate A valid date object. + * @param {object} aDate A valid date object. */ set termsOfUseAcceptedDate(aDate) { this._log.trace("set termsOfUseAcceptedDate - aDate: " + aDate); @@ -785,7 +785,7 @@ var TelemetryReportingPolicyImpl = { * user should not qualify to see the legacy policy notification flow and also * not qualify to see the Terms of Use acceptance flow. * - * @return {Boolean} True if we are allowed to upload data, false otherwise. + * @return {boolean} True if we are allowed to upload data, false otherwise. */ canUpload() { // If data submission is disabled, there's no point in showing the infobar. Just diff --git a/toolkit/components/telemetry/app/TelemetryScheduler.sys.mjs b/toolkit/components/telemetry/app/TelemetryScheduler.sys.mjs @@ -199,8 +199,8 @@ export var TelemetryScheduler = { /** * Checks if we can send a daily ping or not. * - * @param {Object} nowDate A date object. - * @return {Boolean} True if we can send the daily ping, false otherwise. + * @param {object} nowDate A date object. + * @return {boolean} True if we can send the daily ping, false otherwise. */ _isDailyPingDue(nowDate) { // The daily ping is not due if we already sent one today. @@ -225,8 +225,8 @@ export var TelemetryScheduler = { /** * Checks if we can send a regular ping or not. * - * @param {Object} nowDate A date object. - * @return {Boolean} True if we can send the regular pings, false otherwise. + * @param {object} nowDate A date object. + * @return {boolean} True if we can send the regular pings, false otherwise. */ _isPeriodicPingDue(nowDate) { // The periodic ping is not due if we already sent one today. @@ -242,8 +242,8 @@ export var TelemetryScheduler = { /** * An helper function to save an aborted-session ping. * - * @param {Number} now The current time, in milliseconds. - * @param {Object} [competingPayload=null] If we are coalescing the daily and the + * @param {number} now The current time, in milliseconds. + * @param {object} [competingPayload=null] If we are coalescing the daily and the * aborted-session pings, this is the payload for the former. Note * that the reason field of this payload will be changed. * @return {Promise} A promise resolved when the ping is saved. @@ -307,7 +307,7 @@ export var TelemetryScheduler = { /** * Performs a scheduler tick. This function manages Telemetry recurring operations. * - * @param {Boolean} [dispatchOnIdle=false] If true, the tick is dispatched in the + * @param {boolean} [dispatchOnIdle=false] If true, the tick is dispatched in the * next idle cycle of the main thread. * @return {Promise} A promise, only used when testing, resolved when the scheduled * operation completes. @@ -406,7 +406,7 @@ export var TelemetryScheduler = { * This is only called from TelemetrySession when a main ping with reason 'environment-change' * is sent. * - * @param {Object} [payload] The payload of the ping that was sent, + * @param {object} [payload] The payload of the ping that was sent, * to be stored as an aborted-session ping. */ rescheduleDailyPing(payload) { diff --git a/toolkit/components/telemetry/app/TelemetrySend.sys.mjs b/toolkit/components/telemetry/app/TelemetrySend.sys.mjs @@ -116,8 +116,8 @@ function isV4PingFormat(aPing) { /** * Check if the provided ping is a deletion-request ping. * - * @param {Object} aPing The ping to check. - * @return {Boolean} True if the ping is a deletion-request ping, false otherwise. + * @param {object} aPing The ping to check. + * @return {boolean} True if the ping is a deletion-request ping, false otherwise. */ function isDeletionRequestPing(aPing) { return isV4PingFormat(aPing) && aPing.type == PING_TYPE_DELETION_REQUEST; @@ -126,7 +126,7 @@ function isDeletionRequestPing(aPing) { /** * Generate a string suitable for including in a profiler marker as a ping description. * - * @param {Object} aPing The ping to describe. + * @param {object} aPing The ping to describe. */ function getPingMarkerString(aPing) { let markerString = aPing.type; @@ -140,7 +140,7 @@ function getPingMarkerString(aPing) { /** * Save the provided ping as a pending ping. * - * @param {Object} aPing The ping to save. + * @param {object} aPing The ping to save. * @return {Promise} A promise resolved when the ping is saved. */ function savePing(aPing) { @@ -171,7 +171,7 @@ function arrayToString(array) { } /** - * @return {String} This returns a string with the gzip compressed data. + * @return {string} This returns a string with the gzip compressed data. */ export function gzipCompressString(string) { let observer = { @@ -256,7 +256,7 @@ export var TelemetrySend = { /** * Initializes this module. * - * @param {Boolean} testing Whether this is run in a test. This changes some behavior + * @param {boolean} testing Whether this is run in a test. This changes some behavior * to enable proper testing. * @return {Promise} Resolved when setup is finished. */ @@ -288,9 +288,9 @@ export var TelemetrySend = { * - send the ping right away if possible or * - save the ping to disk and send it at the next opportunity * - * @param {Object} ping The ping data to send, must be serializable to JSON. - * @param {Object} [aOptions] Options object. - * @param {Boolean} [options.usePingSender=false] if true, send the ping using the PingSender. + * @param {object} ping The ping data to send, must be serializable to JSON. + * @param {object} [aOptions] Options object. + * @param {boolean} [options.usePingSender=false] if true, send the ping using the PingSender. * @return {Promise} Test-only - a promise that is resolved when the ping is sent or saved. */ submitPing(ping, options = {}) { @@ -303,8 +303,8 @@ export var TelemetrySend = { * pings are not sent to the server. * If trying to send a deletion-request ping, don't block it. * - * @param {Object} [ping=null] A ping to be checked. - * @return {Boolean} True if pings can be send to the servers, false otherwise. + * @param {object} [ping=null] A ping to be checked. + * @return {boolean} True if pings can be send to the servers, false otherwise. */ sendingEnabled(ping = null) { return TelemetrySendImpl.sendingEnabled(ping); @@ -400,7 +400,7 @@ var CancellableTimeout = { /** * This waits until either the given timeout passed or the timeout was cancelled. * - * @param {Number} timeoutMs The timeout in ms. + * @param {number} timeoutMs The timeout in ms. * @return {Promise<bool>} Promise that is resolved with false if the timeout was cancelled, * false otherwise. */ @@ -883,7 +883,7 @@ export var TelemetrySendImpl = { /** * Discard old pings from the pending pings and detect overdue ones. * - * @return {Boolean} True if we have overdue pings, false otherwise. + * @return {boolean} True if we have overdue pings, false otherwise. */ async _checkPendingPings() { // Scan the pending pings - that gives us a list sorted by last modified, descending. @@ -1035,8 +1035,8 @@ export var TelemetrySendImpl = { * succeeds, the ping is eventually removed from the disk to prevent duplicated * submissions. * - * @param {String} pingId The id of the ping to send. - * @param {String} submissionURL The complete Telemetry-compliant URL for the ping. + * @param {string} pingId The id of the ping to send. + * @param {string} submissionURL The complete Telemetry-compliant URL for the ping. */ _sendWithPingSender(pingId, submissionURL) { this._log.trace( @@ -1580,7 +1580,7 @@ export var TelemetrySendImpl = { /** * Check if sending is temporarily disabled. * - * @return {Boolean} True if we can send pings to the server right now, false if + * @return {boolean} True if we can send pings to the server right now, false if * sending is temporarily disabled. */ get canSendNow() { @@ -1598,8 +1598,8 @@ export var TelemetrySendImpl = { * If trying to send a "deletion-request" ping, don't block it. * If unified telemetry is off, don't send pings if Telemetry is disabled. * - * @param {Object} [ping=null] A ping to be checked. - * @return {Boolean} True if pings can be send to the servers, false otherwise. + * @param {object} [ping=null] A ping to be checked. + * @return {boolean} True if pings can be send to the servers, false otherwise. */ sendingEnabled(ping = null) { // We only send pings from official builds, but allow overriding this for tests. diff --git a/toolkit/components/telemetry/app/TelemetryStorage.sys.mjs b/toolkit/components/telemetry/app/TelemetryStorage.sys.mjs @@ -251,7 +251,7 @@ export var TelemetryStorage = { /** * Save a pending - outgoing - ping to disk and track it. * - * @param {Object} ping The ping data. + * @param {object} ping The ping data. * @return {Promise} Resolved when the ping was saved. */ savePendingPing(ping) { @@ -261,7 +261,7 @@ export var TelemetryStorage = { /** * Saves session data to disk. * - * @param {Object} sessionData The session data. + * @param {object} sessionData The session data. * @return {Promise} Resolved when the data was saved. */ saveSessionData(sessionData) { @@ -280,7 +280,7 @@ export var TelemetryStorage = { /** * Load a pending ping from disk by id. * - * @param {String} id The pings id. + * @param {string} id The pings id. * @return {Promise} Resolved with the loaded ping data. */ loadPendingPing(id) { @@ -290,7 +290,7 @@ export var TelemetryStorage = { /** * Remove a pending ping from disk by id. * - * @param {String} id The pings id. + * @param {string} id The pings id. * @return {Promise} Resolved when the ping was removed. */ removePendingPing(id) { @@ -419,8 +419,8 @@ export var TelemetryStorage = { /** * Loads a ping file. * - * @param {String} aFilePath The path of the ping file. - * @return {Promise<Object>} A promise resolved with the ping content or rejected if the + * @param {string} aFilePath The path of the ping file. + * @return {Promise<object>} A promise resolved with the ping content or rejected if the * ping contains invalid data. */ async loadPingFile(aFilePath) { @@ -440,10 +440,10 @@ export var TelemetryStorage = { /** * Only used in tests, builds an archived ping path from the ping metadata. * - * @param {String} aPingId The ping id. - * @param {Object} aDate The ping creation date. - * @param {String} aType The ping type. - * @return {String} The full path to the archived ping. + * @param {string} aPingId The ping id. + * @param {object} aDate The ping creation date. + * @param {string} aType The ping type. + * @return {string} The full path to the archived ping. */ _testGetArchivedPingPath(aPingId, aDate, aType) { return getArchivedPingPath(aPingId, aDate, aType); @@ -453,7 +453,7 @@ export var TelemetryStorage = { * Only used in tests, this helper extracts ping metadata from a given filename. * * @param fileName {String} The filename. - * @return {Object} Null if the filename didn't match the expected form. + * @return {object} Null if the filename didn't match the expected form. * Otherwise an object with the extracted data in the form: * { timestamp: <number>, * id: <string>, @@ -807,7 +807,7 @@ var TelemetryStorageImpl = { /** * Loads session data from the session data file. * - * @return {Promise<Object>} A promise resolved with an object on success, + * @return {Promise<object>} A promise resolved with an object on success, * with null otherwise. */ loadSessionData() { @@ -1868,9 +1868,9 @@ var TelemetryStorageImpl = { /** * Loads a ping file. * - * @param {String} aFilePath The path of the ping file. - * @param {Boolean} [aCompressed=false] If |true|, expects the file to be compressed using lz4. - * @return {Promise<Object>} A promise resolved with the ping content or rejected if the + * @param {string} aFilePath The path of the ping file. + * @param {boolean} [aCompressed=false] If |true|, expects the file to be compressed using lz4. + * @return {Promise<object>} A promise resolved with the ping content or rejected if the * ping contains invalid data. * @throws {PingReadError} There was an error while reading the ping file from the disk. * @throws {PingParseError} There was an error while parsing the JSON content of the ping file. @@ -1910,7 +1910,7 @@ var TelemetryStorageImpl = { * This helper extracts that data from a given filename. * * @param fileName {String} The filename. - * @return {Object} Null if the filename didn't match the expected form. + * @return {object} Null if the filename didn't match the expected form. * Otherwise an object with the extracted data in the form: * { timestamp: <number>, * id: <string>, @@ -2121,10 +2121,10 @@ function getPingDirectory() { /** * Build the path to the archived ping. * - * @param {String} aPingId The ping id. - * @param {Object} aDate The ping creation date. - * @param {String} aType The ping type. - * @return {String} The full path to the archived ping. + * @param {string} aPingId The ping id. + * @param {object} aDate The ping creation date. + * @param {string} aType The ping type. + * @return {string} The full path to the archived ping. */ function getArchivedPingPath(aPingId, aDate, aType) { // Get the ping creation date and generate the archive directory to hold it. Note @@ -2176,8 +2176,8 @@ var getPendingPingSize = async function (aPingId) { /** * Check if a directory name is in the "YYYY-MM" format. * - * @param {String} aDirName The name of the pings archive directory. - * @return {Boolean} True if the directory name is in the right format, false otherwise. + * @param {string} aDirName The name of the pings archive directory. + * @return {boolean} True if the directory name is in the right format, false otherwise. */ function isValidArchiveDir(aDirName) { const dirRegEx = /^[0-9]{4}-[0-9]{2}$/; @@ -2187,9 +2187,9 @@ function isValidArchiveDir(aDirName) { /** * Gets a date object from an archive directory name. * - * @param {String} aDirName The name of the pings archive directory. Must be in the YYYY-MM + * @param {string} aDirName The name of the pings archive directory. Must be in the YYYY-MM * format. - * @return {Object} A Date object or null if the dir name is not valid. + * @return {object} A Date object or null if the dir name is not valid. */ function getDateFromArchiveDir(aDirName) { let [year, month] = aDirName.split("-"); diff --git a/toolkit/components/telemetry/app/TelemetryUtils.sys.mjs b/toolkit/components/telemetry/app/TelemetryUtils.sys.mjs @@ -157,10 +157,10 @@ export var TelemetryUtils = { /** * Check if the difference between the times is within the provided tolerance. * - * @param {Number} t1 A time in milliseconds. - * @param {Number} t2 A time in milliseconds. - * @param {Number} tolerance The tolerance, in milliseconds. - * @return {Boolean} True if the absolute time difference is within the tolerance, false + * @param {number} t1 A time in milliseconds. + * @param {number} t2 A time in milliseconds. + * @param {number} tolerance The tolerance, in milliseconds. + * @return {boolean} True if the absolute time difference is within the tolerance, false * otherwise. */ areTimesClose(t1, t2, tolerance) { @@ -170,8 +170,8 @@ export var TelemetryUtils = { /** * Get the next midnight for a date. * - * @param {Object} date The date object to check. - * @return {Object} The Date object representing the next midnight. + * @param {object} date The date object to check. + * @return {object} The Date object representing the next midnight. */ getNextMidnight(date) { let nextMidnight = new Date(this.truncateToDays(date)); @@ -182,9 +182,9 @@ export var TelemetryUtils = { /** * Get the midnight which is closer to the provided date. * - * @param {Object} date The date object to check. - * @param {Number} tolerance The tolerance within we find the closest midnight. - * @return {Object} The Date object representing the closes midnight, or null if midnight + * @param {object} date The date object to check. + * @param {number} tolerance The tolerance within we find the closest midnight. + * @return {object} The Date object representing the closes midnight, or null if midnight * is not within the midnight tolerance. */ getNearestMidnight(date, tolerance) { @@ -211,8 +211,8 @@ export var TelemetryUtils = { /** * Find how many months passed between two dates. * - * @param {Object} aStartDate The starting date. - * @param {Object} aEndDate The ending date. + * @param {object} aStartDate The starting date. + * @param {object} aEndDate The ending date. * @return {Integer} The number of months between the two dates. */ getElapsedTimeInMonths(aStartDate, aEndDate) { @@ -227,8 +227,8 @@ export var TelemetryUtils = { * Date.toISOString() gives us UTC times, this gives us local times in * the ISO date format. See http://www.w3.org/TR/NOTE-datetime * - * @param {Object} date The input date. - * @return {String} The local time ISO string. + * @param {object} date The input date. + * @return {string} The local time ISO string. */ toLocalTimeISOString(date) { function padNumber(number, length) { diff --git a/toolkit/components/telemetry/pings/EventPing.sys.mjs b/toolkit/components/telemetry/pings/EventPing.sys.mjs @@ -154,7 +154,7 @@ export var TelemetryEventPing = { /** * Submits an "event" ping and restarts the timer for the next interval. * - * @param {String} reason The reason we're sending the ping. One of TelemetryEventPing.Reason. + * @param {string} reason The reason we're sending the ping. One of TelemetryEventPing.Reason. * @param {bool} discardLeftovers Whether to discard event records left over from a previous ping. */ _submitPing(reason, discardLeftovers = false) { diff --git a/toolkit/components/telemetry/pings/HealthPing.sys.mjs b/toolkit/components/telemetry/pings/HealthPing.sys.mjs @@ -80,7 +80,7 @@ export var TelemetryHealthPing = { /** * Record a failure to send a ping out. * - * @param {String} failureType The type of failure (e.g. "timeout", ...). + * @param {string} failureType The type of failure (e.g. "timeout", ...). * @returns {Promise} Test-only, resolved when the ping is stored or sent. */ recordSendFailure(failureType) { @@ -90,7 +90,7 @@ export var TelemetryHealthPing = { /** * Record that a ping was discarded and its type. * - * @param {String} pingType The type of discarded ping (e.g. "main", ...). + * @param {string} pingType The type of discarded ping (e.g. "main", ...). * @returns {Promise} Test-only, resolved when the ping is stored or sent. */ recordDiscardedPing(pingType) { @@ -100,8 +100,8 @@ export var TelemetryHealthPing = { /** * Assemble payload. * - * @param {String} reason A string indicating the triggering reason (e.g. "immediate", "delayed", "shutdown"). - * @returns {Object} The assembled payload. + * @param {string} reason A string indicating the triggering reason (e.g. "immediate", "delayed", "shutdown"). + * @returns {object} The assembled payload. */ _assemblePayload(reason) { this._log.trace("_assemblePayload()"); @@ -124,8 +124,8 @@ export var TelemetryHealthPing = { /** * Sort input dictionary descending by value. * - * @param {Object} failures A dictionary of failures subtype and count. - * @returns {Object} Sorted failures by value. + * @param {object} failures A dictionary of failures subtype and count. + * @returns {object} Sorted failures by value. */ _getTopDiscardFailures(failures) { this._log.trace("_getTopDiscardFailures()"); @@ -144,7 +144,7 @@ export var TelemetryHealthPing = { /** * Assemble the failure information and submit it. * - * @param {String} reason A string indicating the triggering reason (e.g. "immediate", "delayed", "shutdown"). + * @param {string} reason A string indicating the triggering reason (e.g. "immediate", "delayed", "shutdown"). * @returns {Promise} Test-only promise that resolves when the ping was stored or sent (if any). */ _submitPing(reason) { @@ -181,8 +181,8 @@ export var TelemetryHealthPing = { /** * Accumulate failure information and trigger a ping immediately or on timeout. * - * @param {String} failureType The type of failure (e.g. "timeout", ...). - * @param {String} failureSubType The subtype of failure (e.g. ping type, ...). + * @param {string} failureType The type of failure (e.g. "timeout", ...). + * @param {string} failureSubType The subtype of failure (e.g. ping type, ...). * @returns {Promise} Test-only, resolved when the ping is stored or sent. */ _addToFailure(failureType, failureSubType) { diff --git a/toolkit/components/telemetry/pings/TelemetrySession.sys.mjs b/toolkit/components/telemetry/pings/TelemetrySession.sys.mjs @@ -72,8 +72,8 @@ export var Policy = { /** * Get the ping type based on the payload. * - * @param {Object} aPayload The ping payload. - * @return {String} A string representing the ping type. + * @param {object} aPayload The ping payload. + * @return {string} A string representing the ping type. */ function getPingType(aPayload) { // To remain consistent with server-side ping handling, set "saved-session" as the ping @@ -280,7 +280,7 @@ export var TelemetrySession = Object.freeze({ * Returns if the "new-profile" ping has ever been sent for this profile. * Please note that the returned value is trustworthy only after the delayed setup. * - * @return {Boolean} True if the new profile ping was sent on this profile, + * @return {boolean} True if the new profile ping was sent on this profile, * false otherwise. */ get newProfilePingSent() { @@ -371,8 +371,8 @@ var Impl = { * Gets a series of simple measurements (counters). At the moment, this * only returns startup data from nsIAppStartup.getStartupInfo(). * - * @param {Boolean} isSubsession True if this is a subsession, false otherwise. - * @param {Boolean} clearSubsession True if a new subsession is being started, false otherwise. + * @param {boolean} isSubsession True if this is a subsession, false otherwise. + * @param {boolean} clearSubsession True if a new subsession is being started, false otherwise. * * @return simple measurements as a dictionary. */ @@ -484,7 +484,7 @@ var Impl = { * @param {subsession} If true, then we collect the data for a subsession. * @param {clearSubsession} If true, we need to clear the subsession. * @param {keyed} Take a snapshot of keyed or non keyed scalars. - * @return {Object} The scalar data as a Javascript object, including the + * @return {object} The scalar data as a Javascript object, including the * data from child processes, in the following format: * {'content': { 'scalarName': ... }, 'gpu': { ... } } */ @@ -1401,7 +1401,7 @@ var Impl = { /** * Saves the aborted session ping to disk. * - * @param {Object} [aProvidedPayload=null] A payload object to be used as an aborted + * @param {object} [aProvidedPayload=null] A payload object to be used as an aborted * session ping. The reason of this payload is changed to aborted-session. * If not provided, a new payload is gathered. */ diff --git a/toolkit/components/telemetry/pings/UpdatePing.sys.mjs b/toolkit/components/telemetry/pings/UpdatePing.sys.mjs @@ -54,9 +54,9 @@ export var UpdatePing = { * Generate an "update" ping with reason "success" and dispatch it * to the Telemetry system. * - * @param {String} aPreviousVersion The browser version we updated from. - * @param {String} aPreviousBuildId The browser build id we updated from. - * @param {String} progress An object to measure the progress of handleUpdateSuccess + * @param {string} aPreviousVersion The browser version we updated from. + * @param {string} aPreviousBuildId The browser build id we updated from. + * @param {string} progress An object to measure the progress of handleUpdateSuccess * to provide to the shutdown blocker (Bug 1917651) */ async handleUpdateSuccess(aPreviousVersion, aPreviousBuildId, progress) { @@ -118,7 +118,7 @@ export var UpdatePing = { * Generate an "update" ping with reason "ready" and dispatch it * to the Telemetry system. * - * @param {String} aUpdateState The state of the downloaded patch. See + * @param {string} aUpdateState The state of the downloaded patch. See * nsIUpdateService.idl for a list of possible values. */ async _handleUpdateReady(aUpdateState) { diff --git a/toolkit/components/telemetry/tests/unit/head.js b/toolkit/components/telemetry/tests/unit/head.js @@ -142,8 +142,8 @@ const PingServer = { /** * Decode the payload of an HTTP request into a ping. * - * @param {Object} request The data representing an HTTP request (nsIHttpRequest). - * @return {Object} The decoded ping payload. + * @param {object} request The data representing an HTTP request (nsIHttpRequest). + * @return {object} The decoded ping payload. */ function decodeRequestPayload(request) { let s = request.bodyInputStream; diff --git a/toolkit/components/telemetry/tests/unit/test_PingAPI.js b/toolkit/components/telemetry/tests/unit/test_PingAPI.js @@ -32,7 +32,7 @@ function fakeStorageQuota(aArchiveQuota) { /** * Lists all the valid archived pings and their metadata, sorted by creation date. * - * @return {Object[]} A list of objects with the extracted data in the form: + * @return {object[]} A list of objects with the extracted data in the form: * { timestamp: <number>, * id: <string>, * type: <string>, diff --git a/toolkit/components/telemetry/tests/unit/test_UserInteraction_annotations.js b/toolkit/components/telemetry/tests/unit/test_UserInteraction_annotations.js @@ -81,15 +81,15 @@ function startProfiler() { * the UserInteraction backend added. This function only checks * markers on thread 0. * - * @param {Object} profile + * @param {object} profile * A profile returned from Services.profiler.getProfileData(); - * @param {String} value + * @param {string} value * The value that the marker is expected to have. - * @param {String} additionalText + * @param {string} additionalText * (Optional) If additionalText was provided when finishing the * UserInteraction, then markerCount will check for a marker with * text in the form of "value,additionalText". - * @returns {Number} + * @returns {number} * A count of how many markers appear that match the criteria. */ function markerCount(profile, value, additionalText) { @@ -117,7 +117,7 @@ function markerCount(profile, value, additionalText) { * * @param {nsIHangReport} report * The hang report to check the annotations of. - * @param {String} value + * @param {string} value * The value that the annotation should have. * @returns {boolean} * True if the annotation was found. @@ -137,7 +137,7 @@ function hasHangAnnotation(report, value) { * * @param {nsIHangReport} report * The hang report to check the annotations of. - * @param {String} value + * @param {string} value * The value that the annotation should have. * @returns {boolean} * True if the annotation was found. diff --git a/toolkit/components/telemetry/tests/utils/TelemetryTestUtils.sys.mjs b/toolkit/components/telemetry/tests/utils/TelemetryTestUtils.sys.mjs @@ -9,10 +9,10 @@ export var TelemetryTestUtils = { /** * A helper that asserts the value of a scalar. * - * @param {Object} scalars The snapshot of the scalars. - * @param {String} scalarName The name of the scalar to check. - * @param {Boolean|Number|String} value The expected value for the scalar. - * @param {String} msg The message to print when checking the value. + * @param {object} scalars The snapshot of the scalars. + * @param {string} scalarName The name of the scalar to check. + * @param {boolean | number | string} value The expected value for the scalar. + * @param {string} msg The message to print when checking the value. */ assertScalar(scalars, scalarName, value, msg) { Assert.equal(scalars[scalarName], value, msg); @@ -21,8 +21,8 @@ export var TelemetryTestUtils = { /** * A helper that asserts a scalar is not set. * - * @param {Object} scalars The snapshot of the scalars. - * @param {String} scalarName The name of the scalar to check. + * @param {object} scalars The snapshot of the scalars. + * @param {string} scalarName The name of the scalar to check. */ assertScalarUnset(scalars, scalarName) { Assert.ok(!(scalarName in scalars), scalarName + " must not be reported."); @@ -32,10 +32,10 @@ export var TelemetryTestUtils = { * Asserts if the snapshotted keyed scalars contain the expected * data. * - * @param {Object} scalars The snapshot of the keyed scalars. - * @param {String} scalarName The name of the keyed scalar to check. - * @param {String} key The key that must be within the keyed scalar. - * @param {String|Boolean|Number} expectedValue The expected value for the + * @param {object} scalars The snapshot of the keyed scalars. + * @param {string} scalarName The name of the keyed scalar to check. + * @param {string} key The key that must be within the keyed scalar. + * @param {string | boolean | number} expectedValue The expected value for the * provided key in the scalar. */ assertKeyedScalar(scalars, scalarName, key, expectedValue) { @@ -54,14 +54,14 @@ export var TelemetryTestUtils = { /** * Returns a snapshot of scalars from the specified process. * - * @param {String} aProcessName Name of the process. Could be parent or + * @param {string} aProcessName Name of the process. Could be parent or * something else. * @param {boolean} [aKeyed] Set to true if keyed scalars rather than normal * scalars should be snapshotted. * @param {boolean} [aClear] Set to true to clear the scalars once the snapshot * has been obtained. - * @param {Number} aChannel The channel dataset type from nsITelemetry. - * @returns {Object} The snapshotted scalars from the parent process. + * @param {number} aChannel The channel dataset type from nsITelemetry. + * @returns {object} The snapshotted scalars from the parent process. */ getProcessScalars( aProcessName, @@ -86,9 +86,9 @@ export var TelemetryTestUtils = { /** * Asserts that the number of events, after filtering, is equal to numEvents. * - * @param {Number} numEvents The number of events to assert. - * @param {Object} filter As per assertEvents. - * @param {Object} options As per assertEvents. + * @param {number} numEvents The number of events to assert. + * @param {object} filter As per assertEvents. + * @param {object} options As per assertEvents. */ assertNumberOfEvents(numEvents, filter, options) { // Create an array of empty objects of length numEvents @@ -102,10 +102,10 @@ export var TelemetryTestUtils = { /** * Returns the events in a snapshot, after optional filtering. * - * @param {Object} filter An object of strings or RegExps for first filtering + * @param {object} filter An object of strings or RegExps for first filtering * the event snapshot. Of the form {category, method, object}. * Absent filters filter nothing. - * @param {Object} options An object containing any of + * @param {object} options An object containing any of * - process {string} the process to examine. Default parent. */ getEvents(filter = {}, { process = "parent" } = {}) { @@ -173,10 +173,10 @@ export var TelemetryTestUtils = { * matches by returning true when called with the field. * `extra` is slightly different. If present it must be an * object whose fields are treated the same way as the others. - * @param {Object} filter An object of strings or RegExps for first filtering + * @param {object} filter An object of strings or RegExps for first filtering * the event snapshot. Of the form {category, method, object}. * Absent filters filter nothing. - * @param {Object} options An object containing any of + * @param {object} options An object containing any of * - clear {bool} clear events. Default true. * - process {string} the process to examine. Default parent. */ @@ -320,8 +320,8 @@ export var TelemetryTestUtils = { /** * Clear and get the named histogram. * - * @param {String} name The name of the histogram - * @returns {Object} The obtained histogram. + * @param {string} name The name of the histogram + * @returns {object} The obtained histogram. */ getAndClearHistogram(name) { let histogram = Services.telemetry.getHistogramById(name); @@ -332,8 +332,8 @@ export var TelemetryTestUtils = { /** * Clear and get the named keyed histogram. * - * @param {String} name The name of the keyed histogram - * @returns {Object} The obtained keyed histogram. + * @param {string} name The name of the keyed histogram + * @returns {object} The obtained keyed histogram. */ getAndClearKeyedHistogram(name) { let histogram = Services.telemetry.getKeyedHistogramById(name); @@ -345,9 +345,9 @@ export var TelemetryTestUtils = { * Assert that the histogram index is the right value. It expects that * other indexes are all zero. * - * @param {Object} histogram The histogram to check. - * @param {Number} index The index to check against the expected value. - * @param {Number} expected The expected value of the index. + * @param {object} histogram The histogram to check. + * @param {number} index The index to check against the expected value. + * @param {number} expected The expected value of the index. */ assertHistogram(histogram, index, expected) { const snapshot = histogram.snapshot(); @@ -377,9 +377,9 @@ export var TelemetryTestUtils = { /** * Assert that a key within a keyed histogram contains the required sum. * - * @param {Object} histogram The keyed histogram to check. - * @param {String} key The key to check. - * @param {Number} [expected] The expected sum for the key. + * @param {object} histogram The keyed histogram to check. + * @param {string} key The key to check. + * @param {number} [expected] The expected sum for the key. */ assertKeyedHistogramSum(histogram, key, expected) { const snapshot = histogram.snapshot(); @@ -405,10 +405,10 @@ export var TelemetryTestUtils = { * Assert that the value of a key within a keyed histogram is the right value. * It expects that other values are all zero. * - * @param {Object} histogram The keyed histogram to check. - * @param {String} key The key to check. - * @param {Number} index The index to check against the expected value. - * @param {Number} [expected] The expected values for the key. + * @param {object} histogram The keyed histogram to check. + * @param {string} key The key to check. + * @param {number} index The index to check against the expected value. + * @param {number} [expected] The expected values for the key. */ assertKeyedHistogramValue(histogram, key, index, expected) { const snapshot = histogram.snapshot(); diff --git a/toolkit/components/thumbnails/test/head.js b/toolkit/components/thumbnails/test/head.js @@ -183,10 +183,10 @@ function bgCaptureIfMissing(aURL, aOptions) { /** * Queues a BackgroundPageThumbs capture with the supplied method. * - * @param {String} aMethodName One of the method names on BackgroundPageThumbs + * @param {string} aMethodName One of the method names on BackgroundPageThumbs * for capturing thumbnails. Example: "capture", "captureIfMissing". - * @param {String} aURL The URL of the page to capture. - * @param {Object} aOptions The options object to pass to BackgroundPageThumbs. + * @param {string} aURL The URL of the page to capture. + * @param {object} aOptions The options object to pass to BackgroundPageThumbs. * * @returns {Promise} * @resolves {Array} Resolves once the capture has completed with an Array of diff --git a/toolkit/components/url-classifier/tests/UrlClassifierTestUtils.sys.mjs b/toolkit/components/url-classifier/tests/UrlClassifierTestUtils.sys.mjs @@ -373,8 +373,8 @@ export var UrlClassifierTestUtils = { /** * Handle the next "urlclassifier-before-block-channel" event. * - * @param {Object} options - * @param {String} [options.filterOrigin] - Only handle event for channels + * @param {object} options + * @param {string} [options.filterOrigin] - Only handle event for channels * with matching origin. * @param {function} [options.onBeforeBlockChannel] - Optional callback for * the event. Called before acting on the channel. diff --git a/toolkit/components/url-classifier/tests/performance/perftest_exceptionListLookup.js b/toolkit/components/url-classifier/tests/performance/perftest_exceptionListLookup.js @@ -29,7 +29,7 @@ var perfMetadata = { /** * Convert a JS object from RemoteSettings to an nsIUrlClassifierExceptionListEntry. * - * @param {Object} rsObject - The JS object from RemoteSettings to convert. + * @param {object} rsObject - The JS object from RemoteSettings to convert. * @returns {nsIUrlClassifierExceptionListEntry} The converted nsIUrlClassifierExceptionListEntry. */ function rsObjectToEntry(rsObject) { diff --git a/toolkit/components/url-classifier/tests/unit/test_urlClassifierExceptionList.js b/toolkit/components/url-classifier/tests/unit/test_urlClassifierExceptionList.js @@ -16,7 +16,7 @@ const ALLOW_LIST_CONVENIENCE_PREF = * Convert a JS object from RemoteSettings to an nsIUrlClassifierExceptionListEntry. * Copied from UrlClassifierExceptionListService.sys.mjs with modifications. * - * @param {Object} rsObject - The JS object from RemoteSettings to convert. + * @param {object} rsObject - The JS object from RemoteSettings to convert. * @returns {nsIUrlClassifierExceptionListEntry} The converted nsIUrlClassifierExceptionListEntry. */ function rsObjectToEntry(rsObject) { diff --git a/toolkit/components/utils/FilterExpressions.sys.mjs b/toolkit/components/utils/FilterExpressions.sys.mjs @@ -64,7 +64,7 @@ export var FilterExpressions = { * Return an array of the given object's own keys (specifically, its enumerable * properties), or undefined if the argument isn't an object. * - * @param {Object} obj + * @param {object} obj * @return {Array[String]|undefined} */ function keys(obj) { @@ -80,7 +80,7 @@ function keys(obj) { * enumerable string-keyed property values), or undefined if the argument isn't * an object. * - * @param {Object} obj + * @param {object} obj * @return {Array|undefined} */ function values(obj) { diff --git a/toolkit/components/utils/Sampling.sys.mjs b/toolkit/components/utils/Sampling.sys.mjs @@ -25,7 +25,7 @@ export var Sampling = { /** * @param {ArrayBuffer} buffer Data to convert - * @returns {String} `buffer`'s content, converted to a hexadecimal string. + * @returns {string} `buffer`'s content, converted to a hexadecimal string. */ bufferToHex(buffer) { const hexCodes = []; @@ -83,7 +83,7 @@ export var Sampling = { * into the first bucket. * * @param {object} input Input to hash to determine the sample. - * @param {Number} rate Number between 0.0 and 1.0 to sample at. A value of + * @param {number} rate Number between 0.0 and 1.0 to sample at. A value of * 0.25 returns true 25% of the time. * @promises {boolean} True if the input is in the sample. */ diff --git a/toolkit/components/utils/WindowsInstallsInfo.sys.mjs b/toolkit/components/utils/WindowsInstallsInfo.sys.mjs @@ -9,7 +9,7 @@ export var WindowsInstallsInfo = { * Installs from unarchived packages do not have a TaskBarID registry key and * therefore won't appear in the result. * - * @param {Number} [limit] Optional, maximum number of installation paths to count. + * @param {number} [limit] Optional, maximum number of installation paths to count. Defaults to 1024. * @param {Set} [exclude] Optional, an Set of paths to exclude from the count. * @returns {Set} Set of install paths, lower cased. diff --git a/toolkit/content/aboutLogging/profileSaveUploadLogic.mjs b/toolkit/content/aboutLogging/profileSaveUploadLogic.mjs @@ -161,7 +161,7 @@ export class ProfileSaveOrUploadDialog { * The progress is reported with the callback onProgress. The parameter to * this function is a number between 0 and 1. * - * @param {Object} options + * @param {object} options * @param {(progress: number) => unknown} options.onProgress * @returns {Promise<string>} The JWT token returned by the server */ diff --git a/toolkit/content/aboutLogging/profileStorage.mjs b/toolkit/content/aboutLogging/profileStorage.mjs @@ -41,7 +41,7 @@ function initDB() { /** * Save uploaded profile information to IndexedDB. * - * @param {Object} profileInfo + * @param {object} profileInfo * @param {string} profileInfo.jwtToken - The JWT token returned by the server * @param {string} profileInfo.profileToken - The profile token extracted from JWT * @param {string} profileInfo.profileUrl - The full profile URL @@ -116,7 +116,7 @@ export async function deleteUploadedProfile(profileId) { * Get a specific uploaded profile by ID. * * @param {number} profileId - The ID of the profile to retrieve - * @returns {Promise<Object|null>} The profile information or null if not found + * @returns {Promise<object | null>} The profile information or null if not found */ export async function getUploadedProfile(profileId) { const db = await initDB(); diff --git a/toolkit/content/customElements.js b/toolkit/content/customElements.js @@ -349,7 +349,7 @@ /** * Implements attribute value inheritance by child elements. * - * @param {array} list + * @param {Array} list * An array of (to-element-selector, to-attr) pairs. * @param {string} attr * An attribute to propagate. diff --git a/toolkit/content/preferences/Setting.mjs b/toolkit/content/preferences/Setting.mjs @@ -104,7 +104,7 @@ import { Preferences } from "chrome://global/content/preferences/Preferences.mjs */ /** - * @typedef {Object} SettingControllingExtensionInfo + * @typedef {object} SettingControllingExtensionInfo * @property {string} storeId The ExtensionSettingsStore id that controls this setting. * @property {string} l10nId A fluent id to show in a controlled by extension message. * @property {string} [name] The controlling extension's name. diff --git a/toolkit/content/tests/browser/browser_crash_previous_frameloader.js b/toolkit/content/tests/browser/browser_crash_previous_frameloader.js @@ -7,7 +7,7 @@ * The subject passed through the ipc:content-shutdown * observer notification when a content process crash has * occurred. - * @returns {String} The crash dump id. + * @returns {string} The crash dump id. */ function getCrashDumpId(subject) { Assert.ok( diff --git a/toolkit/content/tests/browser/datetime/head.js b/toolkit/content/tests/browser/datetime/head.js @@ -18,9 +18,9 @@ class DateTimeTestHelper { * Opens a new tab with the URL of the test page, and make sure the picker is * ready for testing. * - * @param {String} pageUrl + * @param {string} pageUrl * @param {bool} inFrame true if input is in the first child frame - * @param {String} openMethod "click" or "showPicker" + * @param {string} openMethod "click" or "showPicker" */ async openPicker(pageUrl, inFrame, openMethod = "click") { this.tab = await BrowserTestUtils.openNewForegroundTab(gBrowser, pageUrl); @@ -91,7 +91,7 @@ class DateTimeTestHelper { /** * Find an element on the picker. * - * @param {String} selector + * @param {string} selector * @return {DOMElement} */ getElement(selector) { @@ -101,7 +101,7 @@ class DateTimeTestHelper { /** * Find the children of an element on the picker. * - * @param {String} selector + * @param {string} selector * @return {Array<DOMElement>} */ getChildren(selector) { @@ -215,7 +215,7 @@ function getCalendarClassList() { * Helper function to find and return a gridcell element * for a specific day of the month * - * @param {Number} day: A day of the month to find in the month grid + * @param {number} day: A day of the month to find in the month grid * * @return {HTMLElement} A gridcell that represents the needed day of the month */ @@ -234,7 +234,7 @@ function mergeArrays(a, b) { * Helper function to check if a DOM element has a specific attribute * * @param {DOMElement} el: DOM Element to be tested - * @param {String} attr: The name of the attribute to be tested + * @param {string} attr: The name of the attribute to be tested */ function testAttribute(el, attr) { Assert.ok( @@ -247,9 +247,9 @@ function testAttribute(el, attr) { * Helper function to check for l10n of an element's attribute * * @param {DOMElement} el: DOM Element to be tested - * @param {String} attr: The name of the attribute to be tested - * @param {String} id: Value of the "data-l10n-id" attribute of the element - * @param {Object} args: Args provided by the l10n object of the element + * @param {string} attr: The name of the attribute to be tested + * @param {string} id: Value of the "data-l10n-id" attribute of the element + * @param {object} args: Args provided by the l10n object of the element */ function testAttributeL10n(el, attr, id, args = null) { testAttribute(el, attr); @@ -259,9 +259,9 @@ function testAttributeL10n(el, attr, id, args = null) { /** * Helper function to check the value of a Calendar button's specific attribute * - * @param {String} attr: The name of the attribute to be tested - * @param {String} val: Value that is expected to be assigned to the attribute. - * @param {Boolean} presenceOnly: If "true", test only the presence of the attribute + * @param {string} attr: The name of the attribute to be tested + * @param {string} val: Value that is expected to be assigned to the attribute. + * @param {boolean} presenceOnly: If "true", test only the presence of the attribute */ async function testCalendarBtnAttribute(attr, val, presenceOnly = false) { let browser = helper.tab.linkedBrowser; @@ -294,10 +294,10 @@ async function testCalendarBtnAttribute(attr, val, presenceOnly = false) { * Helper function to test if a submission/dismissal keyboard shortcut works * on a month or a year selection spinner * - * @param {String} key: A keyboard Event.key that will be synthesized - * @param {Object} document: Reference to the content document + * @param {string} key: A keyboard Event.key that will be synthesized + * @param {object} document: Reference to the content document * of the #dateTimePopupFrame - * @param {Number} tabs: How many times "Tab" key should be pressed + * @param {number} tabs: How many times "Tab" key should be pressed * to move a keyboard focus to a needed spinner * (1 for month/default and 2 for year) * @@ -362,8 +362,8 @@ async function testKeyOnSpinners(key, document, tabs = 1) { * Helper function to check for localization attributes of a DOM element * * @param {DOMElement} el: DOM Element to be tested - * @param {String} id: Value of the "data-l10n-id" attribute of the element - * @param {Object} args: Args provided by the l10n object of the element + * @param {string} id: Value of the "data-l10n-id" attribute of the element + * @param {object} args: Args provided by the l10n object of the element */ function testLocalization(el, id, args = null) { const l10nAttrs = document.l10n.getAttributes(el); @@ -382,10 +382,10 @@ function testLocalization(el, id, args = null) { * Helper function to check if a CSS property respects reduced motion mode * * @param {DOMElement} el: DOM Element to be tested - * @param {String} prop: The name of the CSS property to be tested - * @param {Object} valueNotReduced: Default value of the tested CSS property + * @param {string} prop: The name of the CSS property to be tested + * @param {object} valueNotReduced: Default value of the tested CSS property * for "prefers-reduced-motion: no-preference" - * @param {String} valueReduced: Value of the tested CSS property + * @param {string} valueReduced: Value of the tested CSS property * for "prefers-reduced-motion: reduce" */ async function testReducedMotionProp(el, prop, valueNotReduced, valueReduced) { diff --git a/toolkit/content/widgets/browser-custom-element.mjs b/toolkit/content/widgets/browser-custom-element.mjs @@ -1845,22 +1845,22 @@ export class MozBrowser extends MozElements.MozElementMixin(XULFrameElement) { /** * Gets a screenshot of this browser as an ImageBitmap. * - * @param {Number} x + * @param {number} x * The x coordinate of the region from the underlying document to capture * as a screenshot. This is ignored if fullViewport is true. - * @param {Number} y + * @param {number} y * The y coordinate of the region from the underlying document to capture * as a screenshot. This is ignored if fullViewport is true. - * @param {Number} w + * @param {number} w * The width of the region from the underlying document to capture as a * screenshot. This is ignored if fullViewport is true. - * @param {Number} h + * @param {number} h * The height of the region from the underlying document to capture as a * screenshot. This is ignored if fullViewport is true. - * @param {Number} scale + * @param {number} scale * The scale factor for the captured screenshot. See the documentation for * WindowGlobalParent.drawSnapshot for more detail. - * @param {String} backgroundColor + * @param {string} backgroundColor * The default background color for the captured screenshot. See the * documentation for WindowGlobalParent.drawSnapshot for more detail. * @param {boolean|undefined} fullViewport diff --git a/toolkit/content/widgets/calendar.js b/toolkit/content/widgets/calendar.js @@ -8,7 +8,7 @@ * Initialize the Calendar and generate nodes for week headers and days, and * attach event listeners. * - * @param {Object} options + * @param {object} options * { * {Number} calViewSize: Number of days to appear on a calendar view * {Function} getDayString: Transform day number to string @@ -17,7 +17,7 @@ * {Function} setCalendarMonth: Update the month shown by the dateView * to a specific month of a specific year * } - * @param {Object} context + * @param {object} context * { * {DOMElement} weekHeader * {DOMElement} daysView @@ -50,7 +50,7 @@ Calendar.prototype = { /** * Set new properties and render them. * - * @param {Object} props + * @param {object} props * { * {Boolean} isVisible: Whether or not the calendar is in view * {Array<Object>} days: Data for days @@ -107,7 +107,7 @@ Calendar.prototype = { /** * Render the items onto the DOM nodes * - * @param {Object} + * @param {object} * { * {Array<DOMElement>} elements * {Array<Object>} items @@ -212,7 +212,7 @@ Calendar.prototype = { /** * Generate DOM nodes with HTML table markup * - * @param {Number} size: Number of nodes to generate + * @param {number} size: Number of nodes to generate * @param {DOMElement} context: Element to append the nodes to * @return {Array<DOMElement>} */ @@ -403,7 +403,7 @@ Calendar.prototype = { /** * Find Data-id of the next element to focus on the daysView grid * - * @param {Object} nextDate: Data object of the next element to focus + * @param {object} nextDate: Data object of the next element to focus */ _calculateNextId(nextDate) { for (let i = 0; i < this.state.days.length; i++) { @@ -419,7 +419,7 @@ Calendar.prototype = { * * @param {Date} dateObj1: Date object from the updated state * @param {Date} dateObj2: Date object from the previous state - * @return {Boolean} If two date objects are the same day + * @return {boolean} If two date objects are the same day */ _isSameDay(dateObj1, dateObj2) { return ( @@ -435,7 +435,7 @@ Calendar.prototype = { * * @param {Date} dateObj1: Date object from the updated state * @param {Date} dateObj2: Date object from the previous state - * @return {Boolean} If two date objects are the same day of the month + * @return {boolean} If two date objects are the same day of the month */ _isSameDayOfMonth(dateObj1, dateObj2) { return dateObj1.getUTCDate() == dateObj2.getUTCDate(); @@ -444,7 +444,7 @@ Calendar.prototype = { /** * Manage focus for the keyboard navigation for the daysView grid * - * @param {Number} offsetDays: The direction and the number of days to move + * @param {number} offsetDays: The direction and the number of days to move * the focus by, where a negative number (i.e. -1) * moves the focus to the previous day */ diff --git a/toolkit/content/widgets/datekeeper.js b/toolkit/content/widgets/datekeeper.js @@ -43,16 +43,16 @@ function DateKeeper(props) { /** * Initialize DateKeeper * - * @param {Number} year - * @param {Number} month - * @param {Number} day - * @param {Number} min - * @param {Number} max - * @param {Number} step - * @param {Number} stepBase - * @param {Number} firstDayOfWeek - * @param {Array<Number>} weekends - * @param {Number} calViewSize + * @param {number} year + * @param {number} month + * @param {number} day + * @param {number} min + * @param {number} max + * @param {number} step + * @param {number} stepBase + * @param {number} firstDayOfWeek + * @param {Array<number>} weekends + * @param {number} calViewSize */ init({ year, @@ -128,7 +128,7 @@ function DateKeeper(props) { * Set new calendar month. The year is always treated as full year, so the * short-form is not supported. * - * @param {Object} date parts + * @param {object} date parts * { * {Number} year [optional] * {Number} month [optional] @@ -149,9 +149,9 @@ function DateKeeper(props) { /** * Set selection date * - * @param {Number} year - * @param {Number} month - * @param {Number} day + * @param {number} year + * @param {number} month + * @param {number} day */ setSelection({ year, month, day }) { this.state.selection.year = year; @@ -162,7 +162,7 @@ function DateKeeper(props) { /** * Set month. Makes sure the day is <= the last day of the month * - * @param {Number} month + * @param {number} month */ setMonth(month) { this.setCalendarMonth({ year: this.year, month }); @@ -171,7 +171,7 @@ function DateKeeper(props) { /** * Set year. Makes sure the day is <= the last day of the month * - * @param {Number} year + * @param {number} year */ setYear(year) { this.setCalendarMonth({ year, month: this.month }); @@ -180,7 +180,7 @@ function DateKeeper(props) { /** * Set month by offset. Makes sure the day is <= the last day of the month * - * @param {Number} offset + * @param {number} offset */ setMonthByOffset(offset) { this.setCalendarMonth({ year: this.year, month: this.month + offset }); @@ -189,7 +189,7 @@ function DateKeeper(props) { /** * Generate the array of months * - * @return {Array<Object>} + * @return {Array<object>} * { * {Number} value: Month in int * {Boolean} enabled @@ -221,7 +221,7 @@ function DateKeeper(props) { /** * Generate the array of years * - * @return {Array<Object>} + * @return {Array<object>} * { * {Number} value: Year in int * {Boolean} enabled @@ -264,7 +264,7 @@ function DateKeeper(props) { /** * Get days for calendar * - * @return {Array<Object>} + * @return {Array<object>} * { * {Date} dateObj * {Number} content @@ -360,7 +360,7 @@ function DateKeeper(props) { * * @param {Date} start * @param {Date} next - * @return {Boolean} + * @return {boolean} */ _checkIsOffStep(start, next) { // If the increment is larger or equal to the step, it must not be off-step. @@ -380,9 +380,9 @@ function DateKeeper(props) { /** * Get week headers for calendar * - * @param {Number} firstDayOfWeek - * @param {Array<Number>} weekends - * @return {Array<Object>} + * @param {number} firstDayOfWeek + * @param {Array<number>} weekends + * @return {Array<object>} * { * {Number} content * {Array<String>} classNames @@ -408,7 +408,7 @@ function DateKeeper(props) { * Get the first day on a calendar month * * @param {Date} dateObj - * @param {Number} firstDayOfWeek + * @param {number} firstDayOfWeek * @return {Date} */ _getFirstCalendarDate(dateObj, firstDayOfWeek) { @@ -433,7 +433,7 @@ function DateKeeper(props) { /** * Helper function for creating UTC dates * - * @param {...[Number]} parts + * @param {...[number]} parts * @return {Date} */ _newUTCDate(...parts) { diff --git a/toolkit/content/widgets/datepicker.js b/toolkit/content/widgets/datepicker.js @@ -20,7 +20,7 @@ function DatePicker(context) { /** * Initializes the date picker. Set the default states and properties. * - * @param {Object} props + * @param {object} props * { * {Number} year [optional] * {Number} month [optional] @@ -396,7 +396,7 @@ function DatePicker(context) { /** * Set the date state and update the components with the new state. * - * @param {Object} dateState + * @param {object} dateState * { * {Number} year [optional] * {Number} month [optional] @@ -426,7 +426,7 @@ function DatePicker(context) { /** * MonthYear is a component that handles the month & year spinners * - * @param {Object} options + * @param {object} options * { * {String} locale * {Function} setYear @@ -494,7 +494,7 @@ function DatePicker(context) { /** * Set new properties and pass them to components * - * @param {Object} props + * @param {object} props * { * {Boolean} isVisible * {Date} dateObj diff --git a/toolkit/content/widgets/findbar.js b/toolkit/content/widgets/findbar.js @@ -508,8 +508,8 @@ /** * Turns highlighting of all occurrences on or off. * - * @param {Boolean} highlight Whether to turn the highlight on or off. - * @param {Boolean} fromPrefObserver Whether the callee is the pref + * @param {boolean} highlight Whether to turn the highlight on or off. + * @param {boolean} fromPrefObserver Whether the callee is the pref * observer, which means we should not set * the same pref again. */ @@ -545,8 +545,8 @@ /** * Updates the highlight-all mode of the findbar and its UI. * - * @param {Boolean} highlight Whether to turn the highlight on or off. - * @param {Boolean} fromPrefObserver Whether the callee is the pref + * @param {boolean} highlight Whether to turn the highlight on or off. + * @param {boolean} fromPrefObserver Whether the callee is the pref * observer, which means we should not set * the same pref again. */ @@ -568,7 +568,7 @@ /** * Updates the case-sensitivity mode of the findbar and its UI. * - * @param {String} [str] The string for which case sensitivity might be + * @param {string} [str] The string for which case sensitivity might be * turned on. This only used when case-sensitivity is * in auto mode, see `_shouldBeCaseSensitive`. The * default value for this parameter is the find-field @@ -602,7 +602,7 @@ /** * Sets the findbar case-sensitivity mode. * - * @param {Number} caseSensitivity 0 - case insensitive, + * @param {number} caseSensitivity 0 - case insensitive, * 1 - case sensitive, * 2 - auto = case sensitive if the matching * string contains upper case letters. @@ -621,7 +621,7 @@ /** * Updates the diacritic-matching mode of the findbar and its UI. * - * @param {String} [str] The string for which diacritic matching might be + * @param {string} [str] The string for which diacritic matching might be * turned on. This is only used when diacritic * matching is in auto mode, see * `_shouldMatchDiacritics`. The default value for @@ -655,7 +655,7 @@ /** * Sets the findbar diacritic-matching mode * - * @param {Number} diacriticMatching 0 - ignore diacritics, + * @param {number} diacriticMatching 0 - ignore diacritics, * 1 - match diacritics, * 2 - auto = match diacritics if the * matching string contains @@ -698,7 +698,7 @@ /** * Sets the findbar entire-word mode. * - * @param {Boolean} entireWord Whether or not entire-word mode should be + * @param {boolean} entireWord Whether or not entire-word mode should be * turned on. */ toggleEntireWord(entireWord, fromPrefObserver) { @@ -717,11 +717,11 @@ /** * Opens and displays the find bar. * - * @param {Number} mode The find mode to be used, which is either + * @param {number} mode The find mode to be used, which is either * FIND_NORMAL, FIND_TYPEAHEAD or FIND_LINKS. If not * passed, we revert to the last find mode if any or * FIND_NORMAL. - * @return {Boolean} `true` if the find bar wasn't previously open, `false` + * @return {boolean} `true` if the find bar wasn't previously open, `false` * otherwise. */ open(mode) { @@ -753,7 +753,7 @@ /** * Closes the findbar. * - * @param {Boolean} [noAnim] Whether to disable to closing animation. Used + * @param {boolean} [noAnim] Whether to disable to closing animation. Used * to close instantly and synchronously, when * other operations depend on this state. */ @@ -868,7 +868,7 @@ * We get a fake event object through an IPC message when FAYT is being used * from within the browser. We then stuff that input in the find bar here. * - * @param {Object} fakeEvent Event object that looks and quacks like a + * @param {object} fakeEvent Event object that looks and quacks like a * native DOM KeyPress event. */ _onBrowserKeypress(fakeEvent) { @@ -1129,7 +1129,7 @@ * Opens the findbar, focuses the findfield and selects its contents. * Also flashes the findbar the first time it's used. * - * @param {Number} mode The find mode to be used, which is either + * @param {number} mode The find mode to be used, which is either * FIND_NORMAL, FIND_TYPEAHEAD or FIND_LINKS. If not * passed, we revert to the last find mode if any or * FIND_NORMAL. @@ -1195,7 +1195,7 @@ /** * Stub for find-next and find-previous commands. * - * @param {Boolean} findPrevious `true` for find-previous, `false` + * @param {boolean} findPrevious `true` for find-previous, `false` * otherwise. */ onFindAgainCommand(findPrevious) { @@ -1272,7 +1272,7 @@ * This handles all the result changes for both type-ahead-find and * highlighting. * - * @param {Object} data A dictionary that holds the following properties: + * @param {object} data A dictionary that holds the following properties: * - {Number} result One of the FIND_* constants * indicating the result of a search * operation. @@ -1309,7 +1309,7 @@ /** * This handles all the result changes for matches counts. * - * @param {Object} result Result Object, containing the total amount of + * @param {object} result Result Object, containing the total amount of * matches and a vector of the current result. * - {Number} total Total count number of matches found. * - {Number} limit Current setting of the number of matches diff --git a/toolkit/content/widgets/moz-reorderable-list/moz-reorderable-list.mjs b/toolkit/content/widgets/moz-reorderable-list/moz-reorderable-list.mjs @@ -327,7 +327,7 @@ export default class MozReorderableList extends MozLitElement { * Creates a CustomEvent and dispatches it on the element. * * @param {string} eventName The name of the event - * @param {Object} [detail] The detail object to pass to the event + * @param {object} [detail] The detail object to pass to the event */ emitEvent(eventName, detail) { const customEvent = new CustomEvent(eventName, { diff --git a/toolkit/content/widgets/moz-select/moz-select.mjs b/toolkit/content/widgets/moz-select/moz-select.mjs @@ -24,7 +24,7 @@ import { MozBaseInputElement, MozLitElement } from "../lit-utils.mjs"; * @property {string} supportPage - Name of the SUMO support page to link to. * @property {string} ariaLabel - The aria-label text when there is no visible label. * @property {string} ariaDescription - The aria-description text when there is no visible description. - * @property {array} options - The array of options, populated by <moz-option> children in the + * @property {Array} options - The array of options, populated by <moz-option> children in the * default slot. Do not set directly, these will be overridden by <moz-option> children. */ export default class MozSelect extends MozBaseInputElement { diff --git a/toolkit/content/widgets/notificationbox.js b/toolkit/content/widgets/notificationbox.js @@ -14,7 +14,7 @@ * * @param insertElementFn Called with the "notification-stack" element as an * argument when the first notification has to be displayed. - * @param {Number} securityDelayMS - Delay in milliseconds until buttons are enabled to + * @param {number} securityDelayMS - Delay in milliseconds until buttons are enabled to * protect against click- and tapjacking. */ constructor(insertElementFn, securityDelayMS = 0) { @@ -140,7 +140,7 @@ * Optional boolean arg to disable clickjacking protections. By * default the security delay is enabled. * - * @returns {Promise<Object>} The <notification-message> element that is shown. + * @returns {Promise<object>} The <notification-message> element that is shown. */ async appendNotification( aType, @@ -632,7 +632,7 @@ * restarts on window focus or if the user attempts to click during the * disabled period. * - * @param {Number} securityDelayMS - ClickJacking delay to apply + * @param {number} securityDelayMS - ClickJacking delay to apply * (milliseconds). */ _initClickJackingProtection(securityDelayMS) { diff --git a/toolkit/content/widgets/spinner.js b/toolkit/content/widgets/spinner.js @@ -27,7 +27,7 @@ function Spinner(props, context) { * Initializes a spinner. Set the default states and properties, cache * element references, create the HTML markup, and add event listeners. * - * @param {Object} props [Properties passed in from parent] + * @param {object} props [Properties passed in from parent] * { * {Function} setValue: Takes a value and set the state to * the parent component. @@ -106,7 +106,7 @@ function Spinner(props, context) { * It checks if the items have changed and updates the spinner. * If only the value has changed, smooth scrolls to the new value. * - * @param {Object} newState [The new spinner state] + * @param {object} newState [The new spinner state] * { * {Number/String} value: The centered value * {Array} items: The list of items for display @@ -246,7 +246,7 @@ function Spinner(props, context) { * Make sure the number or child elements is the same as length * and keep the elements' references for updating textContent * - * @param {Number} length [The number of child elements] + * @param {number} length [The number of child elements] * @param {DOMElement} parent [The parent element reference] */ _prepareNodes(length, parent) { @@ -288,7 +288,7 @@ function Spinner(props, context) { /** * Set the display string and class name to the elements. * - * @param {Array<Object>} items + * @param {Array<object>} items * [{ * {Number/String} value: The value in its original form * {Boolean} enabled: Whether or not the item is enabled @@ -473,8 +473,8 @@ function Spinner(props, context) { /** * Find the index by offset * - * @param {Number} offset: Offset value in pixel. - * @return {Number} Index number + * @param {number} offset: Offset value in pixel. + * @return {number} Index number */ _getIndexByOffset(offset) { return Math.round(offset / (ITEM_HEIGHT * this.props.rootFontSize)); @@ -485,8 +485,8 @@ function Spinner(props, context) { * If centering is true, find the index closest to the center. * * @param {Number/String} value: The value to find - * @param {Boolean} centering: Whether or not to find the value closest to center - * @return {Number} index of the value, returns -1 if value is not found + * @param {boolean} centering: Whether or not to find the value closest to center + * @return {number} index of the value, returns -1 if value is not found */ _getScrollIndex(value, centering) { const { itemsView } = this.state; @@ -525,8 +525,8 @@ function Spinner(props, context) { /** * Scroll to a value based on the index * - * @param {Number} index: Index number - * @param {Boolean} smooth: Whether or not scroll should be smooth by default + * @param {number} index: Index number + * @param {boolean} smooth: Whether or not scroll should be smooth by default */ _scrollToIndex(index, smooth) { // Do nothing if the value is not found @@ -548,8 +548,8 @@ function Spinner(props, context) { * Scroll to a value. * * @param {Number/String} value: Value to scroll to - * @param {Boolean} centering: Whether or not to scroll to center location - * @param {Boolean} smooth: Whether or not scroll should be smooth by default + * @param {boolean} centering: Whether or not to scroll to center location + * @param {boolean} smooth: Whether or not scroll should be smooth by default */ _scrollTo(value, centering, smooth) { const index = this._getScrollIndex(value, centering); @@ -598,9 +598,9 @@ function Spinner(props, context) { * Compares arrays of objects. It assumes the structure is an array of * objects, and objects in a and b have the same number of properties. * - * @param {Array<Object>} a - * @param {Array<Object>} b - * @return {Boolean} Returns true if a and b are different + * @param {Array<object>} a + * @param {Array<object>} b + * @return {boolean} Returns true if a and b are different */ _isArrayDiff(a, b) { // Check reference first, exit early if reference is the same. @@ -627,8 +627,8 @@ function Spinner(props, context) { * appropriate index and centers it, while preventing default behavior and * stopping event propagation. * - * @param {Object} event: Keyboard event - * @param {Number} index: The index of the expected next item + * @param {object} event: Keyboard event + * @param {number} index: The index of the expected next item */ _setValueForSpinner(event, index) { this._smoothScrollToIndex(index); diff --git a/toolkit/content/widgets/tabbox.js b/toolkit/content/widgets/tabbox.js @@ -882,12 +882,12 @@ * @param {MozTab} startTab * A `<tab>` element to start searching from. * @param {object} opts - * @param {Number} [opts.direction=1] + * @param {number} [opts.direction=1] * 1 to search forward, -1 to search backward. - * @param {Boolean} [opts.wrap=false] + * @param {boolean} [opts.wrap=false] * If true, wrap around if the search reaches the end (or beginning) * of the tab strip. - * @param {Boolean} [opts.startWithAdjacent=true] + * @param {boolean} [opts.startWithAdjacent=true] * If true (which is the default), start searching from the next tab * after (or before) `startTab`. If false, `startTab` may be returned * if it passes the filter. diff --git a/toolkit/content/widgets/timekeeper.js b/toolkit/content/widgets/timekeeper.js @@ -10,7 +10,7 @@ * selections, and whether or not the current time state is out of range * or off step. * - * @param {Object} props + * @param {object} props * { * {Date} min * {Date} max @@ -36,7 +36,7 @@ function TimeKeeper(props) { /** * Getters for different time units. * - * @return {Number} + * @return {number} */ get hour() { return this.state.time.getUTCHours(); @@ -60,7 +60,7 @@ function TimeKeeper(props) { /** * Get the ranges of different time units. * - * @return {Object} + * @return {object} * { * {Array<Number>} dayPeriod * {Array<Number>} hours @@ -76,7 +76,7 @@ function TimeKeeper(props) { /** * Set new time, check if the current state is valid, and set ranges. * - * @param {Object} timeState: The new time + * @param {object} timeState: The new time * { * {Number} hour [optional] * {Number} minute [optional] @@ -111,7 +111,7 @@ function TimeKeeper(props) { /** * Set day-period (AM/PM) * - * @param {Number} dayPeriod: 0 as AM, 12 as PM + * @param {number} dayPeriod: 0 as AM, 12 as PM */ setDayPeriod(dayPeriod) { if (dayPeriod == this.dayPeriod) { @@ -128,7 +128,7 @@ function TimeKeeper(props) { /** * Set hour in 24hr format (0 ~ 23) * - * @param {Number} hour + * @param {number} hour */ setHour(hour) { this.setState({ hour }); @@ -137,7 +137,7 @@ function TimeKeeper(props) { /** * Set minute (0 ~ 59) * - * @param {Number} minute + * @param {number} minute */ setMinute(minute) { this.setState({ minute }); @@ -146,7 +146,7 @@ function TimeKeeper(props) { /** * Set second (0 ~ 59) * - * @param {Number} second + * @param {number} second */ setSecond(second) { this.setState({ second }); @@ -155,7 +155,7 @@ function TimeKeeper(props) { /** * Set millisecond (0 ~ 999) * - * @param {Number} millisecond + * @param {number} millisecond */ setMillisecond(millisecond) { this.setState({ millisecond }); @@ -165,10 +165,10 @@ function TimeKeeper(props) { * Calculate the range of possible choices for each time unit. * Reuse the old result if the input has not changed. * - * @param {Number} dayPeriod - * @param {Number} hour - * @param {Number} minute - * @param {Number} second + * @param {number} dayPeriod + * @param {number} hour + * @param {number} minute + * @param {number} second */ _setRanges(dayPeriod, hour, minute, second) { this.state.ranges.dayPeriod = @@ -208,7 +208,7 @@ function TimeKeeper(props) { /** * Get the AM/PM range. Return an empty array if in 24hr mode. * - * @return {Array<Number>} + * @return {Array<number>} */ _getDayPeriodRange() { if (this.props.format == TIME_FORMAT_24) { @@ -229,8 +229,8 @@ function TimeKeeper(props) { /** * Get the hours range. * - * @param {Number} dayPeriod - * @return {Array<Number>} + * @param {number} dayPeriod + * @return {Array<number>} */ _getHoursRange(dayPeriod) { const { format } = this.props; @@ -245,8 +245,8 @@ function TimeKeeper(props) { /** * Get the minutes range * - * @param {Number} hour - * @return {Array<Number>} + * @param {number} hour + * @return {Array<number>} */ _getMinutesRange(hour) { const start = hour * HOUR_IN_MS; @@ -260,9 +260,9 @@ function TimeKeeper(props) { /** * Get the seconds range * - * @param {Number} hour - * @param {Number} minute - * @return {Array<Number>} + * @param {number} hour + * @param {number} minute + * @return {Array<number>} */ _getSecondsRange(hour, minute) { const start = hour * HOUR_IN_MS + minute * MINUTE_IN_MS; @@ -276,10 +276,10 @@ function TimeKeeper(props) { /** * Get the milliseconds range * - * @param {Number} hour - * @param {Number} minute - * @param {Number} second - * @return {Array<Number>} + * @param {number} hour + * @param {number} minute + * @param {number} second + * @return {Array<number>} */ _getMillisecondsRange(hour, minute, second) { const start = @@ -294,11 +294,11 @@ function TimeKeeper(props) { /** * Calculate the range of possible steps. * - * @param {Number} startValue: Start time in ms - * @param {Number} endValue: End time in ms - * @param {Number} minStep: Smallest step in ms for the time unit + * @param {number} startValue: Start time in ms + * @param {number} endValue: End time in ms + * @param {number} minStep: Smallest step in ms for the time unit * @param {Function} formatter: Outputs time in a particular format - * @return {Array<Object>} + * @return {Array<object>} * { * {Number} value * {Boolean} enabled @@ -344,10 +344,10 @@ function TimeKeeper(props) { * A generic function for stepping up or down from a value of a range. * It stops at the upper and lower limits. * - * @param {Number} current: The current value - * @param {Number} offset: The offset relative to current value - * @param {Array<Object>} range: List of possible steps - * @return {Number} The new value + * @param {number} current: The current value + * @param {number} offset: The offset relative to current value + * @param {Array<object>} range: List of possible steps + * @return {number} The new value */ _step(current, offset, range) { const index = range.findIndex(step => step.value == current); @@ -361,7 +361,7 @@ function TimeKeeper(props) { /** * Step up or down AM/PM * - * @param {Number} offset + * @param {number} offset */ stepDayPeriodBy(offset) { const current = this.dayPeriod; @@ -381,7 +381,7 @@ function TimeKeeper(props) { /** * Step up or down hours * - * @param {Number} offset + * @param {number} offset */ stepHourBy(offset) { const current = this.hour; @@ -395,7 +395,7 @@ function TimeKeeper(props) { /** * Step up or down minutes * - * @param {Number} offset + * @param {number} offset */ stepMinuteBy(offset) { const current = this.minute; @@ -409,7 +409,7 @@ function TimeKeeper(props) { /** * Step up or down seconds * - * @param {Number} offset + * @param {number} offset */ stepSecondBy(offset) { const current = this.second; @@ -423,7 +423,7 @@ function TimeKeeper(props) { /** * Step up or down milliseconds * - * @param {Number} offset + * @param {number} offset */ stepMillisecondBy(offset) { const current = this.milliseconds; @@ -442,7 +442,7 @@ function TimeKeeper(props) { * Checks if the time state is off step. * * @param {Date} time - * @return {Boolean} + * @return {boolean} */ _isOffStep(time) { const { min, step } = this.props; diff --git a/toolkit/content/widgets/timepicker.js b/toolkit/content/widgets/timepicker.js @@ -20,7 +20,7 @@ function TimePicker(context) { /** * Initializes the time picker. Set the default states and properties. * - * @param {Object} props + * @param {object} props * { * {Number} hour [optional]: Hour in 24 hours format (0~23), default is current hour * {Number} minute [optional]: Minute (0~59), default is current minute @@ -171,7 +171,7 @@ function TimePicker(context) { /** * Insert element for layout purposes. * - * @param {Object} + * @param {object} * { * {String} tag: The tag to create * {DOMElement} insertBefore: The DOM node to insert before @@ -275,7 +275,7 @@ function TimePicker(context) { /** * Move the keyboard focus between spinners of the picker. * - * @param {Boolean} isReverse: Does the navigation expected to be following + * @param {boolean} isReverse: Does the navigation expected to be following * the focus order (false) or not (true/isReverse) */ focusNextSpinner(isReverse) { @@ -427,7 +427,7 @@ function TimePicker(context) { /** * Set the time state and update the components with the new state. * - * @param {Object} timeState + * @param {object} timeState * { * {Number} hour [optional] * {Number} minute [optional] diff --git a/toolkit/content/widgets/videocontrols.js b/toolkit/content/widgets/videocontrols.js @@ -126,11 +126,11 @@ this.VideoControlsWidget = class { * media.videocontrols.picture-in-picture.video-toggle.always-show pref, which * is mostly used for testing. * - * @param {Object} prefs + * @param {object} prefs * The preferences set that was passed to the UAWidget. * @param {Element} someVideo * The <video> to test. - * @param {Object} reflowedDimensions + * @param {object} reflowedDimensions * An object representing the reflowed dimensions of the <video>. Properties * are: * @@ -140,7 +140,7 @@ this.VideoControlsWidget = class { * videoHeight (Number): * The height of the video in pixels. * - * @return {Boolean} + * @return {boolean} */ static shouldShowPictureInPictureToggle( prefs, @@ -193,13 +193,13 @@ this.VideoControlsWidget = class { * that they're being used. It also will enable the appropriate stylesheet for * the preferred toggle experiment. * - * @param {Object} prefs + * @param {object} prefs * The preferences set that was passed to the UAWidget. * @param {ShadowRoot} shadowRoot * The shadowRoot of the <video> element where the video controls are. * @param {Element} toggle * The toggle element. - * @param {Object} reflowedDimensions + * @param {object} reflowedDimensions * An object representing the reflowed dimensions of the <video>. Properties * are: * diff --git a/toolkit/crashreporter/content/crashes.js b/toolkit/crashreporter/content/crashes.js @@ -70,10 +70,10 @@ function populateReportLists() { * or viewing link to the unsubmitted or submitted report list * based on isPending. * - * @param {Boolean} isPending whether the crash is up for submission - * @param {String} id the unique id of the crash report + * @param {boolean} isPending whether the crash is up for submission + * @param {string} id the unique id of the crash report * @param {Date} date either the date of crash or date of submission - * @param {Object} dateFormatter formatter for presenting dates to users + * @param {object} dateFormatter formatter for presenting dates to users */ function addReportRow(isPending, id, date, dateFormatter) { const rowTemplate = document.getElementById("crashReportRow"); @@ -137,11 +137,11 @@ function showAppropriateSections() { * of submitted crash reports. On failure, changes the provided button to display * a red error message. * - * @param {String} reportId the unique id of the crash report + * @param {string} reportId the unique id of the crash report * @param {HTMLTableRowElement} row the table row of the crash report * @param {HTMLButtonElement} button the button pressed to start the submission * @param {HTMLSpanElement} buttonText the text inside the pressed button - * @param {Object} dateFormatter formatter for presenting dates to users + * @param {object} dateFormatter formatter for presenting dates to users */ function submitPendingReport(reportId, row, button, buttonText, dateFormatter) { button.classList.add("submitting"); @@ -255,7 +255,7 @@ async function clearOldReports() { * Deletes files from the user's device at the specified path * that match the provided filter. * - * @param {String} path the directory location to delete form + * @param {string} path the directory location to delete form * @param {Function} filter function taking in a file entry and * returning whether to delete the file */ @@ -285,7 +285,7 @@ async function cleanupFolder(path, filter) { /** * Dispatches an event with the specified name. * - * @param {String} name the name of the event + * @param {string} name the name of the event */ function dispatchCustomEvent(name) { document.dispatchEvent( diff --git a/toolkit/modules/Color.sys.mjs b/toolkit/modules/Color.sys.mjs @@ -10,7 +10,7 @@ * AA = Regular sized text or large text in enhanced contrast mode. * AAA = Regular sized text in enhanced contrast mode. * - * @type {Object} + * @type {object} */ const CONTRAST_RATIO_LEVELS = { A: 3, @@ -25,7 +25,7 @@ const CONTRAST_RATIO_LEVELS = { * contrastRatio(bgcolor, white) ? <use black> : <use white>`, we can greatly * simplify the calculation to the following constant. * - * @type {Number} + * @type {number} */ const CONTRAST_BRIGHTTEXT_THRESHOLD = Math.sqrt(1.05 * 0.05) - 0.05; @@ -34,9 +34,9 @@ const CONTRAST_BRIGHTTEXT_THRESHOLD = Math.sqrt(1.05 * 0.05) - 0.05; * In the future, this object may be extended to allow for conversions between * different color formats and notations, support transparency. * - * @param {Number} r Red color component - * @param {Number} g Green color component - * @param {Number} b Blue color component + * @param {number} r Red color component + * @param {number} g Green color component + * @param {number} b Blue color component */ export class Color { constructor(r, g, b) { @@ -49,7 +49,7 @@ export class Color { * Formula from W3C's WCAG 2.0 spec's relative luminance, section 1.4.1, * http://www.w3.org/TR/WCAG20/. * - * @return {Number} Relative luminance, represented as number between 0 and 1. + * @return {number} Relative luminance, represented as number between 0 and 1. */ get relativeLuminance() { let colorArr = [this.r, this.g, this.b].map(color => { @@ -63,7 +63,7 @@ export class Color { } /** - * @return {Boolean} TRUE if you need to use a bright color (e.g. 'white'), when + * @return {boolean} TRUE if you need to use a bright color (e.g. 'white'), when * this color is set as the background. */ get useBrightText() { @@ -78,7 +78,7 @@ export class Color { * http://www.w3.org/TR/WCAG20/. * * @param {Color} otherColor Color instance to calculate the contrast with - * @return {Number} Contrast ratios can range from 1 to 21, commonly written + * @return {number} Contrast ratios can range from 1 to 21, commonly written * as 1:1 to 21:1. */ contrastRatio(otherColor) { @@ -99,9 +99,9 @@ export class Color { * be discernable. * * @param {Color} otherColor Color instance to calculate the contrast with - * @param {String} [level] WCAG conformance level that maps to the minimum + * @param {string} [level] WCAG conformance level that maps to the minimum * required contrast ratio. Defaults to 'AA' - * @return {Boolean} + * @return {boolean} */ isContrastRatioAcceptable(otherColor, level = "AA") { return this.contrastRatio(otherColor) > CONTRAST_RATIO_LEVELS[level]; diff --git a/toolkit/modules/Console.sys.mjs b/toolkit/modules/Console.sys.mjs @@ -523,7 +523,7 @@ function createMultiLineDumper(aLevel) { * @param {object} aFrame * The youngest stack frame coming from Components.stack, as formatted by * getStack(). - * @param {array} aArgs + * @param {Array} aArgs * The arguments given to the console method. * @param {object} aOptions * Object properties depend on the console method that was invoked: diff --git a/toolkit/modules/ContentDOMReference.sys.mjs b/toolkit/modules/ContentDOMReference.sys.mjs @@ -27,7 +27,7 @@ XPCOMUtils.defineLazyServiceGetter( /** * @typedef {number} ElementID - * @typedef {Object} ElementIdentifier + * @typedef {object} ElementIdentifier */ const FINALIZATION_TOPIC = "content-dom-reference-finalized"; diff --git a/toolkit/modules/DateTimePickerPanel.sys.mjs b/toolkit/modules/DateTimePickerPanel.sys.mjs @@ -160,7 +160,7 @@ export var DateTimePickerPanel = class { } /** - * @param {Boolean} passAllValues: Pass spinner values regardless if they've been set/changed or not + * @param {boolean} passAllValues: Pass spinner values regardless if they've been set/changed or not */ setInputBoxValue(passAllValues) { const value = { diff --git a/toolkit/modules/E10SUtils.sys.mjs b/toolkit/modules/E10SUtils.sys.mjs @@ -294,7 +294,7 @@ export var E10SUtils = { * Serialize csp data. * * @param {nsIContentSecurity} csp. The csp to serialize. - * @return {String} The base64 encoded csp data. + * @return {string} The base64 encoded csp data. */ serializeCSP(csp) { let serializedCSP = null; @@ -313,7 +313,7 @@ export var E10SUtils = { * Deserialize a base64 encoded csp (serialized with * Utils::serializeCSP). * - * @param {String} csp_b64 A base64 encoded serialized csp. + * @param {string} csp_b64 A base64 encoded serialized csp. * @return {nsIContentSecurityPolicy} A deserialized csp. */ deserializeCSP(csp_b64) { @@ -335,7 +335,7 @@ export var E10SUtils = { * Serialize policyContainer data. * * @param {nsIPolicyContainer} policyContainer. The policyContainer to serialize. - * @return {String} The base64 encoded policyContainer data. + * @return {string} The base64 encoded policyContainer data. */ serializePolicyContainer(policyContainer) { let serializedPolicyContainer = null; @@ -357,7 +357,7 @@ export var E10SUtils = { * Deserialize a base64 encoded policyContainer (serialized with * Utils::serializePolicyContainer). * - * @param {String} policyContainerB64 A base64 encoded serialized policyContainer. + * @param {string} policyContainerB64 A base64 encoded serialized policyContainer. * @return {nsIPolicyContainer} A deserialized policyContainer. */ deserializePolicyContainer(policyContainerB64) { @@ -644,7 +644,7 @@ export var E10SUtils = { * Serialize principal data. * * @param {nsIPrincipal} principal The principal to serialize. - * @return {String} The serialized principal data. + * @return {string} The serialized principal data. */ serializePrincipal(principal) { let serializedPrincipal = null; @@ -664,7 +664,7 @@ export var E10SUtils = { /** * Deserialize a principal (serialized with serializePrincipal). * - * @param {String} serializedPincipal A serialized principal. + * @param {string} serializedPincipal A serialized principal. * @return {nsIPrincipal} A deserialized principal. */ deserializePrincipal(serializedPincipal, fallbackPrincipalCallback = null) { @@ -721,7 +721,7 @@ export var E10SUtils = { * * @param {nsICookieJarSettings} cookieJarSettings The cookieJarSettings to * serialize. - * @return {String} The base64 encoded cookieJarSettings data. + * @return {string} The base64 encoded cookieJarSettings data. */ serializeCookieJarSettings(cookieJarSettings) { let serialized = null; @@ -741,7 +741,7 @@ export var E10SUtils = { /** * Deserialize a base64 encoded cookieJarSettings * - * @param {String} cookieJarSettings_b64 A base64 encoded serialized cookieJarSettings. + * @param {string} cookieJarSettings_b64 A base64 encoded serialized cookieJarSettings. * @return {nsICookieJarSettings} A deserialized cookieJarSettings. */ deserializeCookieJarSettings(cookieJarSettings_b64) { @@ -775,7 +775,7 @@ export var E10SUtils = { * Serialize referrerInfo. * * @param {nsIReferrerInfo} The referrerInfo to serialize. - * @return {String} The base64 encoded referrerInfo. + * @return {string} The base64 encoded referrerInfo. */ serializeReferrerInfo(referrerInfo) { let serialized = null; @@ -793,7 +793,7 @@ export var E10SUtils = { /** * Deserialize a base64 encoded referrerInfo * - * @param {String} referrerInfo_b64 A base64 encoded serialized referrerInfo. + * @param {string} referrerInfo_b64 A base64 encoded serialized referrerInfo. * @return {nsIReferrerInfo} A deserialized referrerInfo. */ deserializeReferrerInfo(referrerInfo_b64) { diff --git a/toolkit/modules/FinderHighlighter.sys.mjs b/toolkit/modules/FinderHighlighter.sys.mjs @@ -215,7 +215,7 @@ FinderHighlighter.prototype = { * Rects and texts * * @param {nsIDOMWindow} window - * @return {Object} + * @return {object} */ getForWindow(window) { if (!gWindows.has(window)) { @@ -235,7 +235,7 @@ FinderHighlighter.prototype = { /** * Notify all registered listeners that the 'Highlight All' operation finished. * - * @param {Boolean} highlight Whether highlighting was turned on + * @param {boolean} highlight Whether highlighting was turned on */ notifyFinished(highlight) { for (let l of this.finder._listeners) { @@ -250,10 +250,10 @@ FinderHighlighter.prototype = { * be called recursively for each (i)frame inside a page. * * @param {Booolean} highlight Whether highlighting should be turned on - * @param {String} [word] Needle to search for and highlight when found - * @param {Boolean} [linksOnly] Only consider nodes that are links for the search - * @param {Boolean} [drawOutline] Whether found links should be outlined. - * @param {Boolean} [useSubFrames] Whether to iterate over subframes. + * @param {string} [word] Needle to search for and highlight when found + * @param {boolean} [linksOnly] Only consider nodes that are links for the search + * @param {boolean} [drawOutline] Whether found links should be outlined. + * @param {boolean} [useSubFrames] Whether to iterate over subframes. * @yield {Promise} that resolves once the operation has finished */ async highlight(highlight, word, linksOnly, drawOutline, useSubFrames) { @@ -477,7 +477,7 @@ FinderHighlighter.prototype = { * To make sure that the outline covers the found range completely, all the * CSS styles that influence the text are copied and applied to the outline. * - * @param {Object} data Dictionary coming from Finder that contains the + * @param {object} data Dictionary coming from Finder that contains the * following properties: * {Number} result One of the nsITypeAheadFind.FIND_* constants * indicating the result of a search operation. @@ -747,7 +747,7 @@ FinderHighlighter.prototype = { * invoked. When modal highlighting is turned off, we hide the CanvasFrame * contents. * - * @param {Boolean} useModalHighlight + * @param {boolean} useModalHighlight */ onModalHighlightChange(useModalHighlight) { let window = this.finder._getWindow(); @@ -763,7 +763,7 @@ FinderHighlighter.prototype = { * When 'Highlight All' is toggled during a session, this callback is invoked * and when it's turned off, the found occurrences will be removed from the mask. * - * @param {Boolean} highlightAll + * @param {boolean} highlightAll */ onHighlightAllChange(highlightAll) { this._highlightAll = highlightAll; @@ -819,7 +819,7 @@ FinderHighlighter.prototype = { * Geometry.sys.mjs takes care of the DOMRect calculations. * * @param {nsIDOMWindow} window Window to read the boundary rect from - * @param {Boolean} [includeScroll] Whether to ignore the scroll offset, + * @param {boolean} [includeScroll] Whether to ignore the scroll offset, * which is useful for comparing DOMRects. * Optional, defaults to `true` * @return {Rect} @@ -878,7 +878,7 @@ FinderHighlighter.prototype = { * This method fetches this offset of the frame element to the respective window. * * @param {nsIDOMWindow} window Window to read the boundary rect from - * @return {Object} Simple object that contains the following two properties: + * @return {object} Simple object that contains the following two properties: * - {Number} x Offset along the horizontal axis. * - {Number} y Offset along the vertical axis. */ @@ -921,7 +921,7 @@ FinderHighlighter.prototype = { * scrollbars. * * @param {nsiDOMWindow} window The current finder window. - * @return {Object} The current full page dimensions with `width` and `height` + * @return {object} The current full page dimensions with `width` and `height` * properties */ _getWindowDimensions(window) { @@ -949,7 +949,7 @@ FinderHighlighter.prototype = { * range. The CSS properties we look for can be found in `kFontPropsCSS`. * * @param {Range} range Range to fetch style info from. - * @return {Object} Dictionary consisting of the styles that were found. + * @return {object} Dictionary consisting of the styles that were found. */ _getRangeFontStyle(range) { let node = range.startContainer; @@ -970,8 +970,8 @@ FinderHighlighter.prototype = { * Utility; transform a dictionary object as returned by `_getRangeFontStyle` * above into a HTML style attribute value. * - * @param {Object} fontStyle - * @return {String} + * @param {object} fontStyle + * @return {string} */ _getHTMLFontStyle(fontStyle) { let style = []; @@ -993,7 +993,7 @@ FinderHighlighter.prototype = { * @param {...Array} [additionalStyles] Optional set of style pairs that will * augment or override the styles defined * by `stylePairs` - * @return {String} + * @return {string} */ _getStyleString(stylePairs, ...additionalStyles) { let baseStyle = new Map(stylePairs); @@ -1010,8 +1010,8 @@ FinderHighlighter.prototype = { /** * Checks whether a CSS RGB color value can be classified as being 'bright'. * - * @param {String} cssColor RGB color value in the default format rgb[a](r,g,b) - * @return {Boolean} + * @param {string} cssColor RGB color value in the default format rgb[a](r,g,b) + * @return {boolean} */ _isColorBright(cssColor) { cssColor = cssColor.match(kRGBRE); @@ -1034,7 +1034,7 @@ FinderHighlighter.prototype = { * 5. When the majority of ranges are counted as contain bright colored text, * the page is considered to contain bright text overall. * - * @param {Object} dict Dictionary of properties belonging to the + * @param {object} dict Dictionary of properties belonging to the * currently active window. The page text color property * will be recorded in `dict.brightText` as `true` or `false`. */ @@ -1076,7 +1076,7 @@ FinderHighlighter.prototype = { * 'scroll'. * * @param {Range} range Range that be enclosed in a dynamic container - * @return {Boolean} + * @return {boolean} */ _isInDynamicContainer(range) { const kFixed = new Set(["fixed", "sticky", "scroll", "auto"]); @@ -1117,7 +1117,7 @@ FinderHighlighter.prototype = { * for use by the drawing function of the highlighter. * * @param {Range} range Range to fetch the rectangles from - * @param {Object} [dict] Dictionary of properties belonging to + * @param {object} [dict] Dictionary of properties belonging to * the currently active window * @return {Set} Set of rects that were found for the range */ @@ -1159,11 +1159,11 @@ FinderHighlighter.prototype = { * cache. * * @param {Range} range Range to fetch the rectangles from - * @param {Boolean} [checkIfDynamic] Whether we should check if the range + * @param {boolean} [checkIfDynamic] Whether we should check if the range * is dynamic as per the rules in * `_isInDynamicContainer()`. Optional, * defaults to `true` - * @param {Object} [dict] Dictionary of properties belonging to + * @param {object} [dict] Dictionary of properties belonging to * the currently active window * @return {Set} Set of rects that were found for the range */ @@ -1194,7 +1194,7 @@ FinderHighlighter.prototype = { * Re-read the rectangles of the ranges that we keep track of separately, * because they're enclosed by a position: fixed container DOM node or (i)frame. * - * @param {Object} dict Dictionary of properties belonging to the currently + * @param {object} dict Dictionary of properties belonging to the currently * active window */ _updateDynamicRangesRects(dict) { @@ -1213,7 +1213,7 @@ FinderHighlighter.prototype = { * Rebuild it, if necessary, This will deactivate the animation between * occurrences. * - * @param {Object} dict Dictionary of properties belonging to the currently + * @param {object} dict Dictionary of properties belonging to the currently * active window */ _updateRangeOutline(dict) { @@ -1390,7 +1390,7 @@ FinderHighlighter.prototype = { /** * Finish any currently playing animations on the found range outline node. * - * @param {Object} dict Dictionary of properties belonging to the currently + * @param {object} dict Dictionary of properties belonging to the currently * active window */ _finishOutlineAnimations(dict) { @@ -1481,7 +1481,7 @@ FinderHighlighter.prototype = { * the ranges that were found. * * @param {nsIDOMWindow} window Window to draw in. - * @param {Boolean} [paintContent] + * @param {boolean} [paintContent] */ _repaintHighlightAllMask(window, paintContent = true) { window = this.getTopWindow(window); @@ -1592,9 +1592,9 @@ FinderHighlighter.prototype = { * for certain operations. This allows us to degrade gracefully when we expect * the performance to be negatively impacted due to drawing-intensive operations. * - * @param {Object} dict Dictionary of properties belonging to the currently + * @param {object} dict Dictionary of properties belonging to the currently * active window - * @return {Boolean} + * @return {boolean} */ _isPageTooBig(dict) { let { height, width } = dict.lastWindowDimensions; @@ -1609,7 +1609,7 @@ FinderHighlighter.prototype = { * will be upscaled to `kModalHighlightRepaintHiFreqMs`. * * @param {nsIDOMWindow} window - * @param {Object} options Dictionary of painter hints that contains the + * @param {object} options Dictionary of painter hints that contains the * following properties: * {Boolean} contentChanged Whether the documents' content changed in the * meantime. This happens when the DOM is updated diff --git a/toolkit/modules/FinderIterator.sys.mjs b/toolkit/modules/FinderIterator.sys.mjs @@ -63,35 +63,35 @@ export class FinderIterator { * the ranges have been found or 3) when `stop()` is called whilst iterating. * * @param {object} options - * @param {Number} [options.allowDistance] Allowed edit distance between the + * @param {number} [options.allowDistance] Allowed edit distance between the * current word and `options.word` * when the iterator is already running - * @param {Boolean} options.caseSensitive Whether to search in case sensitive + * @param {boolean} options.caseSensitive Whether to search in case sensitive * mode - * @param {Boolean} options.entireWord Whether to search in entire-word mode + * @param {boolean} options.entireWord Whether to search in entire-word mode * @param {Finder} options.finder Currently active Finder instance - * @param {Number} [options.limit] Limit the amount of results to be + * @param {number} [options.limit] Limit the amount of results to be * passed back. Optional, defaults to no * limit. - * @param {Boolean} [options.linksOnly] Only yield ranges that are inside a + * @param {boolean} [options.linksOnly] Only yield ranges that are inside a * hyperlink (used by QuickFind). * Optional, defaults to `false`. - * @param {Object} options.listener Listener object that implements the + * @param {object} options.listener Listener object that implements the * following callback functions: * - onIteratorRangeFound({Range} range, {Object} extra); * extra.context contains text snippet around the match * - onIteratorReset(); * - onIteratorRestart({Object} iterParams); * - onIteratorStart({Object} iterParams); - * @param {Boolean} options.matchDiacritics Whether to search in + * @param {boolean} options.matchDiacritics Whether to search in * diacritic-matching mode - * @param {Boolean} [options.useCache] Whether to allow results already + * @param {boolean} [options.useCache] Whether to allow results already * present in the cache or demand fresh. * Optional, defaults to `false`. - * @param {Boolean} [options.useSubFrames] Whether to iterate over subframes. + * @param {boolean} [options.useSubFrames] Whether to iterate over subframes. * Optional, defaults to `false`. - * @param {String} options.word Word to search for - * @param {Number} contextRange - Number of characters to extract before and after target string + * @param {string} options.word Word to search for + * @param {number} contextRange - Number of characters to extract before and after target string * @return {Promise} */ start({ @@ -211,7 +211,7 @@ export class FinderIterator { * Stop the currently running iterator as soon as possible and optionally cache * the result for later. * - * @param {Boolean} [cachePrevious] Whether to save the result for later. + * @param {boolean} [cachePrevious] Whether to save the result for later. * Optional. */ stop(cachePrevious = false) { @@ -302,16 +302,16 @@ export class FinderIterator { * passed through the arguments. When `true`, we can keep it running as-is and * the consumer should stop the iterator when `false`. * - * @param {Boolean} options.caseSensitive Whether to search in case sensitive + * @param {boolean} options.caseSensitive Whether to search in case sensitive * mode - * @param {Boolean} options.entireWord Whether to search in entire-word mode - * @param {Boolean} options.linksOnly Whether to search for the word to be + * @param {boolean} options.entireWord Whether to search in entire-word mode + * @param {boolean} options.linksOnly Whether to search for the word to be * present in links only - * @param {Boolean} options.matchDiacritics Whether to search in + * @param {boolean} options.matchDiacritics Whether to search in * diacritic-matching mode - * @param {String} options.word The word being searched for + * @param {string} options.word The word being searched for * @param (Boolean) options.useSubFrames Whether to search subframes - * @return {Boolean} + * @return {boolean} */ continueRunning({ caseSensitive, @@ -339,9 +339,9 @@ export class FinderIterator { * Consumers may opt-out of this behavior by using this check and not call * start(). * - * @param {Object} paramSet Property bag with the same signature as you would + * @param {object} paramSet Property bag with the same signature as you would * pass into `start()` - * @return {Boolean} + * @return {boolean} */ isAlreadyRunning(paramSet) { return ( @@ -354,7 +354,7 @@ export class FinderIterator { /** * Safely notify all registered listeners that an event has occurred. * - * @param {String} callback Name of the callback to invoke + * @param {string} callback Name of the callback to invoke * @param {mixed} [params] Optional argument that will be passed to the * callback * @param {Iterable} [listeners] Set of listeners to notify. Optional, defaults @@ -377,7 +377,7 @@ export class FinderIterator { * Returns normalized text slices so indices are stable with FindBar behavior. * * @param {Range} range - DOM range for a single match. - * @param {Number} contextRange - Number of characters to extract before and after target string + * @param {number} contextRange - Number of characters to extract before and after target string */ _extractSnippet(range, contextRange) { const blockSelector = @@ -454,17 +454,17 @@ export class FinderIterator { * Internal; check if an iteration request is available in the previous result * that we cached. * - * @param {Boolean} options.caseSensitive Whether to search in case sensitive + * @param {boolean} options.caseSensitive Whether to search in case sensitive * mode - * @param {Boolean} options.entireWord Whether to search in entire-word mode - * @param {Boolean} options.linksOnly Whether to search for the word to be + * @param {boolean} options.entireWord Whether to search in entire-word mode + * @param {boolean} options.linksOnly Whether to search for the word to be * present in links only - * @param {Boolean} options.matchDiacritics Whether to search in + * @param {boolean} options.matchDiacritics Whether to search in * diacritic-matching mode - * @param {Boolean} options.useCache Whether the consumer wants to use the + * @param {boolean} options.useCache Whether the consumer wants to use the * cached previous result at all - * @param {String} options.word The word being searched for - * @return {Boolean} + * @param {string} options.word The word being searched for + * @return {boolean} */ _previousResultAvailable({ caseSensitive, @@ -490,12 +490,12 @@ export class FinderIterator { /** * Internal; compare if two sets of iterator parameters are equivalent. * - * @param {Object} paramSet1 First set of params (left hand side) - * @param {Object} paramSet2 Second set of params (right hand side) - * @param {Number} [allowDistance] Allowed edit distance between the two words. + * @param {object} paramSet1 First set of params (left hand side) + * @param {object} paramSet2 Second set of params (right hand side) + * @param {number} [allowDistance] Allowed edit distance between the two words. * Optional, defaults to '0', which means 'no * distance'. - * @return {Boolean} + * @return {boolean} */ _areParamsEqual(paramSet1, paramSet2, allowDistance = 0) { return ( @@ -518,11 +518,11 @@ export class FinderIterator { * make sure we don't block the host process too long. In the case of a break * like this, we yield `undefined`, instead of a range. * - * @param {Object} listener Listener object + * @param {object} listener Listener object * @param {Array} rangeSource Set of ranges to iterate over * @param {nsIDOMWindow} window The window object is only really used * for access to `setTimeout` - * @param {Boolean} [withPause] Whether to pause after each `kIterationSizeMax` + * @param {boolean} [withPause] Whether to pause after each `kIterationSizeMax` * number of ranges yielded. Optional, defaults * to `true`. * @yield {Range} @@ -575,7 +575,7 @@ export class FinderIterator { * mark the listener as 'catching up', meaning it will not receive fresh * results from a running iterator. * - * @param {Object} listener Listener object + * @param {object} listener Listener object * @param {nsIDOMWindow} window The window object is only really used * for access to `setTimeout` * @yield {Range} @@ -596,7 +596,7 @@ export class FinderIterator { * mark the listener as 'catching up', meaning it will not receive fresh * results from the running iterator. * - * @param {Object} listener Listener object + * @param {object} listener Listener object * @param {nsIDOMWindow} window The window object is only really used * for access to `setTimeout` * @yield {Range} @@ -612,10 +612,10 @@ export class FinderIterator { * Internal; see the documentation of the start() method above. * * @param {Finder} finder Currently active Finder instance - * @param {Number} spawnId Since `stop()` is synchronous and this method + * @param {number} spawnId Since `stop()` is synchronous and this method * is not, this identifier is used to learn if * it's supposed to still continue after a pause. - * @param {Number} contextRange - Number of characters to extract before and after target string + * @param {number} contextRange - Number of characters to extract before and after target string * @yield {Range} */ async _findAllRanges(finder, spawnId, contextRange = 0) { @@ -717,13 +717,13 @@ export class FinderIterator { * Internal; basic wrapper around nsIFind that provides a generator yielding * a range each time an occurence of `word` string is found. * - * @param {Boolean} options.caseSensitive Whether to search in case + * @param {boolean} options.caseSensitive Whether to search in case * sensitive mode - * @param {Boolean} options.entireWord Whether to search in entire-word + * @param {boolean} options.entireWord Whether to search in entire-word * mode - * @param {Boolean} options.matchDiacritics Whether to search in + * @param {boolean} options.matchDiacritics Whether to search in * diacritic-matching mode - * @param {String} options.word The word to search for + * @param {string} options.word The word to search for * @param {nsIDOMWindow} window The window to search in * @yield {Range} */ @@ -821,7 +821,7 @@ export class FinderIterator { * Internal; determines whether a range is inside a link. * * @param {Range} range the range to check - * @return {Boolean} True if the range starts in a link + * @return {boolean} True if the range starts in a link */ _rangeStartsInLink(range) { let isInsideLink = false; diff --git a/toolkit/modules/FormLikeFactory.sys.mjs b/toolkit/modules/FormLikeFactory.sys.mjs @@ -80,7 +80,7 @@ export let FormLikeFactory = { * "forms" (e.g. registration and login) on one page with a <form>. * * @param {HTMLElement} aDocumentRoot - * @param {Object} aOptions + * @param {object} aOptions * @param {boolean} [aOptions.ignoreForm = false] * True to always use owner document as the `form` * @return {formLike} @@ -136,7 +136,7 @@ export let FormLikeFactory = { * * @param {HTMLInputElement|HTMLSelectElement} aField * an <input>, <select> or <iframe> field in a document - * @param {Object} aOptions + * @param {object} aOptions * @param {boolean} [aOptions.ignoreForm = false] * True to always use owner document as the `form` * @return {FormLike} diff --git a/toolkit/modules/JSONFile.sys.mjs b/toolkit/modules/JSONFile.sys.mjs @@ -56,7 +56,7 @@ const kSaveDelayMs = 1500; /** * Handles serialization of the data and persistence into a file. * - * @param {Object} config An object containing following members: + * @param {object} config An object containing following members: * @param {string} config.path * String containing the file path where data should be saved. * @param {string} [config.sanitizedBasename] diff --git a/toolkit/modules/LogManager.sys.mjs b/toolkit/modules/LogManager.sys.mjs @@ -140,7 +140,7 @@ class StorageStreamAppender extends Log.Appender { * (although it does maintain a .sawError property to help the consumer decide * based on its policies) * - * @param {Object} fomatter A log message formatter + * @param {object} fomatter A log message formatter * @param {boolean} overwriteFileOnFlush False to use append mode when opening the file for writing */ class FlushableStorageAppender extends StorageStreamAppender { @@ -214,7 +214,7 @@ class FlushableStorageAppender extends StorageStreamAppender { * * @param {string} subDirArray an array of path components, relative to the profile * directory, where the file will be created. - * @param {String} outputFileName the filename to write to. + * @param {string} outputFileName the filename to write to. * @returns {Promise} A promise that is resolved on completion or rejected with an error. */ async _copyStreamToFile(inputStream, subdirArray, outputFileName, log) { diff --git a/toolkit/modules/NLP.sys.mjs b/toolkit/modules/NLP.sys.mjs @@ -16,12 +16,12 @@ export var NLP = { * http://locutus.io/php/strings/levenshtein/index.html * License: MIT. * - * @param {String} word1 Word to compare against - * @param {String} word2 Word that may be different - * @param {Number} costIns The cost to insert a character - * @param {Number} costRep The cost to replace a character - * @param {Number} costDel The cost to delete a character - * @return {Number} + * @param {string} word1 Word to compare against + * @param {string} word2 Word that may be different + * @param {number} costIns The cost to insert a character + * @param {number} costRep The cost to replace a character + * @param {number} costDel The cost to delete a character + * @return {number} */ levenshtein(word1 = "", word2 = "", costIns = 1, costRep = 1, costDel = 1) { if (word1 === word2) { diff --git a/toolkit/modules/NewTabUtils.sys.mjs b/toolkit/modules/NewTabUtils.sys.mjs @@ -872,7 +872,7 @@ var ActivityStreamProvider = { /** * Get most-recently-created visited bookmarks for Activity Stream. * - * @param {Object} aOptions + * @param {object} aOptions * {num} bookmarkSecondsAgo: Maximum age of added bookmark. * {bool} ignoreBlocked: Do not filter out blocked links. * {int} numItems: Maximum number of items to return. @@ -950,7 +950,7 @@ var ActivityStreamProvider = { /** * Get most-recently-visited history with metadata for Activity Stream. * - * @param {Object} aOptions + * @param {object} aOptions * {bool} ignoreBlocked: Do not filter out blocked links. * {int} numItems: Maximum number of items to return. */ @@ -992,7 +992,7 @@ var ActivityStreamProvider = { /** * Gets the top frecent sites for Activity Stream. * - * @param {Object} aOptions + * @param {object} aOptions * {bool} ignoreBlocked: Do not filter out blocked links. * {int} numItems: Maximum number of items to return. * {int} topsiteFrecency: Minimum amount of frecency for a site. @@ -1205,9 +1205,9 @@ var ActivityStreamProvider = { /** * Executes arbitrary query against places database * - * @param {String} aQuery + * @param {string} aQuery * SQL query to execute - * @param {Object} [optional] aOptions + * @param {object} [optional] aOptions * aOptions.columns - an array of column names. if supplied the return * items will consists of objects keyed on column names. Otherwise * array of raw values is returned in the select order @@ -1256,7 +1256,7 @@ var ActivityStreamLinks = { /** * Block a url * - * @param {Object} aLink + * @param {object} aLink * The link which contains a URL to add to the block list */ blockURL(aLink) { @@ -1271,7 +1271,7 @@ var ActivityStreamLinks = { * Adds a bookmark and opens up the Bookmark Dialog to show feedback that * the bookmarking action has been successful * - * @param {Object} aData + * @param {object} aData * aData.url The url to bookmark * aData.title The title of the page to bookmark * @param {Window} aBrowserWindow @@ -1287,7 +1287,7 @@ var ActivityStreamLinks = { /** * Removes a bookmark * - * @param {String} aBookmarkGuid + * @param {string} aBookmarkGuid * The bookmark guid associated with the bookmark to remove * * @returns {Promise} Returns a promise at completion. @@ -1299,7 +1299,7 @@ var ActivityStreamLinks = { /** * Removes a history link and unpins the URL if previously pinned * - * @param {String} aUrl + * @param {string} aUrl * The url to be removed from history * * @returns {Promise} Returns a promise set to true if link was removed @@ -1313,7 +1313,7 @@ var ActivityStreamLinks = { /** * Get the Highlights links to show on Activity Stream * - * @param {Object} aOptions + * @param {object} aOptions * {bool} excludeBookmarks: Don't add bookmark items. * {bool} excludeHistory: Don't add history items. * {bool} withFavicons: Add favicon data: URIs, when possible. @@ -2136,7 +2136,7 @@ export var NewTabUtils = { * (If less than 0, then add 24.) * * @param {str} [surfaceID] Optional surface ID to constrain time zone to reduce identifying telemetry. - * @returns {Number} utc_offset. Output is clamped if surfaceID is specified, and 0 if surfaceID present and not supported. + * @returns {number} utc_offset. Output is clamped if surfaceID is specified, and 0 if surfaceID present and not supported. */ getUtcOffset(surfaceID) { const surfaceRestrictions = { NEW_TAB_EN_US: { min: 24 - 8, max: 24 - 4 } }; // Inclusive hour ranges UTC-8 (PST), UTC-4 (EDT) @@ -2169,7 +2169,7 @@ export var NewTabUtils = { * Borrowed from https://github.com/mozilla/gcp-ingestion/ingestion-beam/ * src/main/java/com/mozilla/telemetry/transforms/NormalizeAttributes.java * - * @returns {String} Normalized OS string mac|win|linux|android|ios|other + * @returns {string} Normalized OS string mac|win|linux|android|ios|other */ normalizeOs() { const osString = Services.appinfo.OS; diff --git a/toolkit/modules/PopupNotifications.sys.mjs b/toolkit/modules/PopupNotifications.sys.mjs @@ -803,7 +803,7 @@ PopupNotifications.prototype = { * Removes one or many Notifications. * * @param {Notification|Notification[]} notification - The Notification object/s to remove. - * @param {Boolean} [isCancel] - Whether to signal, in the notification event, that removal + * @param {boolean} [isCancel] - Whether to signal, in the notification event, that removal * should be treated as cancel. This is currently used to cancel permission requests * when their Notifications are removed. */ diff --git a/toolkit/modules/Preferences.sys.mjs b/toolkit/modules/Preferences.sys.mjs @@ -172,7 +172,7 @@ Preferences._set = function (prefName, prefValue) { * @param prefName {String|Array} * the pref to check, or an array of prefs to check * - * @returns {Boolean|Array} + * @returns {boolean | Array} * whether or not the pref has a value; or, if the caller provided * an array of pref names, an array of booleans indicating whether * or not the prefs have values @@ -196,7 +196,7 @@ Preferences.has = function (prefName) { * @param prefName {String|Array} * the pref to check, or an array of prefs to check * - * @returns {Boolean|Array} + * @returns {boolean | Array} * whether or not the pref has a user-set value; or, if the caller * provided an array of pref names, an array of booleans indicating * whether or not the prefs have user-set values @@ -262,7 +262,7 @@ Preferences.unlock = function (prefName) { * @param prefName {String|Array} * the pref to check, or an array of prefs to check * - * @returns {Boolean|Array} + * @returns {boolean | Array} * whether or not the pref has a user-set value; or, if the caller * provided an array of pref names, an array of booleans indicating * whether or not the prefs have user-set values diff --git a/toolkit/modules/ServiceRequest.sys.mjs b/toolkit/modules/ServiceRequest.sys.mjs @@ -108,7 +108,7 @@ async function getProxySource(proxyInfo) { * ServiceRequest is intended to be a drop-in replacement for current users * of XMLHttpRequest. * - * @param {Object} options - Options for underlying XHR, e.g. { mozAnon: bool } + * @param {object} options - Options for underlying XHR, e.g. { mozAnon: bool } */ export class ServiceRequest extends XMLHttpRequest { constructor(options) { @@ -118,9 +118,9 @@ export class ServiceRequest extends XMLHttpRequest { * Opens an XMLHttpRequest, and sets the NSS "beConservative" flag. * Requests are always async. * - * @param {String} method - HTTP method to use, e.g. "GET". - * @param {String} url - URL to open. - * @param {Object} options - Additional options { bypassProxy: bool }. + * @param {string} method - HTTP method to use, e.g. "GET". + * @param {string} url - URL to open. + * @param {object} options - Additional options { bypassProxy: bool }. */ open(method, url, options) { super.open(method, url, true); diff --git a/toolkit/modules/ShortcutUtils.sys.mjs b/toolkit/modules/ShortcutUtils.sys.mjs @@ -337,7 +337,7 @@ export var ShortcutUtils = { * Attempt to find a key for a given shortcut string, such as * "Ctrl+Shift+A" and determine if it is a system shortcut. * - * @param {Object} win The window to look for key elements in. + * @param {object} win The window to look for key elements in. * @param {string} value The shortcut string. * @returns {boolean} Whether a system shortcut was found or not. */ diff --git a/toolkit/modules/SubDialog.sys.mjs b/toolkit/modules/SubDialog.sys.mjs @@ -29,11 +29,11 @@ const HTML_NS = "http://www.w3.org/1999/xhtml"; * * @param {DOMNode} template - The template is copied to create a new dialog. * @param {DOMNode} parentElement - New dialog is appended onto parentElement. - * @param {String} id - A unique identifier for the dialog. - * @param {Object} dialogOptions - Dialog options object. - * @param {String[]} [dialogOptions.styleSheets] - An array of URLs to additional + * @param {string} id - A unique identifier for the dialog. + * @param {object} dialogOptions - Dialog options object. + * @param {string[]} [dialogOptions.styleSheets] - An array of URLs to additional * stylesheets to inject into the frame. - * @param {Boolean} [consumeOutsideClicks] - Whether to close the dialog when + * @param {boolean} [consumeOutsideClicks] - Whether to close the dialog when * its background overlay is clicked. * @param {SubDialog~resizeCallback} [resizeCallback] - Function to be called on * dialog resize. @@ -667,9 +667,9 @@ SubDialog.prototype = { * Helper for converting em to px because an em value from the dialog window could * translate to something else in the host window, as font sizes may vary. * - * @param {String} val + * @param {string} val * A CSS length value. - * @return {String} The converted CSS length value, or the original value if + * @return {string} The converted CSS length value, or the original value if * no conversion took place. */ _emToPx(val) { @@ -788,7 +788,7 @@ SubDialog.prototype = { /** * Setup dialog event listeners. * - * @param {Boolean} [includeLoad] - Whether to register load/unload listeners. + * @param {boolean} [includeLoad] - Whether to register load/unload listeners. */ _addDialogEventListeners(includeLoad = true) { if (this._window.isChromeWindow) { @@ -838,7 +838,7 @@ SubDialog.prototype = { /** * Remove dialog event listeners. * - * @param {Boolean} [includeLoad] - Whether to remove load/unload listeners. + * @param {boolean} [includeLoad] - Whether to remove load/unload listeners. */ _removeDialogEventListeners(includeLoad = true) { if (this._window.isChromeWindow) { @@ -934,17 +934,17 @@ SubDialog.prototype = { */ export class SubDialogManager { /** - * @param {Object} options - Dialog manager options. + * @param {object} options - Dialog manager options. * @param {DOMNode} options.dialogStack - Container element for all dialogs * this instance manages. * @param {DOMNode} options.dialogTemplate - Element to use as template for * constructing new dialogs. - * @param {Number} [options.orderType] - Whether dialogs should be ordered as + * @param {number} [options.orderType] - Whether dialogs should be ordered as * a stack or a queue. - * @param {Boolean} [options.allowDuplicateDialogs] - Whether to allow opening + * @param {boolean} [options.allowDuplicateDialogs] - Whether to allow opening * duplicate dialogs (same URI) at the same time. If disabled, opening a * dialog with the same URI as an existing dialog will be a no-op. - * @param {Object} options.dialogOptions - Options passed to every + * @param {object} options.dialogOptions - Options passed to every * SubDialog instance. * @see {@link SubDialog} for a list of dialog options. */ diff --git a/toolkit/modules/WebChannel.sys.mjs b/toolkit/modules/WebChannel.sys.mjs @@ -155,9 +155,9 @@ WebChannel.prototype = { * * @param callback {Function} * Callback that will be called when there is a message - * @param {String} id + * @param {string} id * The WebChannel id that was used for this message - * @param {Object} message + * @param {object} message * The message itself * @param sendingContext {Object} * The sending context of the source of the message. Can be passed to diff --git a/toolkit/modules/subprocess/subprocess_unix.worker.js b/toolkit/modules/subprocess/subprocess_unix.worker.js @@ -546,7 +546,7 @@ class ManagedProcess extends BaseProcess { * A ManagedProcess is already running, so here the spawn just performs the * connection of the file descriptors received. * - * @param {array} options + * @param {Array} options * An array of file descriptors from an existing process. */ spawn(options) { diff --git a/toolkit/mozapps/extensions/AddonManager.sys.mjs b/toolkit/mozapps/extensions/AddonManager.sys.mjs @@ -1731,13 +1731,13 @@ var AddonManagerInternal = { * * @param aUrl * The string represenation of the URL where the add-on is located - * @param {Object} [aOptions = {}] + * @param {object} [aOptions = {}] * Additional options for this install * @param {string} [aOptions.hash] * An optional hash of the add-on * @param {string} [aOptions.name] * An optional placeholder name while the add-on is being downloaded - * @param {string|Object} [aOptions.icons] + * @param {string | object} [aOptions.icons] * Optional placeholder icons while the add-on is being downloaded * @param {string} [aOptions.version] * An optional placeholder version while the add-on is being downloaded @@ -1745,7 +1745,7 @@ var AddonManagerInternal = { * An optional <browser> element for download permissions prompts. * @param {nsIPrincipal} [aOptions.triggeringPrincipal] * The principal which is attempting to install the add-on. - * @param {Object} [aOptions.telemetryInfo] + * @param {object} [aOptions.telemetryInfo] * An optional object which provides details about the installation source * included in the addon manager telemetry events. * @throws if aUrl is not specified or if an optional argument of @@ -1882,7 +1882,7 @@ var AddonManagerInternal = { * * @param {Element} aBrowser: The optional browser element that started the install * @param {nsIPrincipal} aInstallingPrincipal - * @param {String} aSitePerm + * @param {string} aSitePerm * @returns {Promise<SitePermsAddonInstall|null>} The promise will resolve with null if there * are no provider with a getSitePermsAddonInstallForWebpage method. In practice, * this should only be the case when SitePermsAddonProvider is not enabled, @@ -2852,7 +2852,7 @@ var AddonManagerInternal = { * Ideal icon size in pixels * @param aWindow * Optional window object for determining the correct scale. - * @return {String} The absolute URL of the icon or null if the addon doesn't have icons + * @return {string} The absolute URL of the icon or null if the addon doesn't have icons */ getPreferredIconURL(aAddon, aSize, aWindow = undefined) { if (aWindow && aWindow.devicePixelRatio) { @@ -3320,7 +3320,7 @@ var AddonManagerInternal = { * @param {browser} browser browser user is installing from * @param {nsIURI} url URI for the principal of the installing source * @param {AddonInstallWrapper} install - * @param {Object} info information such as addon wrapper + * @param {object} info information such as addon wrapper * @param {AddonWrapper} info.addon * @param {string} source simplified string describing source of install and is * generated based on the installing principal and checking @@ -4854,10 +4854,10 @@ export class EnvironmentAddonBuilder { /** * Returns a substring of the input string. * - * @param {String} aString The input string. + * @param {string} aString The input string. * @param {Integer} aMaxLength The maximum length of the returned substring. If this is * greater than the length of the input string, we return the whole input string. - * @return {String} The substring or null if the input string is null. + * @return {string} The substring or null if the input string is null. */ limitStringToLength(aString, aMaxLength) { if (typeof aString !== "string") { @@ -4870,7 +4870,7 @@ export class EnvironmentAddonBuilder { * Enforces the parameter to a boolean value. * * @param aValue The input value. - * @return {Boolean|Object} If aValue is a boolean or a number, returns its truthfulness + * @return {boolean | object} If aValue is a boolean or a number, returns its truthfulness * value. Otherwise, return null. */ enforceBoolean(aValue) { @@ -5553,7 +5553,7 @@ AMTelemetry = { * @param {AddonInstall} install * The AddonInstall instance to retrieve the source from. * - * @returns {Object | null} + * @returns {object | null} * The telemetry infor ({source, method}) from the given AddonInstall instance. */ getInstallTelemetryInfo(install) { diff --git a/toolkit/mozapps/extensions/Blocklist.sys.mjs b/toolkit/mozapps/extensions/Blocklist.sys.mjs @@ -224,7 +224,7 @@ const Utils = { * its comma separated list for it to be valid. Similarly for the * xpcomabi property. * - * @param {Object} item + * @param {object} item * The blocklist item. * @returns {bool} * Whether the entry matches the current OS. @@ -275,7 +275,7 @@ const Utils = { * Tests if this versionRange matches the item specified, and has a matching * targetApplication id and version. * - * @param {Object} versionRange + * @param {object} versionRange * The versionRange to check against * @param {string} itemVersion * The version of the actual addon/plugin to test for. @@ -333,7 +333,7 @@ const Utils = { * If there *are* targetApplications, if any of them don't have a guid property, * assign them the current app's guid. * - * @param {Object} entry + * @param {object} entry * blocklist entry object. */ ensureVersionRangeIsSane(entry) { @@ -361,8 +361,8 @@ const Utils = { /** * Create a blocklist URL for the given blockID * - * @param {String} id the blockID to use - * @returns {String} the blocklist URL. + * @param {string} id the blockID to use + * @returns {string} the blocklist URL. */ _createBlocklistURL(id) { let url = Services.urlFormatter.formatURLPref(PREF_BLOCKLIST_ITEM_URL); @@ -383,11 +383,11 @@ class TargetAppFilter { /** * Filter the entry. * - * @param {Object} entry + * @param {object} entry * A Remote Settings record. If it has a filter_expression, we'll pass it * straight to the default JEXL filter. Otherwise, we'll do custom * version range processing for target apps. - * @returns {?Object} The entry if it matches, `null` otherwise. + * @returns {?object} The entry if it matches, `null` otherwise. */ async filterEntry(entry) { // If the entry has a JEXL filter expression, it should prevail. @@ -461,7 +461,7 @@ class TargetAppFilter { * * @param {ClientEnvironment} environment Forarded as-is to the JEXL filter * @param {string} collectionName Forarded as-is to the JEXL filter - * @returns {Object} The entry if it matches, `null` otherwise. + * @returns {object} The entry if it matches, `null` otherwise. */ async function createTargetAppFilter(environment, collectionName) { const jexlFilter = await lazy.jexlFilterCreator(environment, collectionName); diff --git a/toolkit/mozapps/extensions/amWebAPI.sys.mjs b/toolkit/mozapps/extensions/amWebAPI.sys.mjs @@ -111,7 +111,7 @@ class APIObject { * - Only non-internal errors are exposed to the caller * * @param {string} apiRequest The command to invoke in the parent process. - * @param {array<cloneable>} apiArgs The arguments to include with the + * @param {Array<cloneable>} apiArgs The arguments to include with the * request to the parent process. * @param {function} resultConvert If provided, a function called with the * result from the parent process as an diff --git a/toolkit/mozapps/extensions/internal/AddonRepository.sys.mjs b/toolkit/mozapps/extensions/internal/AddonRepository.sys.mjs @@ -506,7 +506,7 @@ export var AddonRepository = { * * @param aIDs * The array of ids to retrieve metadata for. - * @returns {array<AddonSearchResult>} + * @returns {Array<AddonSearchResult>} */ async getAddonsByIDs(aIDs) { const idCheck = aIDs.map(id => { @@ -542,13 +542,13 @@ export var AddonRepository = { * metadata for. * @returns {object} result * The result of the mapping. - * @returns {array<AddonSearchResult>} result.addons + * @returns {Array<AddonSearchResult>} result.addons * The AddonSearchResults for the addons that were successfully mapped. - * @returns {array<string>} result.matchedIDs + * @returns {Array<string>} result.matchedIDs * The IDs of the extensions that were successfully matched to * equivalents that can be installed in this browser. These are * the IDs before matching to equivalents. - * @returns {array<string>} result.unmatchedIDs + * @returns {Array<string>} result.unmatchedIDs * The IDs of the extensions that were not matched to equivalents. */ async getMappedAddons(browserID, extensionIDs) { @@ -595,7 +595,7 @@ export var AddonRepository = { * * @param aIds * The array of add-on ids to add to the cache - * @returns {array<AddonSearchResult>} Add-ons to add to the cache. + * @returns {Array<AddonSearchResult>} Add-ons to add to the cache. */ async cacheAddons(aIds) { logger.debug( @@ -1062,7 +1062,7 @@ var AddonDatabase = { * Asynchronously repopulates the database so it only contains the * specified add-ons * - * @param {array<AddonSearchResult>} aAddons + * @param {Array<AddonSearchResult>} aAddons * Add-ons to repopulate the database with. */ repopulate(aAddons) { @@ -1079,7 +1079,7 @@ var AddonDatabase = { /** * Asynchronously insert new addons into the database. * - * @param {array<AddonSearchResult>} aAddons + * @param {Array<AddonSearchResult>} aAddons * Add-ons to insert/update in the database */ async update(aAddons) { @@ -1091,7 +1091,7 @@ var AddonDatabase = { /** * Merge the given addons into the database. * - * @param {array<AddonSearchResult>} aAddons + * @param {Array<AddonSearchResult>} aAddons * Add-ons to insert/update in the database */ _update(aAddons) { diff --git a/toolkit/mozapps/extensions/internal/AddonTestUtils.sys.mjs b/toolkit/mozapps/extensions/internal/AddonTestUtils.sys.mjs @@ -808,7 +808,7 @@ export var AddonTestUtils = { /** * Starts up the add-on manager as if it was started by the application. * - * @param {Object} params + * @param {object} params * The new params are in an object and new code should use that. * @param {boolean} params.earlyStartup * Notifies early startup phase. default is true @@ -983,7 +983,7 @@ export var AddonTestUtils = { * simulate an application upgrade (or downgrade) where the version * is changed to newVersion when re-started. * - * @param {Object} params + * @param {object} params * The new params are in an object and new code should use that. * See promiseStartupManager for param details. */ @@ -1030,7 +1030,7 @@ export var AddonTestUtils = { * * @param {string|nsIFile} zipFile * The zip file to write to. - * @param {Object} files + * @param {object} files * An object containing filenames and the data to write to the * corresponding paths in the zip file. * @param {integer} [flags = 0] @@ -1153,7 +1153,7 @@ export var AddonTestUtils = { * Creates an XPI file for some WebExtension data in the temporary directory and * returns the nsIFile for it. The file will be deleted when the test completes. * - * @param {Object} data + * @param {object} data * The object holding data about the add-on, as expected by * |ExtensionTestCommon.generateXPI|. * @return {nsIFile} A file pointing to the created XPI file @@ -1487,7 +1487,7 @@ export var AddonTestUtils = { * @param {boolean} [ignoreIncompatible = false] * Optional parameter to ignore add-ons that are incompatible * with the application - * @param {Object} [installTelemetryInfo = undefined] + * @param {object} [installTelemetryInfo = undefined] * Optional parameter to set the install telemetry info for the * installed addon * @returns {Promise} @@ -1757,7 +1757,7 @@ export var AddonTestUtils = { * * @param {AddonWrapper|AddonInstall} addonOrInstall * The addon or addonInstall object to check. - * @param {Object} expectedInstallInfo + * @param {object} expectedInstallInfo * The expected installTelemetryInfo properties * (every property can be a primitive value or a regular expression). * @param {string} [msg] @@ -1905,7 +1905,7 @@ export var AddonTestUtils = { /** * Retrive any AMTelemetry event collected and clears _all_ telemetry events. * - * @returns {Array<Object>} + * @returns {Array<object>} * The array of the collected telemetry data. */ getAMTelemetryEvents() { diff --git a/toolkit/mozapps/extensions/internal/ProductAddonChecker.sys.mjs b/toolkit/mozapps/extensions/internal/ProductAddonChecker.sys.mjs @@ -34,7 +34,7 @@ const TIMEOUT_DELAY_MS = 20000; * * @param request * The XMLHttpRequest. - * @returns {Object} result - An object containing the results. + * @returns {object} result - An object containing the results. * @returns {integer} result.status - Request status code, if available, else the channel nsresult. * @returns {integer} result.channelStatus - Channel nsresult. * @returns {integer} result.errorCode - Request error code. diff --git a/toolkit/mozapps/extensions/internal/SitePermsAddonProvider.sys.mjs b/toolkit/mozapps/extensions/internal/SitePermsAddonProvider.sys.mjs @@ -104,7 +104,7 @@ class SitePermsAddonWrapper { /** * Returns the list of gated permissions types granted for the instance's origin * - * @return {Array<String>} + * @return {Array<string>} */ get sitePermissions() { return Array.from(new Set(this.#permissions.map(perm => perm.type))); @@ -116,7 +116,7 @@ class SitePermsAddonWrapper { * permission. * * @param {nsIPermission} permission: The permission being added/removed - * @param {String} action: The action perm-changed notifies us about + * @param {string} action: The action perm-changed notifies us about */ handlePermissionChange(permission, action) { if (action == "added") { @@ -348,7 +348,7 @@ class SitePermsAddonInstall { /** * @param {nsIPrincipal} installingPrincipal - * @param {String} sitePerm + * @param {string} sitePerm */ constructor(installingPrincipal, sitePerm) { this.principal = installingPrincipal; @@ -437,7 +437,7 @@ class SitePermsAddonInstall { /** * Add a listener for the install events * - * @param {Object} listener + * @param {object} listener * @param {Function} [listener.onDownloadEnded] * @param {Function} [listener.onInstallCancelled] * @param {Function} [listener.onInstallEnded] @@ -450,7 +450,7 @@ class SitePermsAddonInstall { /** * Remove a listener * - * @param {Object} listener: The same object reference that was used for `addListener` + * @param {object} listener: The same object reference that was used for `addListener` */ removeListener(listener) { this.#listeners.delete(listener); @@ -459,7 +459,7 @@ class SitePermsAddonInstall { /** * Call the listeners callbacks for a given event. * - * @param {String} eventName: The event to fire. Should be one of `this.#installEvents` + * @param {string} eventName: The event to fire. Should be one of `this.#installEvents` */ #callInstallListeners(eventName) { if (!Object.values(this.#installEvents).includes(eventName)) { @@ -486,7 +486,7 @@ const SitePermsAddonProvider = { * Update wrappersMapByOrigin on perm-changed * * @param {nsIPermission} permission: The permission being added/removed - * @param {String} action: The action perm-changed notifies us about + * @param {string} action: The action perm-changed notifies us about */ handlePermissionChange(permission, action = "added") { // Bail out if it it's not a gated perm @@ -577,7 +577,7 @@ const SitePermsAddonProvider = { /** * Get a SitePermsAddonWrapper from an extension id * - * @param {String|null|undefined} id: The extension id, + * @param {string | null | undefined} id: The extension id, * @returns {SitePermsAddonWrapper|undefined} */ async getAddonByID(id) { @@ -597,7 +597,7 @@ const SitePermsAddonProvider = { /** * Get a list of SitePermsAddonWrapper for a given list of extension types. * - * @param {Array<String>|null|undefined} types: If null or undefined is passed, + * @param {Array<string> | null | undefined} types: If null or undefined is passed, * the callsites expect to get all the addons from the provider, without * any filtering. * @returns {Array<SitePermsAddonWrapper>} @@ -619,7 +619,7 @@ const SitePermsAddonProvider = { * Create and return a SitePermsAddonInstall instance for a permission on a given principal * * @param {nsIPrincipal} installingPrincipal - * @param {String} sitePerm + * @param {string} sitePerm * @returns {SitePermsAddonInstall} */ getSitePermsAddonInstallForWebpage(installingPrincipal, sitePerm) { diff --git a/toolkit/mozapps/extensions/internal/XPIDatabase.sys.mjs b/toolkit/mozapps/extensions/internal/XPIDatabase.sys.mjs @@ -226,7 +226,7 @@ async function getRepositoryAddon(aAddon) { * An array of properties to be copied * @param {object?} [aTarget] * An optional target object to copy the properties to - * @returns {Object} + * @returns {object} * The object that the properties were copied onto */ function copyProperties(aObject, aProperties, aTarget) { @@ -344,7 +344,7 @@ export class AddonInternal { * SitePermission addons are a special case, where the triggering install site may be a subdomain * of a valid xpi origin. * - * @param {Object} origins Object containing URIs related to install. + * @param {object} origins Object containing URIs related to install. * @params {nsIURI} origins.installFrom The nsIURI of the website that has triggered the install flow. * @params {nsIURI} origins.source The nsIURI where the xpi is hosted. * @returns {boolean} @@ -759,7 +759,7 @@ export class AddonInternal { * This method reads particular properties of that metadata that may be newer * than that in the extension manifest, like compatibility information. * - * @param {Object} aObj + * @param {object} aObj * A JS object containing the cached metadata */ importMetadata(aObj) { @@ -1881,7 +1881,7 @@ export const XPIDatabase = { * Converts the current internal state of the XPI addon database to * a JSON.stringify()-ready structure * - * @returns {Object} + * @returns {object} */ toJSON() { if (!this.addonDB) { @@ -2895,7 +2895,7 @@ export const XPIDatabase = { * * @param {AddonInternal} aAddon * The AddonInternal being updated - * @param {Object} aProperties + * @param {object} aProperties * A dictionary of properties to set */ setAddonProperties(aAddon, aProperties) { @@ -2976,7 +2976,7 @@ export const XPIDatabase = { * * @param {AddonInternal} aAddon * The AddonInternal to update - * @param {Object} properties - Properties to set on the addon + * @param {object} properties - Properties to set on the addon * @param {boolean?} [properties.userDisabled] * Value for the userDisabled property. If undefined the value will * not change @@ -3181,7 +3181,7 @@ export const XPIDatabaseReconcile = { * Returns a map of ID -> add-on. When the same add-on ID exists in multiple * install locations the highest priority location is chosen. * - * @param {Map<String, AddonInternal>} addonMap + * @param {Map<string, AddonInternal>} addonMap * The add-on map to flatten. * @param {function(string, string): boolean} [hideAddonCb] * An optional callback used to determine if any of the addons @@ -3216,7 +3216,7 @@ export const XPIDatabaseReconcile = { /** * Finds the visible add-ons from the map. * - * @param {Map<String, AddonInternal>} addonMap + * @param {Map<string, AddonInternal>} addonMap * The add-on map to filter. * @returns {Map<string, AddonInternal>} */ @@ -3715,7 +3715,7 @@ export const XPIDatabaseReconcile = { * Always called after XPIDatabase.sys.mjs and extensions.json have been * loaded. * - * @param {Object} aManifests + * @param {object} aManifests * A dictionary of cached AddonInstalls for add-ons that have been * installed * @param {boolean} aUpdateCompatibility diff --git a/toolkit/mozapps/extensions/internal/XPIInstall.sys.mjs b/toolkit/mozapps/extensions/internal/XPIInstall.sys.mjs @@ -1264,7 +1264,7 @@ class AddonInstall { * @param {nsIURL} url * The nsIURL to get the add-on from. If this is an nsIFileURL then * the add-on will not need to be downloaded - * @param {Object} [options = {}] + * @param {object} [options = {}] * Additional options for the install * @param {string} [options.hash] * An optional hash for the add-on @@ -1279,7 +1279,7 @@ class AddonInstall { * @param {string} [options.version] * The expected version for the add-on. * Required for updates, i.e. when existingAddon is set. - * @param {Object?} [options.telemetryInfo] + * @param {object?} [options.telemetryInfo] * An optional object which provides details about the installation source * included in the addon manager telemetry events. * @param {boolean} [options.isUserRequestedUpdate] @@ -2345,7 +2345,7 @@ var DownloadAddonInstall = class extends AddonInstall { * The XPIStateLocation the add-on will be installed into * @param {nsIURL} url * The nsIURL to get the add-on from - * @param {Object} [options = {}] + * @param {object} [options = {}] * Additional options for the install * @param {string} [options.hash] * An optional hash for the add-on @@ -2360,7 +2360,7 @@ var DownloadAddonInstall = class extends AddonInstall { * An optional name for the add-on * @param {string} [options.type] * An optional type for the add-on - * @param {Object} [options.icons] + * @param {object} [options.icons] * Optional icons for the add-on * @param {string} [options.version] * The expected version for the add-on. @@ -2846,7 +2846,7 @@ var DownloadAddonInstall = class extends AddonInstall { * The callback to pass the new AddonInstall to * @param {AddonInternal} aAddon * The add-on being updated - * @param {Object} aUpdate + * @param {object} aUpdate * The metadata about the new version from the update manifest * @param {boolean} isUserRequested * An optional boolean, true if the install object is related to a user triggered update. @@ -3287,7 +3287,7 @@ UpdateChecker.prototype = { * The file to install * @param {XPIStateLocation} location * The location to install to - * @param {Object?} [telemetryInfo] + * @param {object?} [telemetryInfo] * An optional object which provides details about the installation source * included in the addon manager telemetry events. * @returns {Promise<AddonInstall>} @@ -3474,7 +3474,7 @@ class DirectoryInstaller { /** * Installs an add-on into the install location. * - * @param {Object} options + * @param {object} options * Installation options. * @param {string} options.id * The ID of the add-on to install @@ -3627,7 +3627,7 @@ class SystemAddonInstaller extends DirectoryInstaller { /** * Saves the current set of system add-ons * - * @param {Object} aAddonSet - object containing schema, directory and set + * @param {object} aAddonSet - object containing schema, directory and set * of system add-on IDs and versions. */ static _saveAddonSet(aAddonSet) { @@ -4589,13 +4589,13 @@ export var XPIInstall = { * A hash for the install * @param {string} [aOptions.name] * A name for the install - * @param {Object} [aOptions.icons] + * @param {object} [aOptions.icons] * Icon URLs for the install * @param {string} [aOptions.version] * A version for the install * @param {XULElement} [aOptions.browser] * The browser performing the install - * @param {Object} [aOptions.telemetryInfo] + * @param {object} [aOptions.telemetryInfo] * An optional object which provides details about the installation source * included in the addon manager telemetry events. * @param {boolean} [aOptions.sendCookies = false] @@ -4633,7 +4633,7 @@ export var XPIInstall = { * * @param {nsIFile} aFile * The file to be installed - * @param {Object?} [aInstallTelemetryInfo] + * @param {object?} [aInstallTelemetryInfo] * An optional object which provides details about the installation source * included in the addon manager telemetry events. * @param {boolean} [aUseSystemLocation = false] diff --git a/toolkit/mozapps/extensions/internal/XPIProvider.sys.mjs b/toolkit/mozapps/extensions/internal/XPIProvider.sys.mjs @@ -418,7 +418,7 @@ function* iterDirectory(aDir) { * in which "webextension-foo" types were converted to "foo" and the * "loader" property was added to distinguish different addon types. * - * @param {Object} addon The addon info to migrate. + * @param {object} addon The addon info to migrate. * @returns {boolean} True if the addon data was converted, false if not. */ function migrateAddonLoader(addon) { @@ -556,7 +556,7 @@ class XPIState { * Returns a JSON-compatible representation of this add-on's state * data, to be saved to addonStartup.json. * - * @returns {Object} + * @returns {object} */ toJSON() { let json = { @@ -764,7 +764,7 @@ class XPIStateLocation extends Map { * Returns a JSON-compatible representation of this location's state * data, to be saved to addonStartup.json. * - * @returns {Object} + * @returns {object} */ toJSON() { let json = { @@ -1024,7 +1024,7 @@ var SystemBuiltInLocation = /** * Finds all the add-ons installed in this location. * - * @returns {Map<AddonID, {builtin: { addon_version: String, res_url: String}}>} + * @returns {Map<AddonID, {builtin: {addon_version: string, res_url: string}}>} * A map of add-ons present in this location. */ readAddons() { @@ -1292,7 +1292,7 @@ class SystemAddonLocation extends DirectoryLocation { /** * Reads the current set of system add-ons * - * @returns {Object} + * @returns {object} */ static _loadAddonSet() { try { @@ -1454,7 +1454,7 @@ var XPIStates = { /** * Load extension state data from addonStartup.json. * - * @returns {Object} + * @returns {object} */ loadExtensionState() { let state; @@ -1912,7 +1912,7 @@ var XPIStates = { * A helper class to manage the lifetime of and interaction with * bootstrap scopes for an add-on. * - * @param {Object} addon + * @param {object} addon * The add-on which owns this scope. Should be either an * AddonInternal or XPIState object. */ @@ -1932,7 +1932,7 @@ class BootstrapScope { * Returns a BootstrapScope object for the given add-on. If an active * scope exists, it is returned. Otherwise a new one is created. * - * @param {Object} addon + * @param {object} addon * The add-on which owns this scope, as accepted by the * constructor. * @returns {BootstrapScope} @@ -1960,7 +1960,7 @@ class BootstrapScope { * the wrapped bootstrap scope has a fetchState method, it is called, * and its result returned. If not, returns null. * - * @returns {Object|null} + * @returns {object | null} */ fetchState() { if (this.scope && this.scope.fetchState) { @@ -1976,7 +1976,7 @@ class BootstrapScope { * The name of the bootstrap method to call * @param {integer} aReason * The reason flag to pass to the bootstrap's startup method - * @param {Object} [aExtraParams = {}] + * @param {object} [aExtraParams = {}] * An object of additional key/value pairs to pass to the method in * the params argument * @returns {any} @@ -2161,7 +2161,7 @@ class BootstrapScope { * * @param {integer} reason * The reason code for the startup call. - * @param {Object} [aExtraParams] + * @param {object} [aExtraParams] * Optional extra parameters to pass to the bootstrap method. * @returns {Promise} * Resolves when the startup method has run to completion, rejects @@ -2199,7 +2199,7 @@ class BootstrapScope { * * @param {integer} reason * The reason code for the shutdown call. - * @param {Object} [aExtraParams] + * @param {object} [aExtraParams] * Optional extra parameters to pass to the bootstrap method. */ async shutdown(reason, aExtraParams) { @@ -2219,7 +2219,7 @@ class BootstrapScope { * * @param {integer} reason * The reason code for the shutdown call. - * @param {Object} [aExtraParams] + * @param {object} [aExtraParams] * Optional extra parameters to pass to the bootstrap method. */ async disable() { @@ -2244,7 +2244,7 @@ class BootstrapScope { * @param {boolean} [startup = false] * If true, and the add-on is active, calls its startup method * after its install method. - * @param {Object} [extraArgs] + * @param {object} [extraArgs] * Optional extra parameters to pass to the bootstrap method. * @returns {Promise} * Resolves when the startup method has run to completion, if @@ -2275,7 +2275,7 @@ class BootstrapScope { * * @param {integer} reason * The reason code for the calls. - * @param {Object} [extraArgs] + * @param {object} [extraArgs] * Optional extra parameters to pass to the bootstrap method. * @returns {Promise} * Resolves when the shutdown method has run to completion, if @@ -3098,7 +3098,7 @@ export var XPIProvider = { * Check the staging directories of install locations for any add-ons to be * installed or add-ons to be uninstalled. * - * @param {Object} aManifests + * @param {object} aManifests * A dictionary to add detected install manifests to for the purpose * of passing through updated compatibility information * @returns {boolean} @@ -3174,7 +3174,7 @@ export var XPIProvider = { * newer version already exists or the user has previously uninstalled the * distributed add-on. * - * @param {Object} aManifests + * @param {object} aManifests * A dictionary to add new install manifests to to save having to * reload them later * @param {string} [aAppChanged] diff --git a/toolkit/mozapps/extensions/internal/siteperms-addon-utils.sys.mjs b/toolkit/mozapps/extensions/internal/siteperms-addon-utils.sys.mjs @@ -52,7 +52,7 @@ export function isKnownPublicSuffix(siteOrigin) { /** * ⚠️ This should be only used for testing purpose ⚠️ * - * @param {Array<String>} permissionTypes + * @param {Array<string>} permissionTypes * @throws if not called from xpcshell test */ export function addGatedPermissionTypesForXpcShellTests(permissionTypes) { @@ -65,7 +65,7 @@ export function addGatedPermissionTypesForXpcShellTests(permissionTypes) { /** * @param {nsIPrincipal} principal - * @returns {Boolean} + * @returns {boolean} */ export function isPrincipalInSitePermissionsBlocklist(principal) { return lazy.blocklistedOriginsSet.has(principal.baseDomain); diff --git a/toolkit/mozapps/extensions/test/browser/browser_html_sitepermission_addons.js b/toolkit/mozapps/extensions/test/browser/browser_html_sitepermission_addons.js @@ -142,7 +142,7 @@ add_task(async function testAboutAddonUninstall() { * @param {Tab} tab: The tab in which we want to install the gated permission * @param {Function} spawnCallback: function used in `SpecialPowers.spawn` that will trigger * the install - * @param {String} expectedPermType: The name of the permission that should be granted + * @param {string} expectedPermType: The name of the permission that should be granted * @returns {Promise<Addon>} The installed addon instance */ async function testInstallGatedPermission( diff --git a/toolkit/mozapps/extensions/test/xpcshell/head_system_addons.js b/toolkit/mozapps/extensions/test/xpcshell/head_system_addons.js @@ -309,7 +309,7 @@ async function buildPrefilledUpdatesDir() { /** * Check currently installed ssystem add-ons against a set of conditions. * - * @param {Array<Object>} conditions - an array of objects of the form { isUpgrade: false, version: null} + * @param {Array<object>} conditions - an array of objects of the form { isUpgrade: false, version: null} * @param {nsIFile} distroDir - the system add-on distribution directory (the "features" dir in the app directory) */ async function checkInstalledSystemAddons(conditions, distroDir) { @@ -485,9 +485,9 @@ function verifySystemAddonSetPref(expectedAddons) { /** * Verify state of system add-ons after installation. * - * @param {Array<Object>} initialState - an array of objects of the form {isUpgrade: false, version: null} - * @param {Array<Object>} finalState - an array of objects of the form {isUpgrade: false, version: null} - * @param {Boolean} alreadyUpgraded - whether a restartless upgrade has already been performed. + * @param {Array<object>} initialState - an array of objects of the form {isUpgrade: false, version: null} + * @param {Array<object>} finalState - an array of objects of the form {isUpgrade: false, version: null} + * @param {boolean} alreadyUpgraded - whether a restartless upgrade has already been performed. * @param {nsIFile} distroDir - the system add-on distribution directory (the "features" dir in the app directory) */ async function verifySystemAddonState( @@ -574,12 +574,12 @@ async function verifySystemAddonState( /** * Run system add-on tests and compare the results against a set of expected conditions. * - * @param {String} setupName - name of the current setup conditions. + * @param {string} setupName - name of the current setup conditions. * @param {Object<function, Array<Object>} setup - Defines the set of initial conditions to run each test against. Each should * define the following properties: * setup: A task to setup the profile into the initial state. * initialState: The initial expected system add-on state after setup has run. - * @param {Array<Object>} test - The test to run. Each test must define an updateList or test. The following + * @param {Array<object>} test - The test to run. Each test must define an updateList or test. The following * properties are used: * updateList: The set of add-ons the server should respond with. * test: A function to run to perform the update check (replaces diff --git a/toolkit/mozapps/extensions/test/xpcshell/test_webextension_theme.js b/toolkit/mozapps/extensions/test/xpcshell/test_webextension_theme.js @@ -77,8 +77,8 @@ add_task(async function setup_to_default_browserish_state() { * Set the `userDisabled` property of one specific theme and check if the theme * switching works as expected by checking the state of all installed themes. * - * @param {String} which ID of the addon to set the `userDisabled` property on - * @param {Boolean} disabled Flag value to switch to + * @param {string} which ID of the addon to set the `userDisabled` property on + * @param {boolean} disabled Flag value to switch to */ async function setDisabledStateAndCheck(which, disabled = false) { if (disabled) { diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_block_fullscreen_prompt.js b/toolkit/mozapps/extensions/test/xpinstall/browser_block_fullscreen_prompt.js @@ -8,7 +8,7 @@ * Spawns content task in browser to enter / leave fullscreen * * @param browser - Browser to use for JS fullscreen requests - * @param {Boolean} fullscreenState - true to enter fullscreen, false to leave + * @param {boolean} fullscreenState - true to enter fullscreen, false to leave */ function changeFullscreen(browser, fullscreenState) { return SpecialPowers.spawn( diff --git a/toolkit/mozapps/handling/ContentDispatchChooser.sys.mjs b/toolkit/mozapps/handling/ContentDispatchChooser.sys.mjs @@ -340,7 +340,7 @@ export class nsContentDispatchChooser { * we will fallback to a standalone window. * * @param {string} aDialogURL - URL of the dialog to open. - * @param {Object} aDialogArgs - Arguments passed to the dialog. + * @param {object} aDialogArgs - Arguments passed to the dialog. * @param {BrowsingContext} [aBrowsingContext] - BrowsingContext associated * with the tab the dialog is associated with. */ diff --git a/tools/profiler/tests/ProfilerTestUtils.sys.mjs b/tools/profiler/tests/ProfilerTestUtils.sys.mjs @@ -43,7 +43,7 @@ export var ProfilerTestUtils = { * while additionally performing checks to ensure that the profiler is not * already running when we call this function. * - * @param {Object} callersSettings The settings object to deconstruct and pass + * @param {object} callersSettings The settings object to deconstruct and pass * to the profiler. Unspecified settings are overwritten by the default: * { * entries: 8 * 1024 * 1024 @@ -91,7 +91,7 @@ export var ProfilerTestUtils = { /** * Get the payloads of a type recursively, including from all subprocesses. * - * @param {Object} profile The gecko profile. + * @param {object} profile The gecko profile. * @param {string} type The marker payload type, e.g. "DiskIO". * @param {Array} payloadTarget The recursive list of payloads. * @return {Array} The final payloads. @@ -116,7 +116,7 @@ export var ProfilerTestUtils = { /** * Get the payloads of a type from a single thread. * - * @param {Object} thread The thread from a profile. + * @param {object} thread The thread from a profile. * @param {string} type The marker payload type, e.g. "DiskIO". * @return {Array} The payloads. */ @@ -135,7 +135,7 @@ export var ProfilerTestUtils = { /** * Applies the marker schema to create individual objects for each marker * - * @param {Object} thread The thread from a profile. + * @param {object} thread The thread from a profile. * @return {InflatedMarker[]} The markers. */ getInflatedMarkerData(thread) { @@ -157,7 +157,7 @@ export var ProfilerTestUtils = { * Applies the marker schema to create individual objects for each marker, then * keeps only the network markers that match the profiler tests. * - * @param {Object} thread The thread from a profile. + * @param {object} thread The thread from a profile. * @return {InflatedMarker[]} The filtered network markers. */ getInflatedNetworkMarkers(thread) { @@ -244,7 +244,7 @@ export var ProfilerTestUtils = { * Verify that a given JSON string is compact - i.e. does not contain * unexpected whitespace. * - * @param {String} the JSON string to check + * @param {string} the JSON string to check * @return {Bool} Whether the string is compact or not */ verifyJSONStringIsCompact(s) { diff --git a/tools/profiler/tests/browser/browser_test_feature_jstracing.js b/tools/profiler/tests/browser/browser_test_feature_jstracing.js @@ -260,7 +260,7 @@ function getCallerNameFromStackIdx(thread, stackIdx) { * This function takes a thread, and a sample tuple from the "data" array, and * inflates the frame to be an array of strings. * - * @param {Object} thread - The thread from the profile. + * @param {object} thread - The thread from the profile. * @param {Array} sample - The tuple from the thread.samples.data array. * @returns {Array<string>} An array of function names. */ diff --git a/tools/profiler/tests/browser/head.js b/tools/profiler/tests/browser/head.js @@ -76,8 +76,8 @@ async function waitSamplingAndStopProfilerAndGetThreads(contentPid) { * Then from this thread we get its parent thread. Indeed the parent thread is * where all network stuff happens, so this is useful for network marker tests. * - * @param {Object} profile - * @returns {{ serviceWorkerThread: Object, serviceWorkerParentThread: Object }} the found threads + * @param {object} profile + * @returns {{serviceWorkerThread: object, serviceWorkerParentThread: object}} the found threads */ function findServiceWorkerThreads(profile) { const allThreads = [ @@ -144,7 +144,7 @@ function findServiceWorkerThreads(profile) { * This logs some basic information about the passed thread. * * @param {string} prefix - * @param {Object} thread + * @param {object} thread */ function logInformationForThread(prefix, thread) { if (!thread) { diff --git a/tools/profiler/tests/xpcshell/head.js b/tools/profiler/tests/xpcshell/head.js @@ -27,7 +27,7 @@ add_setup(ProfilerTestUtils.assertProfilerInactive); * This function takes a thread, and a sample tuple from the "data" array, and * inflates the frame to be an array of strings. * - * @param {Object} thread - The thread from the profile. + * @param {object} thread - The thread from the profile. * @param {Array} sample - The tuple from the thread.samples.data array. * @returns {Array<string>} An array of function names. */ diff --git a/tools/profiler/tests/xpcshell/test_feature_fileioall.js b/tools/profiler/tests/xpcshell/test_feature_fileioall.js @@ -91,7 +91,7 @@ add_task(async () => { }); /** - * @typedef {Object} TestConfig + * @typedef {object} TestConfig * @prop {Array} features The list of profiler features * @prop {string[]} threadsFilter The list of threads to profile * @prop {string} filename A filename to trigger a write operation diff --git a/uriloader/exthandler/tests/mochitest/browser_protocol_ask_dialog_permission.js b/uriloader/exthandler/tests/mochitest/browser_protocol_ask_dialog_permission.js @@ -161,10 +161,10 @@ function useTriggeringPrincipal(principal = undefined) { * * @param {MozBrowser} browser - Browser to navigate. * @param {string} scheme - Scheme of the test url. e.g. irc - * @param {Object} [options] - Test options. - * @param {Object} [options.permDialogOptions] - Test options for the permission + * @param {object} [options] - Test options. + * @param {object} [options.permDialogOptions] - Test options for the permission * dialog. If defined, we expect this dialog to be shown. - * @param {Object} [options.chooserDialogOptions] - Test options for the chooser + * @param {object} [options.chooserDialogOptions] - Test options for the chooser * dialog. If defined, we expect this dialog to be shown. * @param {Function} [options.triggerLoad] - An async callback function to * trigger the load. Will be passed the browser and scheme to use. @@ -330,7 +330,7 @@ async function testOpenProto( * @param {dialog} dialogEl * @param {string} dialogType - String identifier of dialog type. * Either "permission" or "chooser". - * @param {Object} options - Test Options. + * @param {object} options - Test Options. * @param {boolean} [options.hasCheckbox] - Whether the dialog is expected to * have a visible checkbox. * @param {boolean} [options.hasCheckboxState] - The check state of the checkbox diff --git a/uriloader/exthandler/tests/mochitest/head.js b/uriloader/exthandler/tests/mochitest/head.js @@ -516,7 +516,7 @@ function waitForExtProtocolSandboxError() { /** * Run the external protocol sandbox test using iframes. * - * @param {Object} options + * @param {object} options * @param {boolean} options.blocked - Whether the navigation should be blocked. * @param {string} options.sandbox - See {@link navigateExternalProtoFromIframe}. * @param {string} options.useCSPSandbox - See {@link navigateExternalProtoFromIframe}.