├── .circleci ├── .gitignore ├── config.yml ├── config │ ├── base.yml │ ├── build.js │ ├── jobs │ │ └── lint.yml │ ├── package.json │ └── yarn.lock └── fix-known-hosts.sh ├── .clang-format ├── .clang-tidy ├── .devcontainer ├── README.md ├── devcontainer.json ├── docker-compose.yml ├── on-create-command.sh └── update-content-command.sh ├── .dockerignore ├── .env.example ├── .eslintrc.json ├── .git-blame-ignore-revs ├── .gitattributes ├── .github ├── CODEOWNERS ├── ISSUE_TEMPLATE │ ├── bug_report.yml │ ├── feature_request.yml │ └── mac_app_store_private_api_rejection.yml ├── PULL_REQUEST_TEMPLATE.md ├── config.yml └── workflows │ ├── branch-created.yml │ ├── issue-commented.yml │ ├── issue-labeled.yml │ ├── issue-unlabeled.yml │ ├── pull-request-labeled.yml │ ├── scorecards.yml │ ├── semantic.yml │ ├── stale.yml │ └── update_appveyor_image.yml ├── .gitignore ├── .husky ├── pre-commit └── pre-push ├── .markdownlint.autofix.json ├── .markdownlint.json ├── .nvmrc ├── .remarkrc ├── BUILD.gn ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── DEPS ├── LICENSE ├── README.md ├── SECURITY.md ├── appveyor-bake.yml ├── appveyor-woa.yml ├── appveyor.yml ├── build ├── .eslintrc.json ├── args │ ├── all.gn │ ├── ffmpeg.gn │ ├── native_tests.gn │ ├── release.gn │ └── testing.gn ├── asar.gni ├── config │ └── BUILD.gn ├── dump_syms.py ├── electron.def ├── extract_symbols.gni ├── fuses │ ├── build.py │ └── fuses.json5 ├── generate-template.py ├── generate_node_defines.py ├── js2c.py ├── mac │ └── make_locale_dirs.py ├── npm-run.py ├── npm.gni ├── profile_toolchain.py ├── rules.gni ├── run-in-dir.py ├── run-node.py ├── strip_framework.py ├── templated_file.gni ├── templates │ ├── electron_rc.tmpl │ ├── electron_version.tmpl │ └── version_string.tmpl ├── tsc.gni ├── webpack │ ├── webpack.config.asar.js │ ├── webpack.config.base.js │ ├── webpack.config.browser.js │ ├── webpack.config.isolated_renderer.js │ ├── webpack.config.renderer.js │ ├── webpack.config.sandboxed_renderer.js │ ├── webpack.config.utility.js │ ├── webpack.config.worker.js │ └── webpack.gni ├── zip.py └── zip_libcxx.py ├── buildflags ├── BUILD.gn └── buildflags.gni ├── chromium_src ├── BUILD.gn └── LICENSE.chromium ├── default_app ├── .eslintrc.json ├── default_app.ts ├── icon.png ├── index.html ├── main.ts ├── package.json ├── preload.ts └── styles.css ├── docs ├── README.md ├── api │ ├── accelerator.md │ ├── app.md │ ├── auto-updater.md │ ├── browser-view.md │ ├── browser-window.md │ ├── client-request.md │ ├── clipboard.md │ ├── command-line-switches.md │ ├── command-line.md │ ├── content-tracing.md │ ├── context-bridge.md │ ├── cookies.md │ ├── crash-reporter.md │ ├── debugger.md │ ├── desktop-capturer.md │ ├── dialog.md │ ├── dock.md │ ├── download-item.md │ ├── environment-variables.md │ ├── extensions.md │ ├── file-object.md │ ├── global-shortcut.md │ ├── in-app-purchase.md │ ├── incoming-message.md │ ├── ipc-main.md │ ├── ipc-renderer.md │ ├── menu-item.md │ ├── menu.md │ ├── message-channel-main.md │ ├── message-port-main.md │ ├── native-image.md │ ├── native-theme.md │ ├── net-log.md │ ├── net.md │ ├── notification.md │ ├── parent-port.md │ ├── power-monitor.md │ ├── power-save-blocker.md │ ├── process.md │ ├── protocol.md │ ├── push-notifications.md │ ├── safe-storage.md │ ├── screen.md │ ├── service-workers.md │ ├── session.md │ ├── share-menu.md │ ├── shell.md │ ├── structures │ │ ├── bluetooth-device.md │ │ ├── browser-window-options.md │ │ ├── certificate-principal.md │ │ ├── certificate.md │ │ ├── cookie.md │ │ ├── cpu-usage.md │ │ ├── crash-report.md │ │ ├── custom-scheme.md │ │ ├── desktop-capturer-source.md │ │ ├── display.md │ │ ├── extension-info.md │ │ ├── extension.md │ │ ├── file-filter.md │ │ ├── file-path-with-headers.md │ │ ├── gpu-feature-status.md │ │ ├── hid-device.md │ │ ├── input-event.md │ │ ├── io-counters.md │ │ ├── ipc-main-event.md │ │ ├── ipc-main-invoke-event.md │ │ ├── ipc-renderer-event.md │ │ ├── jump-list-category.md │ │ ├── jump-list-item.md │ │ ├── keyboard-event.md │ │ ├── keyboard-input-event.md │ │ ├── memory-info.md │ │ ├── memory-usage-details.md │ │ ├── mime-typed-buffer.md │ │ ├── mouse-input-event.md │ │ ├── mouse-wheel-input-event.md │ │ ├── notification-action.md │ │ ├── notification-response.md │ │ ├── payment-discount.md │ │ ├── point.md │ │ ├── post-body.md │ │ ├── printer-info.md │ │ ├── process-memory-info.md │ │ ├── process-metric.md │ │ ├── product-discount.md │ │ ├── product-subscription-period.md │ │ ├── product.md │ │ ├── protocol-request.md │ │ ├── protocol-response-upload-data.md │ │ ├── protocol-response.md │ │ ├── rectangle.md │ │ ├── referrer.md │ │ ├── render-process-gone-details.md │ │ ├── resolved-endpoint.md │ │ ├── resolved-host.md │ │ ├── scrubber-item.md │ │ ├── segmented-control-segment.md │ │ ├── serial-port.md │ │ ├── service-worker-info.md │ │ ├── shared-worker-info.md │ │ ├── sharing-item.md │ │ ├── shortcut-details.md │ │ ├── size.md │ │ ├── task.md │ │ ├── thumbar-button.md │ │ ├── trace-categories-and-options.md │ │ ├── trace-config.md │ │ ├── transaction.md │ │ ├── upload-data.md │ │ ├── upload-file.md │ │ ├── upload-raw-data.md │ │ ├── usb-device.md │ │ ├── user-default-types.md │ │ ├── web-preferences.md │ │ ├── web-request-filter.md │ │ └── web-source.md │ ├── system-preferences.md │ ├── touch-bar-button.md │ ├── touch-bar-color-picker.md │ ├── touch-bar-group.md │ ├── touch-bar-label.md │ ├── touch-bar-other-items-proxy.md │ ├── touch-bar-popover.md │ ├── touch-bar-scrubber.md │ ├── touch-bar-segmented-control.md │ ├── touch-bar-slider.md │ ├── touch-bar-spacer.md │ ├── touch-bar.md │ ├── tray.md │ ├── utility-process.md │ ├── web-contents.md │ ├── web-frame-main.md │ ├── web-frame.md │ ├── web-request.md │ ├── webview-tag.md │ └── window-open.md ├── breaking-changes.md ├── development │ ├── README.md │ ├── build-instructions-gn.md │ ├── build-instructions-linux.md │ ├── build-instructions-macos.md │ ├── build-instructions-windows.md │ ├── chromium-development.md │ ├── clang-tidy.md │ ├── coding-style.md │ ├── creating-api.md │ ├── debugging-on-macos.md │ ├── debugging-on-windows.md │ ├── debugging-with-symbol-server.md │ ├── debugging-with-xcode.md │ ├── debugging.md │ ├── goma.md │ ├── issues.md │ ├── patches.md │ ├── pull-requests.md │ ├── source-code-directory-structure.md │ ├── testing.md │ └── v8-development.md ├── experimental.md ├── faq.md ├── fiddles │ ├── features │ │ ├── dark-mode │ │ │ ├── index.html │ │ │ ├── main.js │ │ │ ├── preload.js │ │ │ ├── renderer.js │ │ │ └── styles.css │ │ ├── drag-and-drop │ │ │ ├── index.html │ │ │ ├── main.js │ │ │ ├── preload.js │ │ │ └── renderer.js │ │ ├── keyboard-shortcuts │ │ │ ├── global │ │ │ │ ├── index.html │ │ │ │ └── main.js │ │ │ ├── interception-from-main │ │ │ │ ├── index.html │ │ │ │ └── main.js │ │ │ ├── local │ │ │ │ ├── index.html │ │ │ │ └── main.js │ │ │ └── web-apis │ │ │ │ ├── index.html │ │ │ │ ├── main.js │ │ │ │ └── renderer.js │ │ ├── macos-dock-menu │ │ │ ├── index.html │ │ │ └── main.js │ │ ├── notifications │ │ │ ├── main │ │ │ │ ├── index.html │ │ │ │ └── main.js │ │ │ └── renderer │ │ │ │ ├── index.html │ │ │ │ ├── main.js │ │ │ │ └── renderer.js │ │ ├── offscreen-rendering │ │ │ └── main.js │ │ ├── online-detection │ │ │ ├── index.html │ │ │ ├── main.js │ │ │ └── renderer.js │ │ ├── progress-bar │ │ │ ├── index.html │ │ │ └── main.js │ │ ├── recent-documents │ │ │ ├── index.html │ │ │ └── main.js │ │ ├── represented-file │ │ │ ├── index.html │ │ │ └── main.js │ │ ├── web-bluetooth │ │ │ ├── index.html │ │ │ ├── main.js │ │ │ ├── preload.js │ │ │ └── renderer.js │ │ ├── web-hid │ │ │ ├── index.html │ │ │ ├── main.js │ │ │ └── renderer.js │ │ ├── web-serial │ │ │ ├── index.html │ │ │ ├── main.js │ │ │ └── renderer.js │ │ └── web-usb │ │ │ ├── index.html │ │ │ ├── main.js │ │ │ └── renderer.js │ ├── ipc │ │ ├── pattern-1 │ │ │ ├── index.html │ │ │ ├── main.js │ │ │ ├── preload.js │ │ │ └── renderer.js │ │ ├── pattern-2 │ │ │ ├── index.html │ │ │ ├── main.js │ │ │ ├── preload.js │ │ │ └── renderer.js │ │ ├── pattern-3 │ │ │ ├── index.html │ │ │ ├── main.js │ │ │ ├── preload.js │ │ │ └── renderer.js │ │ └── webview-new-window │ │ │ ├── child.html │ │ │ ├── index.html │ │ │ ├── main.js │ │ │ ├── preload.js │ │ │ └── renderer.js │ ├── media │ │ └── screenshot │ │ │ └── take-screenshot │ │ │ ├── index.html │ │ │ ├── main.js │ │ │ └── renderer.js │ ├── menus │ │ ├── customize-menus │ │ │ ├── index.html │ │ │ ├── main.js │ │ │ └── renderer.js │ │ └── shortcuts │ │ │ ├── index.html │ │ │ └── main.js │ ├── native-ui │ │ ├── dialogs │ │ │ ├── error-dialog │ │ │ │ ├── index.html │ │ │ │ ├── main.js │ │ │ │ └── renderer.js │ │ │ ├── information-dialog │ │ │ │ ├── index.html │ │ │ │ ├── main.js │ │ │ │ └── renderer.js │ │ │ ├── open-file-or-directory │ │ │ │ ├── index.html │ │ │ │ ├── main.js │ │ │ │ └── renderer.js │ │ │ └── save-dialog │ │ │ │ ├── index.html │ │ │ │ ├── main.js │ │ │ │ └── renderer.js │ │ ├── drag-and-drop │ │ │ ├── index.html │ │ │ ├── main.js │ │ │ └── renderer.js │ │ ├── external-links-file-manager │ │ │ ├── index.html │ │ │ ├── main.js │ │ │ └── renderer.js │ │ ├── notifications │ │ │ ├── index.html │ │ │ ├── main.js │ │ │ └── renderer.js │ │ └── tray │ │ │ ├── index.html │ │ │ └── main.js │ ├── quick-start │ │ ├── index.html │ │ ├── main.js │ │ └── preload.js │ ├── screen │ │ └── fit-screen │ │ │ └── main.js │ ├── system │ │ ├── clipboard │ │ │ ├── copy │ │ │ │ ├── index.html │ │ │ │ ├── main.js │ │ │ │ ├── preload.js │ │ │ │ └── renderer.js │ │ │ └── paste │ │ │ │ ├── index.html │ │ │ │ ├── main.js │ │ │ │ ├── preload.js │ │ │ │ └── renderer.js │ │ ├── protocol-handler │ │ │ └── launch-app-from-URL-in-another-app │ │ │ │ ├── index.html │ │ │ │ ├── main.js │ │ │ │ ├── preload.js │ │ │ │ └── renderer.js │ │ ├── system-app-user-information │ │ │ └── app-information │ │ │ │ ├── index.html │ │ │ │ ├── main.js │ │ │ │ └── renderer.js │ │ └── system-information │ │ │ └── get-version-information │ │ │ ├── index.html │ │ │ ├── main.js │ │ │ └── renderer.js │ ├── tutorial-first-app │ │ ├── index.html │ │ └── main.js │ ├── tutorial-preload │ │ ├── index.html │ │ ├── main.js │ │ ├── preload.js │ │ └── renderer.js │ └── windows │ │ ├── crashes-and-hangs │ │ └── .keep │ │ └── manage-windows │ │ ├── frameless-window │ │ ├── index.html │ │ ├── main.js │ │ └── renderer.js │ │ ├── manage-window-state │ │ ├── index.html │ │ ├── main.js │ │ └── renderer.js │ │ ├── new-window │ │ ├── index.html │ │ ├── main.js │ │ └── renderer.js │ │ └── window-events │ │ ├── index.html │ │ ├── main.js │ │ └── renderer.js ├── glossary.md ├── images │ ├── chrome-processes.png │ ├── connection-status.png │ ├── dark_mode.gif │ ├── dock-progress-bar.png │ ├── drag-and-drop.gif │ ├── gatekeeper.png │ ├── linux-progress-bar.png │ ├── local-shortcut.png │ ├── macos-dock-menu.png │ ├── macos-progress-bar.png │ ├── mission-control-progress-bar.png │ ├── performance-cpu-prof.png │ ├── performance-heap-prof.png │ ├── preload-example.png │ ├── recent-documents.png │ ├── represented-file.png │ ├── simplest-electron-app.png │ ├── subpixel-rendering-screenshot.gif │ ├── versioning-sketch-0.png │ ├── versioning-sketch-1.png │ ├── versioning-sketch-2.png │ ├── versioning-sketch-3.png │ ├── versioning-sketch-4.png │ ├── versioning-sketch-5.png │ ├── versioning-sketch-6.png │ ├── versioning-sketch-7.png │ ├── vs-options-debugging-symbols.png │ ├── vs-tools-options.png │ ├── web-contents-text-selection-after.png │ ├── web-contents-text-selection-before.png │ ├── windows-progress-bar.png │ ├── windows-taskbar-icon-overlay.png │ ├── windows-taskbar-jumplist.png │ └── windows-taskbar-thumbnail-toolbar.png ├── styleguide.md └── tutorial │ ├── accessibility.md │ ├── application-debugging.md │ ├── application-distribution.md │ ├── asar-archives.md │ ├── asar-integrity.md │ ├── automated-testing.md │ ├── boilerplates-and-clis.md │ ├── code-signing.md │ ├── context-isolation.md │ ├── dark-mode.md │ ├── debugging-main-process.md │ ├── debugging-vscode.md │ ├── devices.md │ ├── devtools-extension.md │ ├── distribution-overview.md │ ├── electron-timelines.md │ ├── electron-versioning.md │ ├── examples.md │ ├── forge-overview.md │ ├── fuses.md │ ├── in-app-purchases.md │ ├── installation.md │ ├── introduction.md │ ├── ipc.md │ ├── keyboard-shortcuts.md │ ├── launch-app-from-url-in-another-app.md │ ├── linux-desktop-actions.md │ ├── mac-app-store-submission-guide.md │ ├── macos-dock.md │ ├── message-ports.md │ ├── multithreading.md │ ├── native-file-drag-drop.md │ ├── notifications.md │ ├── offscreen-rendering.md │ ├── online-offline-events.md │ ├── performance.md │ ├── process-model.md │ ├── progress-bar.md │ ├── quick-start.md │ ├── recent-documents.md │ ├── repl.md │ ├── represented-file.md │ ├── sandbox.md │ ├── security.md │ ├── snapcraft.md │ ├── spellchecker.md │ ├── support.md │ ├── testing-on-headless-ci.md │ ├── tray.md │ ├── tutorial-1-prerequisites.md │ ├── tutorial-2-first-app.md │ ├── tutorial-3-preload.md │ ├── tutorial-4-adding-features.md │ ├── tutorial-5-packaging.md │ ├── tutorial-6-publishing-updating.md │ ├── updates.md │ ├── using-native-node-modules.md │ ├── using-pepper-flash-plugin.md │ ├── web-embeds.md │ ├── window-customization.md │ ├── windows-arm.md │ ├── windows-store-guide.md │ └── windows-taskbar.md ├── electron_paks.gni ├── electron_resources.grd ├── filenames.auto.gni ├── filenames.gni ├── filenames.hunspell.gni ├── filenames.libcxx.gni ├── filenames.libcxxabi.gni ├── lib ├── asar │ ├── fs-wrapper.ts │ └── init.ts ├── browser │ ├── .eslintrc.json │ ├── api │ │ ├── app.ts │ │ ├── auto-updater.ts │ │ ├── auto-updater │ │ │ ├── auto-updater-native.ts │ │ │ ├── auto-updater-win.ts │ │ │ └── squirrel-update-win.ts │ │ ├── base-window.ts │ │ ├── browser-view.ts │ │ ├── browser-window.ts │ │ ├── clipboard.ts │ │ ├── content-tracing.ts │ │ ├── crash-reporter.ts │ │ ├── desktop-capturer.ts │ │ ├── dialog.ts │ │ ├── exports │ │ │ └── electron.ts │ │ ├── global-shortcut.ts │ │ ├── in-app-purchase.ts │ │ ├── ipc-main.ts │ │ ├── menu-item-roles.ts │ │ ├── menu-item.ts │ │ ├── menu-utils.ts │ │ ├── menu.ts │ │ ├── message-channel.ts │ │ ├── module-list.ts │ │ ├── native-theme.ts │ │ ├── net-client-request.ts │ │ ├── net-fetch.ts │ │ ├── net-log.ts │ │ ├── net.ts │ │ ├── notification.ts │ │ ├── power-monitor.ts │ │ ├── power-save-blocker.ts │ │ ├── protocol.ts │ │ ├── push-notifications.ts │ │ ├── safe-storage.ts │ │ ├── screen.ts │ │ ├── session.ts │ │ ├── share-menu.ts │ │ ├── system-preferences.ts │ │ ├── touch-bar.ts │ │ ├── tray.ts │ │ ├── utility-process.ts │ │ ├── view.ts │ │ ├── views │ │ │ └── image-view.ts │ │ ├── web-contents-view.ts │ │ ├── web-contents.ts │ │ └── web-frame-main.ts │ ├── default-menu.ts │ ├── devtools.ts │ ├── guest-view-manager.ts │ ├── guest-window-manager.ts │ ├── init.ts │ ├── ipc-main-impl.ts │ ├── ipc-main-internal-utils.ts │ ├── ipc-main-internal.ts │ ├── message-port-main.ts │ ├── parse-features-string.ts │ ├── rpc-server.ts │ └── web-view-events.ts ├── common │ ├── .eslintrc.json │ ├── api │ │ ├── module-list.ts │ │ ├── native-image.ts │ │ └── shell.ts │ ├── define-properties.ts │ ├── deprecate.ts │ ├── init.ts │ ├── ipc-messages.ts │ ├── reset-search-paths.ts │ ├── web-view-methods.ts │ ├── webpack-globals-provider.ts │ └── webpack-provider.ts ├── isolated_renderer │ ├── .eslintrc.json │ └── init.ts ├── renderer │ ├── .eslintrc.json │ ├── api │ │ ├── clipboard.ts │ │ ├── context-bridge.ts │ │ ├── crash-reporter.ts │ │ ├── exports │ │ │ └── electron.ts │ │ ├── ipc-renderer.ts │ │ ├── module-list.ts │ │ └── web-frame.ts │ ├── common-init.ts │ ├── init.ts │ ├── inspector.ts │ ├── ipc-renderer-internal-utils.ts │ ├── ipc-renderer-internal.ts │ ├── security-warnings.ts │ ├── web-frame-init.ts │ ├── web-view │ │ ├── guest-view-internal.ts │ │ ├── web-view-attributes.ts │ │ ├── web-view-constants.ts │ │ ├── web-view-element.ts │ │ ├── web-view-impl.ts │ │ └── web-view-init.ts │ └── window-setup.ts ├── sandboxed_renderer │ ├── .eslintrc.json │ ├── api │ │ ├── exports │ │ │ └── electron.ts │ │ └── module-list.ts │ └── init.ts ├── utility │ ├── .eslintrc.json │ ├── api │ │ ├── exports │ │ │ └── electron.ts │ │ └── module-list.ts │ ├── init.ts │ └── parent-port.ts └── worker │ ├── .eslintrc.json │ └── init.ts ├── npm ├── cli.js ├── index.js ├── install.js └── package.json ├── package.json ├── patches ├── Mantle │ ├── .patches │ └── remove_mtlmanagedobjectadapter_h.patch ├── README.md ├── ReactiveObjC │ ├── .patches │ ├── build_conditionally_import_ext_headers_from_framework_or_from.patch │ └── chore_explicitly_cast_long_max_to_double.patch ├── boringssl │ ├── .patches │ ├── expose_ripemd160.patch │ ├── feat_expose_several_extra_cipher_functions.patch │ └── revert_track_ssl_error_zero_return_explicitly.patch ├── chromium │ ├── .patches │ ├── accelerator.patch │ ├── add_contentgpuclient_precreatemessageloop_callback.patch │ ├── add_didinstallconditionalfeatures.patch │ ├── add_electron_deps_to_license_credits_file.patch │ ├── add_gin_converter_support_for_arraybufferview.patch │ ├── add_maximized_parameter_to_linuxui_getwindowframeprovider.patch │ ├── add_ui_scopedcliboardwriter_writeunsaferawdata.patch │ ├── add_webmessageportconverter_entangleandinjectmessageportchannel.patch │ ├── allow_disabling_blink_scheduler_throttling_per_renderview.patch │ ├── allow_in-process_windows_to_have_different_web_prefs.patch │ ├── allow_new_privileges_in_unsandboxed_child_processes.patch │ ├── allow_setting_secondary_label_via_simplemenumodel.patch │ ├── blink_file_path.patch │ ├── blink_local_frame.patch │ ├── boringssl_build_gn.patch │ ├── build_add_electron_tracing_category.patch │ ├── build_allow_electron_to_use_exec_script.patch │ ├── build_disable_partition_alloc_on_mac.patch │ ├── build_disable_print_content_analysis.patch │ ├── build_do_not_depend_on_packed_resource_integrity.patch │ ├── build_gn.patch │ ├── build_libc_as_static_library.patch │ ├── build_make_libcxx_abi_unstable_false_for_electron.patch │ ├── build_only_use_the_mas_build_config_in_the_required_components.patch │ ├── build_remove_ent_content_analysis_assert.patch │ ├── can_create_window.patch │ ├── chore_add_buildflag_guard_around_new_include.patch │ ├── chore_add_electron_deps_to_gitignores.patch │ ├── chore_allow_chromium_to_handle_synthetic_mouse_events_for_touch.patch │ ├── chore_defer_usb_service_getdevices_request_until_usb_service_is.patch │ ├── chore_introduce_blocking_api_for_electron.patch │ ├── chore_patch_out_partition_attribute_dcheck_for_webviews.patch │ ├── chore_patch_out_profile_methods_in_chrome_browser_pdf.patch │ ├── chore_patch_out_profile_methods_in_profile_selections_cc.patch │ ├── chore_patch_out_profile_methods_in_titlebar_config.patch │ ├── chore_provide_iswebcontentscreationoverridden_with_full_params.patch │ ├── command-ismediakey.patch │ ├── crash_allow_setting_more_options.patch │ ├── crashpad_pid_check.patch │ ├── create_browser_v8_snapshot_file_name_fuse.patch │ ├── custom_protocols_plzserviceworker.patch │ ├── dcheck.patch │ ├── desktop_media_list.patch │ ├── disable-redraw-lock.patch │ ├── disable_color_correct_rendering.patch │ ├── disable_compositor_recycling.patch │ ├── disable_freezing_flags_after_init_in_node.patch │ ├── disable_hidden.patch │ ├── disable_unload_metrics.patch │ ├── dom_storage_limits.patch │ ├── dump_syms.patch │ ├── enable_reset_aspect_ratio.patch │ ├── export_gin_v8platform_pageallocator_for_usage_outside_of_the_gin.patch │ ├── expose_setuseragent_on_networkcontext.patch │ ├── expose_v8initializer_codegenerationcheckcallbackinmainthread.patch │ ├── extend_apply_webpreferences.patch │ ├── feat_add_data_parameter_to_processsingleton.patch │ ├── feat_add_onclose_to_messageport.patch │ ├── feat_add_set_theme_source_to_allow_apps_to.patch │ ├── feat_add_streaming-protocol_registry_to_multibuffer_data_source.patch │ ├── feat_add_support_for_overriding_the_base_spellchecker_download_url.patch │ ├── feat_allow_embedders_to_add_observers_on_created_hunspell.patch │ ├── feat_configure_launch_options_for_service_process.patch │ ├── feat_enable_offscreen_rendering_with_viz_compositor.patch │ ├── feat_ensure_mas_builds_of_the_same_application_can_use_safestorage.patch │ ├── feat_expose_raw_response_headers_from_urlloader.patch │ ├── feat_filter_out_non-shareable_windows_in_the_current_application_in.patch │ ├── fix_adapt_exclusive_access_for_electron_needs.patch │ ├── fix_add_check_for_sandbox_then_result.patch │ ├── fix_allow_guest_webcontents_to_enter_fullscreen.patch │ ├── fix_aspect_ratio_with_max_size.patch │ ├── fix_crash_loading_non-standard_schemes_in_iframes.patch │ ├── fix_crash_when_saving_edited_pdf_files.patch │ ├── fix_export_zlib_symbols.patch │ ├── fix_harden_blink_scriptstate_maybefrom.patch │ ├── fix_media_key_usage_with_globalshortcuts.patch │ ├── fix_non-client_mouse_tracking_and_message_bubbling_on_windows.patch │ ├── fix_on-screen-keyboard_hides_on_input_blur_in_webview.patch │ ├── fix_patch_out_profile_refs_in_accessibility_ui.patch │ ├── fix_properly_honor_printing_page_ranges.patch │ ├── fix_remove_caption-removing_style_call.patch │ ├── fix_remove_profiles_from_spellcheck_service.patch │ ├── fix_return_v8_value_from_localframe_requestexecutescript.patch │ ├── fix_select_the_first_menu_item_when_opened_via_keyboard.patch │ ├── fix_use_delegated_generic_capturer_when_available.patch │ ├── frame_host_manager.patch │ ├── gin_enable_disable_v8_platform.patch │ ├── gpu_notify_when_dxdiag_request_fails.patch │ ├── gritsettings_resource_ids.patch │ ├── gtk_visibility.patch │ ├── hack_plugin_response_interceptor_to_point_to_electron.patch │ ├── hack_to_allow_gclient_sync_with_host_os_mac_on_linux_in_ci.patch │ ├── ignore_rc_check.patch │ ├── introduce_ozoneplatform_electron_can_call_x11_property.patch │ ├── isolate_holder.patch │ ├── load_v8_snapshot_in_browser_process.patch │ ├── logging_win32_only_create_a_console_if_logging_to_stderr.patch │ ├── make_gtk_getlibgtk_public.patch │ ├── mas-cgdisplayusesforcetogray.patch │ ├── mas_avoid_usage_of_private_macos_apis.patch │ ├── mas_blink_no_private_api.patch │ ├── mas_disable_custom_window_frame.patch │ ├── mas_disable_remote_accessibility.patch │ ├── mas_disable_remote_layer.patch │ ├── mas_no_private_api.patch │ ├── mas_use_public_apis_to_determine_if_a_font_is_a_system_font.patch │ ├── network_service_allow_remote_certificate_verification_logic.patch │ ├── notification_provenance.patch │ ├── pepper_plugin_support.patch │ ├── picture-in-picture.patch │ ├── port_autofill_colors_to_the_color_pipeline.patch │ ├── preconnect_manager.patch │ ├── printing.patch │ ├── process_singleton.patch │ ├── proxy_config_monitor.patch │ ├── refactor_expose_cursor_changes_to_the_webcontentsobserver.patch │ ├── refactor_restore_base_adaptcallbackforrepeating.patch │ ├── remove_usage_of_incognito_apis_in_the_spellchecker.patch │ ├── render_widget_host_view_base.patch │ ├── render_widget_host_view_mac.patch │ ├── resource_file_conflict.patch │ ├── scroll_bounce_flag.patch │ ├── short-circuit_permissions_checks_in_mediastreamdevicescontroller.patch │ ├── skip_atk_toolchain_check.patch │ ├── support_mixed_sandbox_with_zygote.patch │ ├── unsandboxed_ppapi_processes_skip_zygote.patch │ ├── upload_list_add_loadsync_method.patch │ ├── web_contents.patch │ ├── webview_cross_drag.patch │ ├── webview_fullscreen.patch │ ├── worker_context_will_destroy.patch │ └── worker_feat_add_hook_to_notify_script_ready.patch ├── config.json ├── devtools_frontend │ ├── .patches │ └── fix_expose_globals_to_allow_patching_devtools_dock.patch ├── ffmpeg │ ├── .patches │ └── link_with_loader_path.patch ├── nan │ ├── .patches │ ├── chore_remove_deprecated_accessorsignatures.patch │ └── use_new_constructor_for_scriptorigin_when_17_x.patch ├── node │ ├── .patches │ ├── api_pass_oomdetails_to_oomerrorcallback.patch │ ├── build_add_gn_build_files.patch │ ├── build_ensure_native_module_compilation_fails_if_not_using_a_new.patch │ ├── build_ensure_v8_pointer_compression_sandbox_is_enabled_on_64bit.patch │ ├── build_modify_js2c_py_to_allow_injection_of_original-fs_and_custom_embedder_js.patch │ ├── chore_add_context_to_context_aware_module_prevention.patch │ ├── chore_allow_the_node_entrypoint_to_be_a_builtin_module.patch │ ├── chore_remove_--no-harmony-atomics_related_code.patch │ ├── chore_update_fixtures_errors_force_colors_snapshot.patch │ ├── ci_ensure_node_tests_set_electron_run_as_node.patch │ ├── enable_crashpad_linux_node_processes.patch │ ├── expose_get_builtin_module_function.patch │ ├── feat_add_knostartdebugsignalhandler_to_environment_to_prevent.patch │ ├── feat_add_uv_loop_interrupt_on_io_change_option_to_uv_loop_configure.patch │ ├── feat_initialize_asar_support.patch │ ├── fix_-wshadow_warning.patch │ ├── fix_account_for_createexternalizablestring_v8_global.patch │ ├── fix_account_for_debugger_agent_race_condition.patch │ ├── fix_adapt_debugger_tests_for_upstream_v8_changes.patch │ ├── fix_adapt_generator_tostringtag_prototype_to_v8.patch │ ├── fix_add_default_values_for_variables_in_common_gypi.patch │ ├── fix_crash_caused_by_gethostnamew_on_windows_7.patch │ ├── fix_crypto_tests_to_run_with_bssl.patch │ ├── fix_do_not_resolve_electron_entrypoints.patch │ ├── fix_expose_lookupandcompile_with_parameters.patch │ ├── fix_expose_the_built-in_electron_module_via_the_esm_loader.patch │ ├── fix_expose_tracing_agent_and_use_tracing_tracingcontroller_instead.patch │ ├── fix_ftbfs_werror_wextra-semi.patch │ ├── fix_ftbfs_werror_wunreachable-code-break.patch │ ├── fix_handle_boringssl_and_openssl_incompatibilities.patch │ ├── fix_isurl_implementation.patch │ ├── fix_override_createjob_in_node_platform.patch │ ├── fix_parallel_test-v8-stats.patch │ ├── fix_readbarrier_undefined_symbol_error_on_woa_arm64.patch │ ├── fix_serdes_test.patch │ ├── fix_suppress_clang_-wdeprecated-declarations_in_libuv.patch │ ├── fix_wunreachable-code_warning_in_ares_init_rand_engine.patch │ ├── json_parse_errors_made_user-friendly.patch │ ├── pass_all_globals_through_require.patch │ ├── refactor_allow_embedder_overriding_of_internal_fs_calls.patch │ ├── refactor_alter_child_process_fork_to_use_execute_script_with.patch │ ├── support_v8_sandboxed_pointers.patch │ ├── test_formally_mark_some_tests_as_flaky.patch │ └── v8_api_advance_api_deprecation.patch ├── perfetto │ ├── .patches │ └── define_ssize_t_to_be_intptr_t_to_match_libuv.patch ├── squirrel.mac │ ├── .patches │ ├── build_add_gn_config.patch │ ├── chore_disable_api_deprecation_warnings_in_nskeyedarchiver.patch │ ├── feat_add_new_squirrel_mac_bundle_installation_method_behind_flag.patch │ ├── fix_abort_installation_attempt_at_the_final_mile_if_the_app_is.patch │ ├── fix_ensure_that_self_is_retained_until_the_racsignal_is_complete.patch │ ├── fix_use_kseccschecknestedcode_kseccsstrictvalidate_in_the_sec.patch │ └── refactor_use_posix_spawn_instead_of_nstask_so_we_can_disclaim_the.patch ├── v8 │ ├── .patches │ ├── README.md │ ├── build_gn.patch │ ├── chore_allow_customizing_microtask_policy_per_context.patch │ ├── do_not_export_private_v8_symbols_on_windows.patch │ └── fix_build_deprecated_attribute_for_older_msvc_versions.patch └── webrtc │ ├── .patches │ ├── fix_fallback_to_x11_capturer_on_wayland.patch │ └── fix_mark_pipewire_capturer_as_failed_after_session_is_closed.patch ├── script ├── .eslintrc.json ├── add-debug-link.py ├── apply_all_patches.py ├── check-patch-diff.ts ├── check-symlinks.js ├── codesign │ ├── .gitignore │ ├── codesign.cnf │ ├── gen-trust.ts │ ├── generate-identity.sh │ ├── get-trusted-identity.sh │ └── trust.xml ├── copy-debug-symbols.py ├── create-api-json.js ├── dbus_mock.py ├── doc-only-change.js ├── download-circleci-artifacts.js ├── export_all_patches.py ├── gen-filenames.ts ├── gen-hunspell-filenames.js ├── gen-libc++-filenames.js ├── generate-config-gypi.py ├── generate-deps-hash.js ├── generate-version-json.js ├── generate-zip-manifest.py ├── generate_node_version_header.py ├── git-export-patches ├── git-import-patches ├── gn-asar-hash.js ├── gn-asar.js ├── gn-check.js ├── gn-plist-but-with-hashes.js ├── lib │ ├── __init__.py │ ├── azput.js │ ├── config.py │ ├── electron.gitattributes │ ├── get-version.js │ ├── git.py │ ├── native_tests.py │ ├── npm.py │ ├── npx.py │ ├── patches.py │ ├── util.py │ └── utils.js ├── lint.js ├── nan-spec-runner.js ├── native-test-targets.json ├── native-tests.py ├── node-disabled-tests.json ├── node-spec-runner.js ├── patches-mtime-cache.py ├── prepare-appveyor.js ├── print-version.py ├── push-patch.js ├── release │ ├── ci-release-build.js │ ├── find-github-release.js │ ├── get-asset.js │ ├── get-url-hash.js │ ├── notes │ │ ├── .gitignore │ │ ├── index.js │ │ └── notes.js │ ├── prepare-release.js │ ├── publish-to-npm.js │ ├── release-artifact-cleanup.js │ ├── release.js │ ├── uploaders │ │ ├── upload-index-json.py │ │ ├── upload-node-checksums.py │ │ ├── upload-node-headers.py │ │ ├── upload-symbols.py │ │ ├── upload-to-github.ts │ │ └── upload.py │ ├── version-bumper.js │ └── version-utils.js ├── run-clang-format.py ├── run-clang-tidy.ts ├── run-gn-format.py ├── run-if-exists.js ├── setup-win-for-dev.bat ├── spec-runner.js ├── start-goma.ps1 ├── start.js ├── strip-binaries.py ├── sysroots.json ├── tar.py ├── verify-chromedriver.py ├── verify-ffmpeg.py ├── verify-mksnapshot.py ├── yarn.js ├── zip-symbols.py └── zip_manifests │ ├── check-zip-manifest.py │ ├── dist_zip.linux.arm.manifest │ ├── dist_zip.linux.arm64.manifest │ ├── dist_zip.linux.x64.manifest │ ├── dist_zip.linux.x86.manifest │ ├── dist_zip.mac.arm64.manifest │ ├── dist_zip.mac.x64.manifest │ ├── dist_zip.mac_mas.arm64.manifest │ ├── dist_zip.mac_mas.x64.manifest │ ├── dist_zip.win.arm64.manifest │ ├── dist_zip.win.ia32.manifest │ └── dist_zip.win.x64.manifest ├── shell ├── app │ ├── BRANDING.json │ ├── command_line_args.cc │ ├── command_line_args.h │ ├── electron_content_client.cc │ ├── electron_content_client.h │ ├── electron_crash_reporter_client.cc │ ├── electron_crash_reporter_client.h │ ├── electron_library_main.h │ ├── electron_library_main.mm │ ├── electron_login_helper.mm │ ├── electron_main_delegate.cc │ ├── electron_main_delegate.h │ ├── electron_main_delegate_mac.h │ ├── electron_main_delegate_mac.mm │ ├── electron_main_linux.cc │ ├── electron_main_mac.cc │ ├── electron_main_win.cc │ ├── node_main.cc │ ├── node_main.h │ ├── resources │ │ └── mac │ │ │ └── loginhelper-Info.plist │ ├── uv_stdio_fix.cc │ ├── uv_stdio_fix.h │ ├── uv_task_runner.cc │ └── uv_task_runner.h ├── browser │ ├── api │ │ ├── electron_api_app.cc │ │ ├── electron_api_app.h │ │ ├── electron_api_app_mac.mm │ │ ├── electron_api_app_mas.mm │ │ ├── electron_api_auto_updater.cc │ │ ├── electron_api_auto_updater.h │ │ ├── electron_api_base_window.cc │ │ ├── electron_api_base_window.h │ │ ├── electron_api_browser_view.cc │ │ ├── electron_api_browser_view.h │ │ ├── electron_api_browser_window.cc │ │ ├── electron_api_browser_window.h │ │ ├── electron_api_content_tracing.cc │ │ ├── electron_api_cookies.cc │ │ ├── electron_api_cookies.h │ │ ├── electron_api_crash_reporter.cc │ │ ├── electron_api_crash_reporter.h │ │ ├── electron_api_data_pipe_holder.cc │ │ ├── electron_api_data_pipe_holder.h │ │ ├── electron_api_debugger.cc │ │ ├── electron_api_debugger.h │ │ ├── electron_api_desktop_capturer.cc │ │ ├── electron_api_desktop_capturer.h │ │ ├── electron_api_dialog.cc │ │ ├── electron_api_download_item.cc │ │ ├── electron_api_download_item.h │ │ ├── electron_api_event_emitter.cc │ │ ├── electron_api_event_emitter.h │ │ ├── electron_api_global_shortcut.cc │ │ ├── electron_api_global_shortcut.h │ │ ├── electron_api_in_app_purchase.cc │ │ ├── electron_api_in_app_purchase.h │ │ ├── electron_api_menu.cc │ │ ├── electron_api_menu.h │ │ ├── electron_api_menu_mac.h │ │ ├── electron_api_menu_mac.mm │ │ ├── electron_api_menu_views.cc │ │ ├── electron_api_menu_views.h │ │ ├── electron_api_native_theme.cc │ │ ├── electron_api_native_theme.h │ │ ├── electron_api_native_theme_mac.mm │ │ ├── electron_api_net.cc │ │ ├── electron_api_net_log.cc │ │ ├── electron_api_net_log.h │ │ ├── electron_api_notification.cc │ │ ├── electron_api_notification.h │ │ ├── electron_api_power_monitor.cc │ │ ├── electron_api_power_monitor.h │ │ ├── electron_api_power_monitor_mac.mm │ │ ├── electron_api_power_monitor_win.cc │ │ ├── electron_api_power_save_blocker.cc │ │ ├── electron_api_power_save_blocker.h │ │ ├── electron_api_printing.cc │ │ ├── electron_api_protocol.cc │ │ ├── electron_api_protocol.h │ │ ├── electron_api_push_notifications.cc │ │ ├── electron_api_push_notifications.h │ │ ├── electron_api_push_notifications_mac.mm │ │ ├── electron_api_safe_storage.cc │ │ ├── electron_api_safe_storage.h │ │ ├── electron_api_screen.cc │ │ ├── electron_api_screen.h │ │ ├── electron_api_service_worker_context.cc │ │ ├── electron_api_service_worker_context.h │ │ ├── electron_api_session.cc │ │ ├── electron_api_session.h │ │ ├── electron_api_system_preferences.cc │ │ ├── electron_api_system_preferences.h │ │ ├── electron_api_system_preferences_mac.mm │ │ ├── electron_api_system_preferences_win.cc │ │ ├── electron_api_tray.cc │ │ ├── electron_api_tray.h │ │ ├── electron_api_url_loader.cc │ │ ├── electron_api_url_loader.h │ │ ├── electron_api_utility_process.cc │ │ ├── electron_api_utility_process.h │ │ ├── electron_api_view.cc │ │ ├── electron_api_view.h │ │ ├── electron_api_web_contents.cc │ │ ├── electron_api_web_contents.h │ │ ├── electron_api_web_contents_impl.cc │ │ ├── electron_api_web_contents_mac.mm │ │ ├── electron_api_web_contents_view.cc │ │ ├── electron_api_web_contents_view.h │ │ ├── electron_api_web_frame_main.cc │ │ ├── electron_api_web_frame_main.h │ │ ├── electron_api_web_request.cc │ │ ├── electron_api_web_request.h │ │ ├── electron_api_web_view_manager.cc │ │ ├── frame_subscriber.cc │ │ ├── frame_subscriber.h │ │ ├── gpu_info_enumerator.cc │ │ ├── gpu_info_enumerator.h │ │ ├── gpuinfo_manager.cc │ │ ├── gpuinfo_manager.h │ │ ├── message_port.cc │ │ ├── message_port.h │ │ ├── process_metric.cc │ │ ├── process_metric.h │ │ ├── save_page_handler.cc │ │ ├── save_page_handler.h │ │ ├── ui_event.cc │ │ ├── ui_event.h │ │ └── views │ │ │ ├── electron_api_image_view.cc │ │ │ └── electron_api_image_view.h │ ├── auto_updater.cc │ ├── auto_updater.h │ ├── auto_updater_mac.mm │ ├── badging │ │ ├── badge_manager.cc │ │ ├── badge_manager.h │ │ ├── badge_manager_factory.cc │ │ └── badge_manager_factory.h │ ├── bluetooth │ │ ├── electron_bluetooth_delegate.cc │ │ └── electron_bluetooth_delegate.h │ ├── browser.cc │ ├── browser.h │ ├── browser_linux.cc │ ├── browser_mac.mm │ ├── browser_observer.h │ ├── browser_process_impl.cc │ ├── browser_process_impl.h │ ├── browser_win.cc │ ├── certificate_manager_model.cc │ ├── certificate_manager_model.h │ ├── child_web_contents_tracker.cc │ ├── child_web_contents_tracker.h │ ├── cookie_change_notifier.cc │ ├── cookie_change_notifier.h │ ├── draggable_region_provider.h │ ├── electron_api_ipc_handler_impl.cc │ ├── electron_api_ipc_handler_impl.h │ ├── electron_autofill_driver.cc │ ├── electron_autofill_driver.h │ ├── electron_autofill_driver_factory.cc │ ├── electron_autofill_driver_factory.h │ ├── electron_browser_client.cc │ ├── electron_browser_client.h │ ├── electron_browser_context.cc │ ├── electron_browser_context.h │ ├── electron_browser_main_parts.cc │ ├── electron_browser_main_parts.h │ ├── electron_browser_main_parts_linux.cc │ ├── electron_browser_main_parts_mac.mm │ ├── electron_browser_main_parts_posix.cc │ ├── electron_download_manager_delegate.cc │ ├── electron_download_manager_delegate.h │ ├── electron_gpu_client.cc │ ├── electron_gpu_client.h │ ├── electron_javascript_dialog_manager.cc │ ├── electron_javascript_dialog_manager.h │ ├── electron_navigation_throttle.cc │ ├── electron_navigation_throttle.h │ ├── electron_pdf_web_contents_helper_client.cc │ ├── electron_pdf_web_contents_helper_client.h │ ├── electron_permission_manager.cc │ ├── electron_permission_manager.h │ ├── electron_speech_recognition_manager_delegate.cc │ ├── electron_speech_recognition_manager_delegate.h │ ├── electron_web_contents_utility_handler_impl.cc │ ├── electron_web_contents_utility_handler_impl.h │ ├── electron_web_ui_controller_factory.cc │ ├── electron_web_ui_controller_factory.h │ ├── event_emitter_mixin.h │ ├── extended_web_contents_observer.h │ ├── extensions │ │ ├── api │ │ │ ├── BUILD.gn │ │ │ ├── management │ │ │ │ ├── electron_management_api_delegate.cc │ │ │ │ └── electron_management_api_delegate.h │ │ │ ├── pdf_viewer_private │ │ │ │ ├── pdf_viewer_private_api.cc │ │ │ │ └── pdf_viewer_private_api.h │ │ │ ├── resources_private │ │ │ │ ├── resources_private_api.cc │ │ │ │ └── resources_private_api.h │ │ │ ├── runtime │ │ │ │ ├── electron_runtime_api_delegate.cc │ │ │ │ └── electron_runtime_api_delegate.h │ │ │ ├── streams_private │ │ │ │ ├── streams_private_api.cc │ │ │ │ └── streams_private_api.h │ │ │ └── tabs │ │ │ │ ├── tabs_api.cc │ │ │ │ └── tabs_api.h │ │ ├── electron_browser_context_keyed_service_factories.cc │ │ ├── electron_browser_context_keyed_service_factories.h │ │ ├── electron_component_extension_resource_manager.cc │ │ ├── electron_component_extension_resource_manager.h │ │ ├── electron_display_info_provider.cc │ │ ├── electron_display_info_provider.h │ │ ├── electron_extension_host_delegate.cc │ │ ├── electron_extension_host_delegate.h │ │ ├── electron_extension_loader.cc │ │ ├── electron_extension_loader.h │ │ ├── electron_extension_message_filter.cc │ │ ├── electron_extension_message_filter.h │ │ ├── electron_extension_system.cc │ │ ├── electron_extension_system.h │ │ ├── electron_extension_system_factory.cc │ │ ├── electron_extension_system_factory.h │ │ ├── electron_extension_web_contents_observer.cc │ │ ├── electron_extension_web_contents_observer.h │ │ ├── electron_extensions_api_client.cc │ │ ├── electron_extensions_api_client.h │ │ ├── electron_extensions_browser_api_provider.cc │ │ ├── electron_extensions_browser_api_provider.h │ │ ├── electron_extensions_browser_client.cc │ │ ├── electron_extensions_browser_client.h │ │ ├── electron_kiosk_delegate.cc │ │ ├── electron_kiosk_delegate.h │ │ ├── electron_messaging_delegate.cc │ │ ├── electron_messaging_delegate.h │ │ ├── electron_navigation_ui_data.cc │ │ ├── electron_navigation_ui_data.h │ │ ├── electron_process_manager_delegate.cc │ │ └── electron_process_manager_delegate.h │ ├── fake_location_provider.cc │ ├── fake_location_provider.h │ ├── feature_list.cc │ ├── feature_list.h │ ├── file_select_helper.cc │ ├── file_select_helper.h │ ├── file_select_helper_mac.mm │ ├── font_defaults.cc │ ├── font_defaults.h │ ├── hid │ │ ├── electron_hid_delegate.cc │ │ ├── electron_hid_delegate.h │ │ ├── hid_chooser_context.cc │ │ ├── hid_chooser_context.h │ │ ├── hid_chooser_context_factory.cc │ │ ├── hid_chooser_context_factory.h │ │ ├── hid_chooser_controller.cc │ │ └── hid_chooser_controller.h │ ├── javascript_environment.cc │ ├── javascript_environment.h │ ├── lib │ │ ├── bluetooth_chooser.cc │ │ ├── bluetooth_chooser.h │ │ ├── power_observer_linux.cc │ │ └── power_observer_linux.h │ ├── linux │ │ ├── unity_service.cc │ │ └── unity_service.h │ ├── login_handler.cc │ ├── login_handler.h │ ├── mac │ │ ├── dict_util.h │ │ ├── dict_util.mm │ │ ├── electron_application.h │ │ ├── electron_application.mm │ │ ├── electron_application_delegate.h │ │ ├── electron_application_delegate.mm │ │ ├── in_app_purchase.h │ │ ├── in_app_purchase.mm │ │ ├── in_app_purchase_observer.h │ │ ├── in_app_purchase_observer.mm │ │ ├── in_app_purchase_product.h │ │ └── in_app_purchase_product.mm │ ├── media │ │ ├── media_capture_devices_dispatcher.cc │ │ ├── media_capture_devices_dispatcher.h │ │ ├── media_device_id_salt.cc │ │ └── media_device_id_salt.h │ ├── microtasks_runner.cc │ ├── microtasks_runner.h │ ├── native_browser_view.cc │ ├── native_browser_view.h │ ├── native_browser_view_mac.h │ ├── native_browser_view_mac.mm │ ├── native_browser_view_views.cc │ ├── native_browser_view_views.h │ ├── native_window.cc │ ├── native_window.h │ ├── native_window_features.cc │ ├── native_window_features.h │ ├── native_window_mac.h │ ├── native_window_mac.mm │ ├── native_window_observer.h │ ├── native_window_views.cc │ ├── native_window_views.h │ ├── native_window_views_win.cc │ ├── net │ │ ├── asar │ │ │ ├── asar_file_validator.cc │ │ │ ├── asar_file_validator.h │ │ │ ├── asar_url_loader.cc │ │ │ ├── asar_url_loader.h │ │ │ ├── asar_url_loader_factory.cc │ │ │ └── asar_url_loader_factory.h │ │ ├── cert_verifier_client.cc │ │ ├── cert_verifier_client.h │ │ ├── electron_url_loader_factory.cc │ │ ├── electron_url_loader_factory.h │ │ ├── network_context_service.cc │ │ ├── network_context_service.h │ │ ├── network_context_service_factory.cc │ │ ├── network_context_service_factory.h │ │ ├── node_stream_loader.cc │ │ ├── node_stream_loader.h │ │ ├── proxying_url_loader_factory.cc │ │ ├── proxying_url_loader_factory.h │ │ ├── proxying_websocket.cc │ │ ├── proxying_websocket.h │ │ ├── resolve_host_function.cc │ │ ├── resolve_host_function.h │ │ ├── resolve_proxy_helper.cc │ │ ├── resolve_proxy_helper.h │ │ ├── system_network_context_manager.cc │ │ ├── system_network_context_manager.h │ │ ├── url_pipe_loader.cc │ │ ├── url_pipe_loader.h │ │ └── web_request_api_interface.h │ ├── network_hints_handler_impl.cc │ ├── network_hints_handler_impl.h │ ├── notifications │ │ ├── linux │ │ │ ├── libnotify_notification.cc │ │ │ ├── libnotify_notification.h │ │ │ ├── notification_presenter_linux.cc │ │ │ └── notification_presenter_linux.h │ │ ├── mac │ │ │ ├── cocoa_notification.h │ │ │ ├── cocoa_notification.mm │ │ │ ├── notification_center_delegate.h │ │ │ ├── notification_center_delegate.mm │ │ │ ├── notification_presenter_mac.h │ │ │ └── notification_presenter_mac.mm │ │ ├── notification.cc │ │ ├── notification.h │ │ ├── notification_delegate.h │ │ ├── notification_presenter.cc │ │ ├── notification_presenter.h │ │ ├── platform_notification_service.cc │ │ ├── platform_notification_service.h │ │ └── win │ │ │ ├── notification_presenter_win.cc │ │ │ ├── notification_presenter_win.h │ │ │ ├── notification_presenter_win7.cc │ │ │ ├── notification_presenter_win7.h │ │ │ ├── win32_desktop_notifications │ │ │ ├── common.h │ │ │ ├── desktop_notification_controller.cc │ │ │ ├── desktop_notification_controller.h │ │ │ ├── toast.cc │ │ │ ├── toast.h │ │ │ ├── toast_uia.cc │ │ │ └── toast_uia.h │ │ │ ├── win32_notification.cc │ │ │ ├── win32_notification.h │ │ │ ├── windows_toast_notification.cc │ │ │ └── windows_toast_notification.h │ ├── osr │ │ ├── osr_host_display_client.cc │ │ ├── osr_host_display_client.h │ │ ├── osr_host_display_client_mac.mm │ │ ├── osr_render_widget_host_view.cc │ │ ├── osr_render_widget_host_view.h │ │ ├── osr_video_consumer.cc │ │ ├── osr_video_consumer.h │ │ ├── osr_view_proxy.cc │ │ ├── osr_view_proxy.h │ │ ├── osr_web_contents_view.cc │ │ ├── osr_web_contents_view.h │ │ └── osr_web_contents_view_mac.mm │ ├── plugins │ │ ├── plugin_utils.cc │ │ └── plugin_utils.h │ ├── printing │ │ ├── print_preview_message_handler.cc │ │ ├── print_view_manager_electron.cc │ │ └── print_view_manager_electron.h │ ├── protocol_registry.cc │ ├── protocol_registry.h │ ├── relauncher.cc │ ├── relauncher.h │ ├── relauncher_linux.cc │ ├── relauncher_mac.cc │ ├── relauncher_win.cc │ ├── resources │ │ ├── mac │ │ │ ├── Info.plist │ │ │ └── electron.icns │ │ └── win │ │ │ ├── disable_window_filtering.manifest │ │ │ ├── dpi_aware.manifest │ │ │ ├── electron.ico │ │ │ └── resource.h │ ├── serial │ │ ├── electron_serial_delegate.cc │ │ ├── electron_serial_delegate.h │ │ ├── serial_chooser_context.cc │ │ ├── serial_chooser_context.h │ │ ├── serial_chooser_context_factory.cc │ │ ├── serial_chooser_context_factory.h │ │ ├── serial_chooser_controller.cc │ │ └── serial_chooser_controller.h │ ├── session_preferences.cc │ ├── session_preferences.h │ ├── special_storage_policy.cc │ ├── special_storage_policy.h │ ├── ui │ │ ├── accelerator_util.cc │ │ ├── accelerator_util.h │ │ ├── accelerator_util_unittests.cc │ │ ├── autofill_popup.cc │ │ ├── autofill_popup.h │ │ ├── certificate_trust.h │ │ ├── certificate_trust_mac.mm │ │ ├── certificate_trust_win.cc │ │ ├── cocoa │ │ │ ├── NSString+ANSI.h │ │ │ ├── NSString+ANSI.mm │ │ │ ├── delayed_native_view_host.h │ │ │ ├── delayed_native_view_host.mm │ │ │ ├── electron_bundle_mover.h │ │ │ ├── electron_bundle_mover.mm │ │ │ ├── electron_inspectable_web_contents_view.h │ │ │ ├── electron_inspectable_web_contents_view.mm │ │ │ ├── electron_menu_controller.h │ │ │ ├── electron_menu_controller.mm │ │ │ ├── electron_native_widget_mac.h │ │ │ ├── electron_native_widget_mac.mm │ │ │ ├── electron_ns_panel.h │ │ │ ├── electron_ns_panel.mm │ │ │ ├── electron_ns_window.h │ │ │ ├── electron_ns_window.mm │ │ │ ├── electron_ns_window_delegate.h │ │ │ ├── electron_ns_window_delegate.mm │ │ │ ├── electron_preview_item.h │ │ │ ├── electron_preview_item.mm │ │ │ ├── electron_touch_bar.h │ │ │ ├── electron_touch_bar.mm │ │ │ ├── event_dispatching_window.h │ │ │ ├── event_dispatching_window.mm │ │ │ ├── root_view_mac.h │ │ │ ├── root_view_mac.mm │ │ │ ├── views_delegate_mac.h │ │ │ ├── views_delegate_mac.mm │ │ │ ├── window_buttons_proxy.h │ │ │ └── window_buttons_proxy.mm │ │ ├── devtools_manager_delegate.cc │ │ ├── devtools_manager_delegate.h │ │ ├── devtools_ui.cc │ │ ├── devtools_ui.h │ │ ├── drag_util.cc │ │ ├── drag_util.h │ │ ├── drag_util_mac.mm │ │ ├── drag_util_views.cc │ │ ├── electron_desktop_window_tree_host_linux.cc │ │ ├── electron_desktop_window_tree_host_linux.h │ │ ├── electron_gdk_pixbuf.sigs │ │ ├── electron_gtk.fragment │ │ ├── electron_gtk.sigs │ │ ├── electron_menu_model.cc │ │ ├── electron_menu_model.h │ │ ├── file_dialog.h │ │ ├── file_dialog_gtk.cc │ │ ├── file_dialog_mac.mm │ │ ├── file_dialog_win.cc │ │ ├── gtk │ │ │ ├── menu_gtk.cc │ │ │ ├── menu_gtk.h │ │ │ ├── menu_util.cc │ │ │ └── menu_util.h │ │ ├── gtk_util.cc │ │ ├── gtk_util.h │ │ ├── inspectable_web_contents.cc │ │ ├── inspectable_web_contents.h │ │ ├── inspectable_web_contents_delegate.h │ │ ├── inspectable_web_contents_view.cc │ │ ├── inspectable_web_contents_view.h │ │ ├── inspectable_web_contents_view_delegate.cc │ │ ├── inspectable_web_contents_view_delegate.h │ │ ├── inspectable_web_contents_view_mac.h │ │ ├── inspectable_web_contents_view_mac.mm │ │ ├── message_box.h │ │ ├── message_box_gtk.cc │ │ ├── message_box_mac.mm │ │ ├── message_box_win.cc │ │ ├── run_all_unittests.cc │ │ ├── status_icon_gtk.cc │ │ ├── status_icon_gtk.h │ │ ├── tray_icon.cc │ │ ├── tray_icon.h │ │ ├── tray_icon_cocoa.h │ │ ├── tray_icon_cocoa.mm │ │ ├── tray_icon_linux.cc │ │ ├── tray_icon_linux.h │ │ ├── tray_icon_observer.h │ │ ├── tray_icon_win.cc │ │ ├── views │ │ │ ├── autofill_popup_view.cc │ │ │ ├── autofill_popup_view.h │ │ │ ├── client_frame_view_linux.cc │ │ │ ├── client_frame_view_linux.h │ │ │ ├── electron_views_delegate.cc │ │ │ ├── electron_views_delegate.h │ │ │ ├── electron_views_delegate_win.cc │ │ │ ├── frameless_view.cc │ │ │ ├── frameless_view.h │ │ │ ├── global_menu_bar_registrar_x11.cc │ │ │ ├── global_menu_bar_registrar_x11.h │ │ │ ├── global_menu_bar_x11.cc │ │ │ ├── global_menu_bar_x11.h │ │ │ ├── inspectable_web_contents_view_views.cc │ │ │ ├── inspectable_web_contents_view_views.h │ │ │ ├── menu_bar.cc │ │ │ ├── menu_bar.h │ │ │ ├── menu_delegate.cc │ │ │ ├── menu_delegate.h │ │ │ ├── menu_model_adapter.cc │ │ │ ├── menu_model_adapter.h │ │ │ ├── native_frame_view.cc │ │ │ ├── native_frame_view.h │ │ │ ├── root_view.cc │ │ │ ├── root_view.h │ │ │ ├── submenu_button.cc │ │ │ ├── submenu_button.h │ │ │ ├── win_caption_button.cc │ │ │ ├── win_caption_button.h │ │ │ ├── win_caption_button_container.cc │ │ │ ├── win_caption_button_container.h │ │ │ ├── win_frame_view.cc │ │ │ ├── win_frame_view.h │ │ │ ├── win_icon_painter.cc │ │ │ └── win_icon_painter.h │ │ ├── webui │ │ │ ├── accessibility_ui.cc │ │ │ └── accessibility_ui.h │ │ ├── win │ │ │ ├── dialog_thread.cc │ │ │ ├── dialog_thread.h │ │ │ ├── electron_desktop_native_widget_aura.cc │ │ │ ├── electron_desktop_native_widget_aura.h │ │ │ ├── electron_desktop_window_tree_host_win.cc │ │ │ ├── electron_desktop_window_tree_host_win.h │ │ │ ├── jump_list.cc │ │ │ ├── jump_list.h │ │ │ ├── notify_icon.cc │ │ │ ├── notify_icon.h │ │ │ ├── notify_icon_host.cc │ │ │ ├── notify_icon_host.h │ │ │ ├── taskbar_host.cc │ │ │ └── taskbar_host.h │ │ └── x │ │ │ ├── event_disabler.cc │ │ │ ├── event_disabler.h │ │ │ ├── x_window_utils.cc │ │ │ └── x_window_utils.h │ ├── usb │ │ ├── electron_usb_delegate.cc │ │ ├── electron_usb_delegate.h │ │ ├── usb_chooser_context.cc │ │ ├── usb_chooser_context.h │ │ ├── usb_chooser_context_factory.cc │ │ ├── usb_chooser_context_factory.h │ │ ├── usb_chooser_controller.cc │ │ └── usb_chooser_controller.h │ ├── web_contents_permission_helper.cc │ ├── web_contents_permission_helper.h │ ├── web_contents_preferences.cc │ ├── web_contents_preferences.h │ ├── web_contents_zoom_controller.cc │ ├── web_contents_zoom_controller.h │ ├── web_contents_zoom_observer.h │ ├── web_view_guest_delegate.cc │ ├── web_view_guest_delegate.h │ ├── web_view_manager.cc │ ├── web_view_manager.h │ ├── webauthn │ │ ├── electron_authenticator_request_delegate.cc │ │ └── electron_authenticator_request_delegate.h │ ├── win │ │ ├── dark_mode.cc │ │ ├── dark_mode.h │ │ ├── scoped_hstring.cc │ │ └── scoped_hstring.h │ ├── window_list.cc │ ├── window_list.h │ ├── window_list_observer.h │ ├── zoom_level_delegate.cc │ └── zoom_level_delegate.h ├── common │ ├── api │ │ ├── BUILD.gn │ │ ├── api.mojom │ │ ├── crashpad_support.cc │ │ ├── electron_api_asar.cc │ │ ├── electron_api_clipboard.cc │ │ ├── electron_api_clipboard.h │ │ ├── electron_api_clipboard_mac.mm │ │ ├── electron_api_command_line.cc │ │ ├── electron_api_environment.cc │ │ ├── electron_api_key_weak_map.h │ │ ├── electron_api_native_image.cc │ │ ├── electron_api_native_image.h │ │ ├── electron_api_native_image_mac.mm │ │ ├── electron_api_native_image_win.cc │ │ ├── electron_api_shell.cc │ │ ├── electron_api_testing.cc │ │ ├── electron_api_v8_util.cc │ │ ├── electron_bindings.cc │ │ ├── electron_bindings.h │ │ ├── features.cc │ │ ├── object_life_monitor.cc │ │ └── object_life_monitor.h │ ├── application_info.cc │ ├── application_info.h │ ├── application_info_linux.cc │ ├── application_info_mac.mm │ ├── application_info_win.cc │ ├── asar │ │ ├── archive.cc │ │ ├── archive.h │ │ ├── archive_mac.mm │ │ ├── asar_util.cc │ │ ├── asar_util.h │ │ ├── scoped_temporary_file.cc │ │ └── scoped_temporary_file.h │ ├── color_util.cc │ ├── color_util.h │ ├── crash_keys.cc │ ├── crash_keys.h │ ├── electron_command_line.cc │ ├── electron_command_line.h │ ├── electron_constants.cc │ ├── electron_constants.h │ ├── electron_paths.h │ ├── extensions │ │ ├── api │ │ │ ├── BUILD.gn │ │ │ ├── _api_features.json │ │ │ ├── _manifest_features.json │ │ │ ├── _permission_features.json │ │ │ ├── extension.json │ │ │ ├── pdf_viewer_private.idl │ │ │ ├── resources_private.idl │ │ │ └── tabs.json │ │ ├── electron_extensions_api_provider.cc │ │ ├── electron_extensions_api_provider.h │ │ ├── electron_extensions_client.cc │ │ └── electron_extensions_client.h │ ├── gin_converters │ │ ├── accelerator_converter.cc │ │ ├── accelerator_converter.h │ │ ├── base_converter.h │ │ ├── blink_converter.cc │ │ ├── blink_converter.h │ │ ├── callback_converter.h │ │ ├── content_converter.cc │ │ ├── content_converter.h │ │ ├── extension_converter.cc │ │ ├── extension_converter.h │ │ ├── file_dialog_converter.cc │ │ ├── file_dialog_converter.h │ │ ├── file_path_converter.h │ │ ├── frame_converter.cc │ │ ├── frame_converter.h │ │ ├── gfx_converter.cc │ │ ├── gfx_converter.h │ │ ├── guid_converter.h │ │ ├── gurl_converter.h │ │ ├── hid_device_info_converter.h │ │ ├── image_converter.cc │ │ ├── image_converter.h │ │ ├── media_converter.cc │ │ ├── media_converter.h │ │ ├── message_box_converter.cc │ │ ├── message_box_converter.h │ │ ├── native_window_converter.h │ │ ├── net_converter.cc │ │ ├── net_converter.h │ │ ├── optional_converter.h │ │ ├── serial_port_info_converter.h │ │ ├── std_converter.h │ │ ├── time_converter.cc │ │ ├── time_converter.h │ │ ├── usb_device_info_converter.h │ │ ├── usb_protected_classes_converter.h │ │ ├── value_converter.cc │ │ └── value_converter.h │ ├── gin_helper │ │ ├── accessor.h │ │ ├── arguments.cc │ │ ├── arguments.h │ │ ├── callback.cc │ │ ├── callback.h │ │ ├── cleaned_up_at_exit.cc │ │ ├── cleaned_up_at_exit.h │ │ ├── constructible.h │ │ ├── constructor.h │ │ ├── destroyable.cc │ │ ├── destroyable.h │ │ ├── dictionary.h │ │ ├── error_thrower.cc │ │ ├── error_thrower.h │ │ ├── event.cc │ │ ├── event.h │ │ ├── event_emitter.h │ │ ├── event_emitter_caller.cc │ │ ├── event_emitter_caller.h │ │ ├── event_emitter_template.cc │ │ ├── event_emitter_template.h │ │ ├── function_template.cc │ │ ├── function_template.h │ │ ├── function_template_extensions.h │ │ ├── locker.cc │ │ ├── locker.h │ │ ├── microtasks_scope.cc │ │ ├── microtasks_scope.h │ │ ├── object_template_builder.cc │ │ ├── object_template_builder.h │ │ ├── persistent_dictionary.cc │ │ ├── persistent_dictionary.h │ │ ├── pinnable.h │ │ ├── promise.cc │ │ ├── promise.h │ │ ├── trackable_object.cc │ │ ├── trackable_object.h │ │ ├── wrappable.cc │ │ ├── wrappable.h │ │ └── wrappable_base.h │ ├── heap_snapshot.cc │ ├── heap_snapshot.h │ ├── key_weak_map.h │ ├── keyboard_util.cc │ ├── keyboard_util.h │ ├── language_util.h │ ├── language_util_linux.cc │ ├── language_util_mac.mm │ ├── language_util_win.cc │ ├── logging.cc │ ├── logging.h │ ├── mac │ │ ├── main_application_bundle.h │ │ └── main_application_bundle.mm │ ├── node_bindings.cc │ ├── node_bindings.h │ ├── node_bindings_linux.cc │ ├── node_bindings_linux.h │ ├── node_bindings_mac.cc │ ├── node_bindings_mac.h │ ├── node_bindings_win.cc │ ├── node_bindings_win.h │ ├── node_includes.h │ ├── node_util.cc │ ├── node_util.h │ ├── options_switches.cc │ ├── options_switches.h │ ├── platform_util.cc │ ├── platform_util.h │ ├── platform_util_internal.h │ ├── platform_util_linux.cc │ ├── platform_util_mac.mm │ ├── platform_util_win.cc │ ├── plugin_info.cc │ ├── plugin_info.h │ ├── process_util.cc │ ├── process_util.h │ ├── resources │ │ └── mac │ │ │ ├── Info.plist │ │ │ └── MainMenu.xib │ ├── skia_util.cc │ ├── skia_util.h │ ├── thread_restrictions.h │ ├── v8_value_serializer.cc │ ├── v8_value_serializer.h │ └── world_ids.h ├── renderer │ ├── api │ │ ├── context_bridge │ │ │ ├── object_cache.cc │ │ │ └── object_cache.h │ │ ├── electron_api_context_bridge.cc │ │ ├── electron_api_context_bridge.h │ │ ├── electron_api_crash_reporter_renderer.cc │ │ ├── electron_api_ipc_renderer.cc │ │ ├── electron_api_spell_check_client.cc │ │ ├── electron_api_spell_check_client.h │ │ └── electron_api_web_frame.cc │ ├── browser_exposed_renderer_interfaces.cc │ ├── browser_exposed_renderer_interfaces.h │ ├── content_settings_observer.cc │ ├── content_settings_observer.h │ ├── electron_api_service_impl.cc │ ├── electron_api_service_impl.h │ ├── electron_autofill_agent.cc │ ├── electron_autofill_agent.h │ ├── electron_render_frame_observer.cc │ ├── electron_render_frame_observer.h │ ├── electron_renderer_client.cc │ ├── electron_renderer_client.h │ ├── electron_renderer_pepper_host_factory.cc │ ├── electron_renderer_pepper_host_factory.h │ ├── electron_sandboxed_renderer_client.cc │ ├── electron_sandboxed_renderer_client.h │ ├── extensions │ │ ├── electron_extensions_dispatcher_delegate.cc │ │ ├── electron_extensions_dispatcher_delegate.h │ │ ├── electron_extensions_renderer_client.cc │ │ └── electron_extensions_renderer_client.h │ ├── pepper_helper.cc │ ├── pepper_helper.h │ ├── printing │ │ ├── print_render_frame_helper_delegate.cc │ │ └── print_render_frame_helper_delegate.h │ ├── renderer_client_base.cc │ ├── renderer_client_base.h │ ├── resources │ │ └── mac │ │ │ └── Info.plist │ ├── web_worker_observer.cc │ └── web_worker_observer.h ├── services │ └── node │ │ ├── node_service.cc │ │ ├── node_service.h │ │ ├── parent_port.cc │ │ ├── parent_port.h │ │ └── public │ │ └── mojom │ │ ├── BUILD.gn │ │ └── node_service.mojom └── utility │ ├── electron_content_utility_client.cc │ └── electron_content_utility_client.h ├── spec-chromium ├── BUILD.gn └── configs │ ├── browsertests.yml │ └── unittests.yml ├── spec ├── .eslintrc.json ├── .gitignore ├── ambient.d.ts ├── api-app-spec.ts ├── api-auto-updater-spec.ts ├── api-autoupdater-darwin-spec.ts ├── api-browser-view-spec.ts ├── api-browser-window-spec.ts ├── api-clipboard-spec.ts ├── api-content-tracing-spec.ts ├── api-context-bridge-spec.ts ├── api-crash-reporter-spec.ts ├── api-debugger-spec.ts ├── api-desktop-capturer-spec.ts ├── api-dialog-spec.ts ├── api-global-shortcut-spec.ts ├── api-in-app-purchase-spec.ts ├── api-ipc-main-spec.ts ├── api-ipc-renderer-spec.ts ├── api-ipc-spec.ts ├── api-media-handler-spec.ts ├── api-menu-item-spec.ts ├── api-menu-spec.ts ├── api-native-image-spec.ts ├── api-native-theme-spec.ts ├── api-net-log-spec.ts ├── api-net-spec.ts ├── api-notification-dbus-spec.ts ├── api-notification-spec.ts ├── api-power-monitor-spec.ts ├── api-power-save-blocker-spec.ts ├── api-process-spec.ts ├── api-protocol-spec.ts ├── api-safe-storage-spec.ts ├── api-screen-spec.ts ├── api-service-workers-spec.ts ├── api-session-spec.ts ├── api-shell-spec.ts ├── api-subframe-spec.ts ├── api-system-preferences-spec.ts ├── api-touch-bar-spec.ts ├── api-tray-spec.ts ├── api-utility-process-spec.ts ├── api-view-spec.ts ├── api-web-contents-spec.ts ├── api-web-contents-view-spec.ts ├── api-web-frame-main-spec.ts ├── api-web-frame-spec.ts ├── api-web-request-spec.ts ├── asar-spec.ts ├── autofill-spec.ts ├── chromium-spec.ts ├── crash-spec.ts ├── deprecate-spec.ts ├── disabled-tests.json ├── extensions-spec.ts ├── fixtures │ ├── api │ │ ├── app-path │ │ │ ├── lib │ │ │ │ └── index.js │ │ │ └── package.json │ │ ├── beforeunload-empty-string.html │ │ ├── beforeunload-false-prevent3.html │ │ ├── beforeunload-false.html │ │ ├── beforeunload-undefined.html │ │ ├── blank.html │ │ ├── close.html │ │ ├── command-line │ │ │ ├── main.js │ │ │ └── package.json │ │ ├── context-bridge │ │ │ ├── can-bind-preload.js │ │ │ ├── context-bridge-mutability │ │ │ │ ├── index.html │ │ │ │ ├── main.js │ │ │ │ ├── package.json │ │ │ │ └── preload.js │ │ │ └── empty.html │ │ ├── cookie-app │ │ │ ├── main.js │ │ │ └── package.json │ │ ├── custom-protocol-shutdown.js │ │ ├── default-menu │ │ │ ├── main.js │ │ │ └── package.json │ │ ├── did-fail-load-iframe.html │ │ ├── electron-main-module │ │ │ ├── app.asar │ │ │ └── app │ │ │ │ └── index.js │ │ ├── exit-closes-all-windows-app │ │ │ ├── main.js │ │ │ └── package.json │ │ ├── first-party-sets │ │ │ ├── base │ │ │ │ ├── main.js │ │ │ │ └── package.json │ │ │ └── command-line │ │ │ │ ├── main.js │ │ │ │ └── package.json │ │ ├── frame-subscriber.html │ │ ├── globals.html │ │ ├── gpu-info.js │ │ ├── ipc-main-listeners │ │ │ ├── main.js │ │ │ └── package.json │ │ ├── isolated-fetch-preload.js │ │ ├── isolated-preload.js │ │ ├── isolated-process.js │ │ ├── isolated.html │ │ ├── loaded-from-dataurl.js │ │ ├── locale-check │ │ │ ├── main.js │ │ │ └── package.json │ │ ├── localstorage.html │ │ ├── mixed-sandbox-app │ │ │ ├── electron-app-mixed-sandbox-preload.js │ │ │ ├── main.js │ │ │ └── package.json │ │ ├── native-window-open-blank.html │ │ ├── native-window-open-child.html │ │ ├── native-window-open-cross-origin.html │ │ ├── native-window-open-file.html │ │ ├── native-window-open-iframe.html │ │ ├── native-window-open-isolated-preload.js │ │ ├── native-window-open-isolated.html │ │ ├── native-window-open-native-addon.html │ │ ├── native-window-open-no-allowpopups.html │ │ ├── native-window-open-noopener.html │ │ ├── net-log │ │ │ ├── main.js │ │ │ └── package.json │ │ ├── new-window-preload.js │ │ ├── new-window-webview-preload.js │ │ ├── new-window-webview.html │ │ ├── new-window.html │ │ ├── no-leak.html │ │ ├── offscreen-rendering.html │ │ ├── picture-in-picture.html │ │ ├── preload.html │ │ ├── print-to-pdf-large.html │ │ ├── print-to-pdf-small.html │ │ ├── quit-app │ │ │ ├── main.js │ │ │ └── package.json │ │ ├── relaunch │ │ │ ├── main.js │ │ │ └── package.json │ │ ├── safe-storage │ │ │ ├── decrypt-app │ │ │ │ ├── main.js │ │ │ │ └── package.json │ │ │ └── encrypt-app │ │ │ │ ├── main.js │ │ │ │ └── package.json │ │ ├── sandbox.html │ │ ├── send-sync-message.html │ │ ├── service-workers │ │ │ ├── index.html │ │ │ ├── logs.html │ │ │ ├── sw-logs.js │ │ │ └── sw.js │ │ ├── shared-worker │ │ │ ├── shared-worker.html │ │ │ ├── shared-worker1.js │ │ │ └── shared-worker2.js │ │ ├── singleton-data │ │ │ ├── main.js │ │ │ └── package.json │ │ ├── singleton-userdata │ │ │ ├── main.js │ │ │ └── package.json │ │ ├── singleton │ │ │ ├── main.js │ │ │ └── package.json │ │ ├── test-menu-null │ │ │ ├── main.js │ │ │ └── package.json │ │ ├── test-menu-visibility │ │ │ ├── main.js │ │ │ └── package.json │ │ ├── unhandled-rejection-handled.js │ │ ├── unhandled-rejection.js │ │ ├── unload.html │ │ ├── utility-process │ │ │ ├── crash.js │ │ │ ├── custom-exit.js │ │ │ ├── dns-result-order.js │ │ │ ├── empty.js │ │ │ ├── endless.js │ │ │ ├── env-app │ │ │ │ ├── main.js │ │ │ │ ├── package.json │ │ │ │ └── test.js │ │ │ ├── eval.js │ │ │ ├── exception.js │ │ │ ├── inherit-stderr │ │ │ │ ├── main.js │ │ │ │ ├── package.json │ │ │ │ └── test.js │ │ │ ├── inherit-stdout │ │ │ │ ├── main.js │ │ │ │ ├── package.json │ │ │ │ └── test.js │ │ │ ├── log.js │ │ │ ├── post-message-queue.js │ │ │ ├── post-message.js │ │ │ ├── preload.js │ │ │ ├── receive-message.js │ │ │ └── suid.js │ │ ├── webrequest.html │ │ ├── window-all-closed │ │ │ ├── main.js │ │ │ └── package.json │ │ ├── window-open-location-change.html │ │ ├── window-open-location-final.html │ │ ├── window-open-location-open.html │ │ └── window-open-preload.js │ ├── apps │ │ ├── crash │ │ │ ├── fork.js │ │ │ ├── main.js │ │ │ ├── node-crash.js │ │ │ ├── node-extra-args.js │ │ │ ├── package.json │ │ │ └── sandbox-preload.js │ │ ├── libuv-hang │ │ │ ├── index.html │ │ │ ├── main.js │ │ │ ├── preload.js │ │ │ └── renderer.js │ │ ├── open-new-window-from-link │ │ │ ├── index.html │ │ │ ├── main.js │ │ │ ├── new-window-page.html │ │ │ ├── package.json │ │ │ └── preload.js │ │ ├── remote-control │ │ │ ├── main.js │ │ │ └── package.json │ │ ├── self-module-paths │ │ │ ├── index.html │ │ │ ├── main.js │ │ │ ├── package.json │ │ │ ├── renderer.js │ │ │ └── worker.js │ │ ├── set-path │ │ │ ├── main.js │ │ │ └── package.json │ │ └── xwindow-icon │ │ │ ├── icon.png │ │ │ ├── main.js │ │ │ └── package.json │ ├── assets │ │ ├── 1x1.png │ │ ├── 2x2.jpg │ │ ├── 3x3.png │ │ ├── LICENSE │ │ ├── capybara.png │ │ ├── icon.ico │ │ ├── logo.png │ │ ├── logo_Template.png │ │ ├── shortcut.lnk │ │ └── tone.wav │ ├── auto-update │ │ ├── check-with-headers │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── check │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── initial │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── update-json │ │ │ ├── index.js │ │ │ └── package.json │ │ └── update │ │ │ ├── index.js │ │ │ └── package.json │ ├── blank.html │ ├── blank.png │ ├── cat-spin.mp4 │ ├── cat.pdf │ ├── certificates │ │ ├── certs.cnf │ │ ├── client.p12 │ │ ├── generate_certs.sh │ │ ├── intermediateCA.pem │ │ ├── rootCA.pem │ │ ├── server.key │ │ └── server.pem │ ├── chromium │ │ ├── other-window.js │ │ ├── spellchecker.html │ │ └── visibilitystate.html │ ├── crash-cases │ │ ├── api-browser-destroy │ │ │ └── index.js │ │ ├── early-in-memory-session-create │ │ │ └── index.js │ │ ├── fs-promises-renderer-crash │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── in-memory-session-double-free │ │ │ └── index.js │ │ ├── js-execute-iframe │ │ │ ├── index.html │ │ │ ├── index.js │ │ │ └── page2.html │ │ ├── native-window-open-exit │ │ │ ├── index.html │ │ │ ├── index.js │ │ │ └── preload.js │ │ ├── quit-on-crashed-event │ │ │ └── index.js │ │ ├── safe-storage │ │ │ └── index.js │ │ ├── setimmediate-renderer-crash │ │ │ ├── index.js │ │ │ └── preload.js │ │ ├── setimmediate-window-open-crash │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── transparent-window-get-background-color │ │ │ └── index.js │ │ ├── webcontents-create-leak-exit │ │ │ └── index.js │ │ ├── webcontentsview-create-leak-exit │ │ │ └── index.js │ │ ├── webview-attach-destroyed │ │ │ └── index.js │ │ ├── webview-contents-error-on-creation │ │ │ └── index.js │ │ ├── webview-remove-on-wc-close │ │ │ ├── index.html │ │ │ ├── index.js │ │ │ └── webview.html │ │ └── worker-multiple-destroy │ │ │ ├── index.html │ │ │ ├── index.js │ │ │ └── worklet.js │ ├── devtools-extensions │ │ ├── bad-manifest │ │ │ └── manifest.json │ │ └── foo │ │ │ ├── _locales │ │ │ └── en │ │ │ │ └── messages.json │ │ │ ├── devtools.js │ │ │ ├── foo.html │ │ │ ├── index.html │ │ │ ├── manifest.json │ │ │ └── panel.js │ ├── dogs-running.txt │ ├── extensions │ │ ├── chrome-api │ │ │ ├── background.js │ │ │ ├── main.js │ │ │ └── manifest.json │ │ ├── chrome-i18n │ │ │ ├── v2 │ │ │ │ ├── _locales │ │ │ │ │ └── en │ │ │ │ │ │ └── messages.json │ │ │ │ ├── main.js │ │ │ │ └── manifest.json │ │ │ └── v3 │ │ │ │ ├── _locales │ │ │ │ └── es │ │ │ │ │ └── messages.json │ │ │ │ ├── main.js │ │ │ │ └── manifest.json │ │ ├── chrome-runtime │ │ │ ├── background.js │ │ │ ├── main.js │ │ │ └── manifest.json │ │ ├── chrome-storage │ │ │ ├── main.js │ │ │ └── manifest.json │ │ ├── chrome-tabs │ │ │ ├── api-async │ │ │ │ ├── background.js │ │ │ │ ├── main.js │ │ │ │ └── manifest.json │ │ │ └── no-privileges │ │ │ │ ├── background.js │ │ │ │ ├── main.js │ │ │ │ └── manifest.json │ │ ├── chrome-too-low-version │ │ │ ├── main.js │ │ │ └── manifest.json │ │ ├── chrome-webRequest-wss │ │ │ ├── background.js │ │ │ └── manifest.json │ │ ├── chrome-webRequest │ │ │ ├── background.js │ │ │ └── manifest.json │ │ ├── content-script-document-end │ │ │ ├── end.js │ │ │ └── manifest.json │ │ ├── content-script-document-idle │ │ │ ├── idle.js │ │ │ └── manifest.json │ │ ├── content-script-document-start │ │ │ ├── manifest.json │ │ │ └── start.js │ │ ├── content-script │ │ │ ├── all_frames-disabled.css │ │ │ ├── all_frames-enabled.css │ │ │ ├── all_frames-preload.js │ │ │ ├── frame-with-frame.html │ │ │ ├── frame.html │ │ │ └── manifest.json │ │ ├── devtools-extension │ │ │ ├── foo.html │ │ │ ├── foo.js │ │ │ ├── index.html │ │ │ ├── index.js │ │ │ └── manifest.json │ │ ├── lazy-background-page │ │ │ ├── background.js │ │ │ ├── content_script.js │ │ │ ├── get-background-page.js │ │ │ ├── manifest.json │ │ │ ├── page-get-background.html │ │ │ ├── page-runtime-get-background.html │ │ │ └── runtime-get-background-page.js │ │ ├── load-error │ │ │ └── manifest.json │ │ ├── missing-manifest │ │ │ └── main.js │ │ ├── mv3-service-worker │ │ │ ├── background.js │ │ │ ├── main.js │ │ │ └── manifest.json │ │ ├── persistent-background-page │ │ │ ├── background.js │ │ │ └── manifest.json │ │ ├── red-bg │ │ │ ├── main.js │ │ │ └── manifest.json │ │ └── ui-page │ │ │ ├── bare-page.html │ │ │ ├── manifest.json │ │ │ ├── page-get-background.html │ │ │ ├── page-script-load.html │ │ │ └── script.js │ ├── hello.txt │ ├── module │ │ ├── access-blink-apis.js │ │ ├── asar.js │ │ ├── check-arguments.js │ │ ├── create_socket.js │ │ ├── declare-buffer.js │ │ ├── declare-global.js │ │ ├── declare-process.js │ │ ├── delay-exit.js │ │ ├── echo-renamed.js │ │ ├── echo.js │ │ ├── empty.js │ │ ├── fail.js │ │ ├── fork_ping.js │ │ ├── get-global-preload.js │ │ ├── hello-child.js │ │ ├── hello.js │ │ ├── inspector-binding.js │ │ ├── isolated-ping.js │ │ ├── locale-compare.js │ │ ├── no-asar.js │ │ ├── node-promise-timer.js │ │ ├── noop.js │ │ ├── original-fs.js │ │ ├── ping.js │ │ ├── preload-context.js │ │ ├── preload-electron.js │ │ ├── preload-error-exception.js │ │ ├── preload-error-syntax.js │ │ ├── preload-eventemitter.js │ │ ├── preload-ipc-ping-pong.js │ │ ├── preload-ipc.js │ │ ├── preload-node-off-wrapper.js │ │ ├── preload-node-off.js │ │ ├── preload-required-module.js │ │ ├── preload-sandbox.js │ │ ├── preload-sandboxæø åü.js │ │ ├── preload-set-global.js │ │ ├── preload-webview.js │ │ ├── preload.js │ │ ├── print-crash-parameters.js │ │ ├── process-stdout.js │ │ ├── process_args.js │ │ ├── run-as-node.js │ │ ├── send-later.js │ │ ├── set-global-preload-1.js │ │ ├── set-global-preload-2.js │ │ ├── set-global-preload-3.js │ │ ├── set-global.js │ │ ├── set-immediate.js │ │ ├── test.coffee │ │ └── uv-dlopen.js │ ├── native-addon │ │ ├── echo │ │ │ ├── binding.cc │ │ │ ├── binding.gyp │ │ │ ├── lib │ │ │ │ └── echo.js │ │ │ └── package.json │ │ └── uv-dlopen │ │ │ ├── binding.gyp │ │ │ ├── foo.cpp │ │ │ ├── index.js │ │ │ ├── main.cpp │ │ │ └── package.json │ ├── no-proprietary-codecs.js │ ├── pages │ │ ├── a.html │ │ ├── b.html │ │ ├── base-page-security-onload-message.html │ │ ├── base-page-security.html │ │ ├── base-page.html │ │ ├── basic-auth.html │ │ ├── beforeunload-false.html │ │ ├── blank.html │ │ ├── button.html │ │ ├── c.html │ │ ├── cache-storage.html │ │ ├── close.html │ │ ├── content.html │ │ ├── css-transparent.html │ │ ├── d.html │ │ ├── datalist-text.html │ │ ├── datalist-time.html │ │ ├── dom-ready.html │ │ ├── e.html │ │ ├── external-string.html │ │ ├── fetch.html │ │ ├── filesystem.html │ │ ├── form-with-data.html │ │ ├── fullscreen-ipif.html │ │ ├── fullscreen-oopif.html │ │ ├── fullscreen.html │ │ ├── geolocation │ │ │ └── index.html │ │ ├── half-background-color.html │ │ ├── history-replace.html │ │ ├── history.html │ │ ├── iframe-protocol.html │ │ ├── insecure-resources.html │ │ ├── ipc-message.html │ │ ├── jquery-3.6.0.min.js │ │ ├── jquery.html │ │ ├── key-events.html │ │ ├── media-id-reset.html │ │ ├── native-module.html │ │ ├── onkeyup.html │ │ ├── onmouseup.html │ │ ├── overlay.html │ │ ├── partition │ │ │ └── one.html │ │ ├── pdf-in-iframe.html │ │ ├── permissions │ │ │ ├── geolocation.html │ │ │ ├── media.html │ │ │ ├── midi-sysex.html │ │ │ ├── midi.html │ │ │ └── notification.html │ │ ├── ping.html │ │ ├── post.html │ │ ├── save_page │ │ │ ├── index.html │ │ │ ├── test.css │ │ │ └── test.js │ │ ├── send-after-node.html │ │ ├── service-worker │ │ │ ├── badge-index.html │ │ │ ├── custom-scheme-index.html │ │ │ ├── empty.html │ │ │ ├── index.html │ │ │ ├── service-worker-badge.js │ │ │ ├── service-worker.js │ │ │ └── worker-no-node.js │ │ ├── set-global.html │ │ ├── storage │ │ │ ├── cookie.html │ │ │ ├── indexed_db.html │ │ │ ├── local_storage.html │ │ │ ├── session_storage.html │ │ │ └── web_sql.html │ │ ├── tab-focus-loop-elements-wv.html │ │ ├── tab-focus-loop-elements.html │ │ ├── theme-color.html │ │ ├── useragent.html │ │ ├── video.html │ │ ├── visibilitychange.html │ │ ├── webframe-spell-check.html │ │ ├── webframe-zoom.html │ │ ├── webview-allowpopups.html │ │ ├── webview-custom-zoom-level.html │ │ ├── webview-devtools.html │ │ ├── webview-did-attach-event.html │ │ ├── webview-did-navigate-in-page-with-hash.html │ │ ├── webview-did-navigate-in-page-with-history.html │ │ ├── webview-did-navigate-in-page.html │ │ ├── webview-in-page-navigate.html │ │ ├── webview-isolated.html │ │ ├── webview-no-script.html │ │ ├── webview-opener-no-node-integration.html │ │ ├── webview-opener-postMessage.html │ │ ├── webview-origin-zoom-level.html │ │ ├── webview-stripped-preload.html │ │ ├── webview-trusted-types.html │ │ ├── webview-visibilitychange.html │ │ ├── webview-will-navigate-in-frame.html │ │ ├── webview-will-navigate.html │ │ ├── webview-zoom-factor.html │ │ ├── webview-zoom-inherited.html │ │ ├── will-navigate.html │ │ ├── window-no-javascript.html │ │ ├── window-open-hide.html │ │ ├── window-open-postMessage-driver.html │ │ ├── window-open-postMessage.html │ │ ├── window-open-size.html │ │ ├── window-open.html │ │ ├── window-opener-location.html │ │ ├── window-opener-no-node-integration.html │ │ ├── window-opener-no-webview-tag.html │ │ ├── window-opener-node.html │ │ ├── window-opener-postMessage.html │ │ ├── window-opener-targetOrigin.html │ │ ├── window-opener-webview.html │ │ ├── window-opener.html │ │ ├── worker.html │ │ ├── world-safe-preload-error.js │ │ ├── world-safe-preload.js │ │ └── zoom-factor.html │ ├── preload-expose-ipc.js │ ├── release-notes │ │ └── cache │ │ │ ├── electron-electron-commit-0600420bac25439fc2067d51c6aaa4ee11770577 │ │ │ ├── electron-electron-commit-2955c67c4ea712fa22773ac9113709fc952bfd49 │ │ │ ├── electron-electron-commit-2fad53e66b1a2cb6f7dad88fe9bb62d7a461fe98 │ │ │ ├── electron-electron-commit-467409458e716c68b35fa935d556050ca6bed1c4 │ │ │ ├── electron-electron-commit-61dc1c88fd34a3e8fff80c80ed79d0455970e610 │ │ │ ├── electron-electron-commit-89eb309d0b22bd4aec058ffaf983e81e56a5c378 │ │ │ ├── electron-electron-commit-8bc0c92137f4a77dc831ca644a86a3e48b51a11e │ │ │ ├── electron-electron-commit-a6ff42c190cb5caf8f3e217748e49183a951491b │ │ │ ├── electron-electron-issue-20214-comments │ │ │ ├── electron-electron-issue-21497-comments │ │ │ ├── electron-electron-issue-21891-comments │ │ │ ├── electron-electron-issue-21946-comments │ │ │ ├── electron-electron-issue-22750-comments │ │ │ ├── electron-electron-issue-22770-comments │ │ │ ├── electron-electron-issue-22828-comments │ │ │ ├── electron-electron-issue-25052-comments │ │ │ ├── electron-electron-issue-25216-comments │ │ │ ├── electron-electron-pull-20214 │ │ │ ├── electron-electron-pull-20620 │ │ │ ├── electron-electron-pull-21497 │ │ │ ├── electron-electron-pull-21591 │ │ │ ├── electron-electron-pull-21891 │ │ │ ├── electron-electron-pull-21946 │ │ │ ├── electron-electron-pull-22750 │ │ │ ├── electron-electron-pull-22770 │ │ │ ├── electron-electron-pull-22828 │ │ │ ├── electron-electron-pull-25052 │ │ │ └── electron-electron-pull-25216 │ ├── snapshot-items-available │ │ ├── main.js │ │ └── package.json │ ├── sub-frames │ │ ├── debug-frames.html │ │ ├── frame-container-webview.html │ │ ├── frame-container.html │ │ ├── frame-with-frame-container-webview.html │ │ ├── frame-with-frame-container.html │ │ ├── frame-with-frame.html │ │ ├── frame.html │ │ ├── preload.js │ │ ├── test.js │ │ └── webview-iframe-preload.js │ ├── test.asar │ │ ├── a.asar │ │ ├── echo.asar │ │ ├── empty.asar │ │ ├── file │ │ ├── logo.asar │ │ ├── repack.js │ │ ├── script.asar │ │ ├── unpack.asar │ │ ├── unpack.asar.unpacked │ │ │ ├── a.txt │ │ │ └── atom.png │ │ ├── video.asar │ │ ├── web.asar │ │ └── worker_threads.asar │ ├── testsnap.js │ ├── version-bumper │ │ └── fixture_support.md │ ├── video-source-image.webp │ ├── webview │ │ └── fullscreen │ │ │ ├── frame.html │ │ │ └── main.html │ └── workers │ │ ├── load_shared_worker.html │ │ ├── load_worker.html │ │ ├── shared_worker.js │ │ ├── shared_worker_node.js │ │ ├── worker.js │ │ ├── worker_node.js │ │ └── workers.asar ├── get-files.ts ├── guest-window-manager-spec.ts ├── index.js ├── lib │ ├── deprecate-helpers.ts │ ├── events-helpers.ts │ ├── screen-helpers.ts │ ├── spec-helpers.ts │ ├── video-helpers.js │ └── window-helpers.ts ├── logging-spec.ts ├── modules-spec.ts ├── node-spec.ts ├── package.json ├── parse-features-string-spec.ts ├── pipe-transport.ts ├── process-binding-spec.ts ├── release-notes-spec.ts ├── security-warnings-spec.ts ├── spellchecker-spec.ts ├── ts-smoke │ ├── electron │ │ ├── main.ts │ │ └── renderer.ts │ ├── runner.js │ └── tsconfig.json ├── types-spec.ts ├── version-bump-spec.ts ├── visibility-state-spec.ts ├── webview-spec.ts └── yarn.lock ├── tsconfig.default_app.json ├── tsconfig.electron.json ├── tsconfig.json ├── tsconfig.script.json ├── tsconfig.spec.json ├── typings ├── internal-ambient.d.ts └── internal-electron.d.ts └── yarn.lock /.circleci/.gitignore: -------------------------------------------------------------------------------- 1 | config-staging 2 | -------------------------------------------------------------------------------- /.circleci/config/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@electron/circleci-config", 3 | "version": "0.0.0", 4 | "private": true, 5 | "license": "MIT", 6 | "dependencies": { 7 | "fs-extra": "^10.1.0", 8 | "js-yaml": "^4.1.0" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /.clang-tidy: -------------------------------------------------------------------------------- 1 | --- 2 | Checks: '-modernize-use-nullptr' 3 | InheritParentConfig: true 4 | ... 5 | -------------------------------------------------------------------------------- /.devcontainer/update-content-command.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -eo pipefail 4 | 5 | buildtools=$HOME/.electron_build_tools 6 | 7 | export PATH="$PATH:$buildtools/src" 8 | 9 | # Sync latest 10 | e d gclient sync --with_branch_heads --with_tags 11 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | * 2 | !tools/xvfb-init.sh 3 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | # These env vars are only necessary for creating Electron releases. 2 | # See docs/development/releasing.md 3 | 4 | APPVEYOR_CLOUD_TOKEN= 5 | CIRCLE_TOKEN= 6 | ELECTRON_GITHUB_TOKEN= 7 | -------------------------------------------------------------------------------- /.git-blame-ignore-revs: -------------------------------------------------------------------------------- 1 | # Atom --> Electron rename 2 | d9321f4df751fa32813fab1b6387bbd61bd681d0 3 | 34c4c8d5088fa183f56baea28809de6f2a427e02 4 | # Enable JS Semicolons 5 | 5d657dece4102e5e5304d42e8004b6ad64c0fcda 6 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . "$(dirname "$0")/_/husky.sh" 3 | 4 | npm run precommit -------------------------------------------------------------------------------- /.husky/pre-push: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . "$(dirname "$0")/_/husky.sh" 3 | 4 | npm run prepack 5 | -------------------------------------------------------------------------------- /.markdownlint.autofix.json: -------------------------------------------------------------------------------- 1 | { 2 | "default": false, 3 | "no-trailing-spaces": { 4 | "br_spaces": 0 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /.markdownlint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@electron/lint-roller/configs/markdownlint.json" 3 | } 4 | -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | 16 2 | -------------------------------------------------------------------------------- /.remarkrc: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": [ 3 | ["remark-lint-code-block-style", "fenced"], 4 | ["remark-lint-fenced-code-flag"] 5 | ] 6 | } -------------------------------------------------------------------------------- /build/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": [ 3 | "unicorn" 4 | ], 5 | "rules": { 6 | "unicorn/prefer-node-protocol": "error" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /build/args/ffmpeg.gn: -------------------------------------------------------------------------------- 1 | import("all.gn") 2 | is_component_build = false 3 | is_component_ffmpeg = true 4 | is_official_build = true 5 | proprietary_codecs = false 6 | ffmpeg_branding = "Chromium" 7 | enable_dsyms = false 8 | -------------------------------------------------------------------------------- /build/args/native_tests.gn: -------------------------------------------------------------------------------- 1 | root_extra_deps = [ "//electron/spec-chromium:spec" ] 2 | 3 | dcheck_always_on = true 4 | is_debug = false 5 | is_component_build = false 6 | is_component_ffmpeg = false 7 | symbol_level = 1 8 | -------------------------------------------------------------------------------- /build/config/BUILD.gn: -------------------------------------------------------------------------------- 1 | # For MAS build, we force defining "MAS_BUILD". 2 | config("mas_build") { 3 | if (is_mas_build) { 4 | defines = [ "IS_MAS_BUILD()=1" ] 5 | } else { 6 | defines = [ "IS_MAS_BUILD()=0" ] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /build/electron.def: -------------------------------------------------------------------------------- 1 | ; This is to support renaming of electron.exe. node-gyp has hard-coded 2 | ; executable names which it will recognise as node. This module definition 3 | ; file claims that the electron executable is in fact named "node.exe", 4 | ; which is one of the executable names that node-gyp recognizes. 5 | ; See https://github.com/nodejs/node-gyp/commit/52ceec3a6d15de3a8f385f43dbe5ecf5456ad07a 6 | NAME node.exe 7 | -------------------------------------------------------------------------------- /build/generate-template.py: -------------------------------------------------------------------------------- 1 | import json 2 | import sys 3 | from string import Template 4 | 5 | inpath = sys.argv[1] 6 | outpath = sys.argv[2] 7 | argpaths = sys.argv[3:] 8 | 9 | with open(inpath, 'r') as infile, open(outpath, 'w') as outfile: 10 | data = {} 11 | for argpath in argpaths: 12 | with open(argpath, 'r') as argfile: 13 | data.update(json.load(argfile)) 14 | 15 | s = Template(infile.read()).substitute(data) 16 | outfile.write(s) 17 | -------------------------------------------------------------------------------- /build/run-in-dir.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import os 3 | 4 | def main(argv): 5 | cwd = argv[1] 6 | os.chdir(cwd) 7 | os.execv(sys.executable, [sys.executable] + argv[2:]) 8 | 9 | if __name__ == '__main__': 10 | main(sys.argv) 11 | -------------------------------------------------------------------------------- /build/run-node.py: -------------------------------------------------------------------------------- 1 | import os 2 | import subprocess 3 | import sys 4 | 5 | 6 | SOURCE_ROOT = os.path.dirname(os.path.dirname(__file__)) 7 | 8 | def main(): 9 | # Proxy all args to node script 10 | script = os.path.join(SOURCE_ROOT, sys.argv[1]) 11 | subprocess.check_call(['node', script] + [str(x) for x in sys.argv[2:]]) 12 | 13 | if __name__ == '__main__': 14 | sys.exit(main()) 15 | -------------------------------------------------------------------------------- /build/templates/version_string.tmpl: -------------------------------------------------------------------------------- 1 | $full_version -------------------------------------------------------------------------------- /build/webpack/webpack.config.asar.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./webpack.config.base')({ 2 | target: 'asar', 3 | alwaysHasNode: true, 4 | targetDeletesNodeGlobals: true 5 | }); 6 | -------------------------------------------------------------------------------- /build/webpack/webpack.config.browser.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./webpack.config.base')({ 2 | target: 'browser', 3 | alwaysHasNode: true 4 | }); 5 | -------------------------------------------------------------------------------- /build/webpack/webpack.config.isolated_renderer.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./webpack.config.base')({ 2 | target: 'isolated_renderer', 3 | alwaysHasNode: false, 4 | wrapInitWithTryCatch: true 5 | }); 6 | -------------------------------------------------------------------------------- /build/webpack/webpack.config.renderer.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./webpack.config.base')({ 2 | target: 'renderer', 3 | alwaysHasNode: true, 4 | targetDeletesNodeGlobals: true, 5 | wrapInitWithProfilingTimeout: true, 6 | wrapInitWithTryCatch: true 7 | }); 8 | -------------------------------------------------------------------------------- /build/webpack/webpack.config.sandboxed_renderer.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./webpack.config.base')({ 2 | target: 'sandboxed_renderer', 3 | alwaysHasNode: false, 4 | wrapInitWithProfilingTimeout: true, 5 | wrapInitWithTryCatch: true 6 | }); 7 | -------------------------------------------------------------------------------- /build/webpack/webpack.config.utility.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./webpack.config.base')({ 2 | target: 'utility', 3 | alwaysHasNode: true 4 | }); 5 | -------------------------------------------------------------------------------- /build/webpack/webpack.config.worker.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./webpack.config.base')({ 2 | target: 'worker', 3 | loadElectronFromAlternateTarget: 'renderer', 4 | alwaysHasNode: true, 5 | targetDeletesNodeGlobals: true, 6 | wrapInitWithTryCatch: true 7 | }); 8 | -------------------------------------------------------------------------------- /default_app/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": [ 3 | "unicorn" 4 | ], 5 | "rules": { 6 | "unicorn/prefer-node-protocol": "error" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /default_app/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/default_app/icon.png -------------------------------------------------------------------------------- /default_app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "electron", 3 | "productName": "Electron", 4 | "main": "main.js" 5 | } 6 | -------------------------------------------------------------------------------- /docs/api/structures/bluetooth-device.md: -------------------------------------------------------------------------------- 1 | # BluetoothDevice Object 2 | 3 | * `deviceName` string 4 | * `deviceId` string 5 | -------------------------------------------------------------------------------- /docs/api/structures/certificate-principal.md: -------------------------------------------------------------------------------- 1 | # CertificatePrincipal Object 2 | 3 | * `commonName` string - Common Name. 4 | * `organizations` string[] - Organization names. 5 | * `organizationUnits` string[] - Organization Unit names. 6 | * `locality` string - Locality. 7 | * `state` string - State or province. 8 | * `country` string - Country or region. 9 | -------------------------------------------------------------------------------- /docs/api/structures/cpu-usage.md: -------------------------------------------------------------------------------- 1 | # CPUUsage Object 2 | 3 | * `percentCPUUsage` number - Percentage of CPU used since the last call to getCPUUsage. 4 | First call returns 0. 5 | * `idleWakeupsPerSecond` number - The number of average idle CPU wakeups per second 6 | since the last call to getCPUUsage. First call returns 0. Will always return 0 on 7 | Windows. 8 | -------------------------------------------------------------------------------- /docs/api/structures/crash-report.md: -------------------------------------------------------------------------------- 1 | # CrashReport Object 2 | 3 | * `date` Date 4 | * `id` string 5 | -------------------------------------------------------------------------------- /docs/api/structures/extension-info.md: -------------------------------------------------------------------------------- 1 | # ExtensionInfo Object 2 | 3 | * `name` string 4 | * `version` string 5 | -------------------------------------------------------------------------------- /docs/api/structures/extension.md: -------------------------------------------------------------------------------- 1 | # Extension Object 2 | 3 | * `id` string 4 | * `manifest` any - Copy of the [extension's manifest data](https://developer.chrome.com/extensions/manifest). 5 | * `name` string 6 | * `path` string - The extension's file path. 7 | * `version` string 8 | * `url` string - The extension's `chrome-extension://` URL. 9 | -------------------------------------------------------------------------------- /docs/api/structures/file-filter.md: -------------------------------------------------------------------------------- 1 | # FileFilter Object 2 | 3 | * `name` string 4 | * `extensions` string[] 5 | -------------------------------------------------------------------------------- /docs/api/structures/file-path-with-headers.md: -------------------------------------------------------------------------------- 1 | # FilePathWithHeaders Object 2 | 3 | * `path` string - The path to the file to send. 4 | * `headers` Record (optional) - Additional headers to be sent. 5 | -------------------------------------------------------------------------------- /docs/api/structures/hid-device.md: -------------------------------------------------------------------------------- 1 | # HIDDevice Object 2 | 3 | * `deviceId` string - Unique identifier for the device. 4 | * `name` string - Name of the device. 5 | * `vendorId` Integer - The USB vendor ID. 6 | * `productId` Integer - The USB product ID. 7 | * `serialNumber` string (optional) - The USB device serial number. 8 | * `guid` string (optional) - Unique identifier for the HID interface. A device may have multiple HID interfaces. 9 | -------------------------------------------------------------------------------- /docs/api/structures/ipc-main-invoke-event.md: -------------------------------------------------------------------------------- 1 | # IpcMainInvokeEvent Object extends `Event` 2 | 3 | * `processId` Integer - The internal ID of the renderer process that sent this message 4 | * `frameId` Integer - The ID of the renderer frame that sent this message 5 | * `sender` [WebContents](../web-contents.md) - Returns the `webContents` that sent the message 6 | * `senderFrame` [WebFrameMain](../web-frame-main.md) _Readonly_ - The frame that sent this message 7 | -------------------------------------------------------------------------------- /docs/api/structures/keyboard-input-event.md: -------------------------------------------------------------------------------- 1 | # KeyboardInputEvent Object extends `InputEvent` 2 | 3 | * `type` string - The type of the event, can be `rawKeyDown`, `keyDown`, `keyUp` or `char`. 4 | * `keyCode` string - The character that will be sent 5 | as the keyboard event. Should only use the valid key codes in 6 | [Accelerator](../accelerator.md). 7 | -------------------------------------------------------------------------------- /docs/api/structures/memory-usage-details.md: -------------------------------------------------------------------------------- 1 | # MemoryUsageDetails Object 2 | 3 | * `count` number 4 | * `size` number 5 | * `liveSize` number 6 | -------------------------------------------------------------------------------- /docs/api/structures/mime-typed-buffer.md: -------------------------------------------------------------------------------- 1 | # MimeTypedBuffer Object 2 | 3 | * `mimeType` string (optional) - MIME type of the buffer. 4 | * `charset` string (optional) - Charset of the buffer. 5 | * `data` Buffer - The actual Buffer content. 6 | -------------------------------------------------------------------------------- /docs/api/structures/point.md: -------------------------------------------------------------------------------- 1 | # Point Object 2 | 3 | * `x` number 4 | * `y` number 5 | 6 | **Note:** Both `x` and `y` must be whole integers, when providing a point object 7 | as input to an Electron API we will automatically round your `x` and `y` values 8 | to the nearest whole integer. 9 | -------------------------------------------------------------------------------- /docs/api/structures/process-memory-info.md: -------------------------------------------------------------------------------- 1 | # ProcessMemoryInfo Object 2 | 3 | * `residentSet` Integer _Linux_ _Windows_ - The amount of memory 4 | currently pinned to actual physical RAM in Kilobytes. 5 | * `private` Integer - The amount of memory not shared by other processes, such as JS heap or HTML content in Kilobytes. 6 | * `shared` Integer - The amount of memory shared between processes, typically 7 | memory consumed by the Electron code itself in Kilobytes. 8 | -------------------------------------------------------------------------------- /docs/api/structures/product-subscription-period.md: -------------------------------------------------------------------------------- 1 | # ProductSubscriptionPeriod Object 2 | 3 | * `numberOfUnits` number - The number of units per subscription period. 4 | * `unit` string - The increment of time that a subscription period is specified in. Can be `day`, `week`, `month`, `year`. 5 | -------------------------------------------------------------------------------- /docs/api/structures/protocol-request.md: -------------------------------------------------------------------------------- 1 | # ProtocolRequest Object 2 | 3 | * `url` string 4 | * `referrer` string 5 | * `method` string 6 | * `uploadData` [UploadData[]](upload-data.md) (optional) 7 | * `headers` Record 8 | -------------------------------------------------------------------------------- /docs/api/structures/protocol-response-upload-data.md: -------------------------------------------------------------------------------- 1 | # ProtocolResponseUploadData Object 2 | 3 | * `contentType` string - MIME type of the content. 4 | * `data` string | Buffer - Content to be sent. 5 | -------------------------------------------------------------------------------- /docs/api/structures/rectangle.md: -------------------------------------------------------------------------------- 1 | # Rectangle Object 2 | 3 | * `x` number - The x coordinate of the origin of the rectangle (must be an integer). 4 | * `y` number - The y coordinate of the origin of the rectangle (must be an integer). 5 | * `width` number - The width of the rectangle (must be an integer). 6 | * `height` number - The height of the rectangle (must be an integer). 7 | -------------------------------------------------------------------------------- /docs/api/structures/referrer.md: -------------------------------------------------------------------------------- 1 | # Referrer Object 2 | 3 | * `url` string - HTTP Referrer URL. 4 | * `policy` string - Can be `default`, `unsafe-url`, 5 | `no-referrer-when-downgrade`, `no-referrer`, `origin`, 6 | `strict-origin-when-cross-origin`, `same-origin` or `strict-origin`. 7 | See the [Referrer-Policy spec][1] for more details on the 8 | meaning of these values. 9 | 10 | [1]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy 11 | -------------------------------------------------------------------------------- /docs/api/structures/resolved-endpoint.md: -------------------------------------------------------------------------------- 1 | # ResolvedEndpoint Object 2 | 3 | * `address` string 4 | * `family` string - One of the following: 5 | * `ipv4` - Corresponds to `AF_INET` 6 | * `ipv6` - Corresponds to `AF_INET6` 7 | * `unspec` - Corresponds to `AF_UNSPEC` 8 | -------------------------------------------------------------------------------- /docs/api/structures/resolved-host.md: -------------------------------------------------------------------------------- 1 | # ResolvedHost Object 2 | 3 | * `endpoints` [ResolvedEndpoint[]](resolved-endpoint.md) - resolved DNS entries for the hostname 4 | -------------------------------------------------------------------------------- /docs/api/structures/scrubber-item.md: -------------------------------------------------------------------------------- 1 | # ScrubberItem Object 2 | 3 | * `label` string (optional) - The text to appear in this item. 4 | * `icon` NativeImage (optional) - The image to appear in this item. 5 | -------------------------------------------------------------------------------- /docs/api/structures/segmented-control-segment.md: -------------------------------------------------------------------------------- 1 | # SegmentedControlSegment Object 2 | 3 | * `label` string (optional) - The text to appear in this segment. 4 | * `icon` NativeImage (optional) - The image to appear in this segment. 5 | * `enabled` boolean (optional) - Whether this segment is selectable. Default: true. 6 | -------------------------------------------------------------------------------- /docs/api/structures/service-worker-info.md: -------------------------------------------------------------------------------- 1 | # ServiceWorkerInfo Object 2 | 3 | * `scriptUrl` string - The full URL to the script that this service worker runs 4 | * `scope` string - The base URL that this service worker is active for. 5 | * `renderProcessId` number - The virtual ID of the process that this service worker is running in. This is not an OS level PID. This aligns with the ID set used for `webContents.getProcessId()`. 6 | -------------------------------------------------------------------------------- /docs/api/structures/shared-worker-info.md: -------------------------------------------------------------------------------- 1 | # SharedWorkerInfo Object 2 | 3 | * `id` string - The unique id of the shared worker. 4 | * `url` string - The url of the shared worker. 5 | -------------------------------------------------------------------------------- /docs/api/structures/sharing-item.md: -------------------------------------------------------------------------------- 1 | # SharingItem Object 2 | 3 | * `texts` string[] (optional) - An array of text to share. 4 | * `filePaths` string[] (optional) - An array of files to share. 5 | * `urls` string[] (optional) - An array of URLs to share. 6 | -------------------------------------------------------------------------------- /docs/api/structures/size.md: -------------------------------------------------------------------------------- 1 | # Size Object 2 | 3 | * `width` number 4 | * `height` number 5 | -------------------------------------------------------------------------------- /docs/api/structures/upload-data.md: -------------------------------------------------------------------------------- 1 | # UploadData Object 2 | 3 | * `bytes` Buffer - Content being sent. 4 | * `file` string (optional) - Path of file being uploaded. 5 | * `blobUUID` string (optional) - UUID of blob data. Use [ses.getBlobData](../session.md#sesgetblobdataidentifier) method 6 | to retrieve the data. 7 | -------------------------------------------------------------------------------- /docs/api/structures/upload-file.md: -------------------------------------------------------------------------------- 1 | # UploadFile Object 2 | 3 | * `type` 'file' - `file`. 4 | * `filePath` string - Path of file to be uploaded. 5 | * `offset` Integer (optional) - Defaults to `0`. 6 | * `length` Integer (optional) - Number of bytes to read from `offset`. 7 | Defaults to `0`. 8 | * `modificationTime` Double (optional) - Last Modification time in 9 | number of seconds since the UNIX epoch. Defaults to `0`. 10 | -------------------------------------------------------------------------------- /docs/api/structures/upload-raw-data.md: -------------------------------------------------------------------------------- 1 | # UploadRawData Object 2 | 3 | * `type` 'rawData' - `rawData`. 4 | * `bytes` Buffer - Data to be uploaded. 5 | -------------------------------------------------------------------------------- /docs/api/structures/user-default-types.md: -------------------------------------------------------------------------------- 1 | # UserDefaultTypes Object 2 | 3 | * `string` string 4 | * `boolean` boolean 5 | * `integer` number 6 | * `float` number 7 | * `double` number 8 | * `url` string 9 | * `array` Array\ 10 | * `dictionary` Record\ 11 | 12 | This type is a helper alias, no object will never exist of this type. 13 | -------------------------------------------------------------------------------- /docs/api/structures/web-source.md: -------------------------------------------------------------------------------- 1 | # WebSource Object 2 | 3 | * `code` string 4 | * `url` string (optional) 5 | -------------------------------------------------------------------------------- /docs/api/touch-bar-group.md: -------------------------------------------------------------------------------- 1 | ## Class: TouchBarGroup 2 | 3 | > Create a group in the touch bar for native macOS applications 4 | 5 | Process: [Main](../glossary.md#main-process)
6 | _This class is not exported from the `'electron'` module. It is only available as a return value of other methods in the Electron API._ 7 | 8 | ### `new TouchBarGroup(options)` 9 | 10 | * `options` Object 11 | * `items` [TouchBar](touch-bar.md) - Items to display as a group. 12 | -------------------------------------------------------------------------------- /docs/fiddles/features/dark-mode/preload.js: -------------------------------------------------------------------------------- 1 | const { contextBridge, ipcRenderer } = require('electron') 2 | 3 | contextBridge.exposeInMainWorld('darkMode', { 4 | toggle: () => ipcRenderer.invoke('dark-mode:toggle'), 5 | system: () => ipcRenderer.invoke('dark-mode:system') 6 | }) 7 | -------------------------------------------------------------------------------- /docs/fiddles/features/dark-mode/styles.css: -------------------------------------------------------------------------------- 1 | :root { 2 | color-scheme: light dark; 3 | } 4 | 5 | @media (prefers-color-scheme: dark) { 6 | body { background: #333; color: white; } 7 | } 8 | 9 | @media (prefers-color-scheme: light) { 10 | body { background: #ddd; color: black; } 11 | } 12 | -------------------------------------------------------------------------------- /docs/fiddles/features/drag-and-drop/preload.js: -------------------------------------------------------------------------------- 1 | const { contextBridge, ipcRenderer } = require('electron') 2 | 3 | contextBridge.exposeInMainWorld('electron', { 4 | startDrag: (fileName) => { 5 | ipcRenderer.send('ondragstart', fileName) 6 | } 7 | }) 8 | -------------------------------------------------------------------------------- /docs/fiddles/features/drag-and-drop/renderer.js: -------------------------------------------------------------------------------- 1 | document.getElementById('drag1').ondragstart = (event) => { 2 | event.preventDefault() 3 | window.electron.startDrag('drag-and-drop-1.md') 4 | } 5 | 6 | document.getElementById('drag2').ondragstart = (event) => { 7 | event.preventDefault() 8 | window.electron.startDrag('drag-and-drop-2.md') 9 | } 10 | -------------------------------------------------------------------------------- /docs/fiddles/features/keyboard-shortcuts/global/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Hello World! 6 | 7 | 8 | 9 |

Hello World!

10 |

Hit Alt+Ctrl+I on Windows or Opt+Cmd+I on Mac to see a message printed to the console.

11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/fiddles/features/keyboard-shortcuts/interception-from-main/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Hello World! 6 | 7 | 8 | 9 |

Hello World!

10 |

Hit Ctrl+I to see a message printed to the console.

11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/fiddles/features/keyboard-shortcuts/local/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Hello World! 6 | 7 | 8 | 9 |

Hello World!

10 |

Hit Alt+Shift+I on Windows, or Opt+Cmd+I on mac to see a message printed to the console.

11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/fiddles/features/keyboard-shortcuts/web-apis/renderer.js: -------------------------------------------------------------------------------- 1 | function handleKeyPress (event) { 2 | // You can put code here to handle the keypress. 3 | document.getElementById('last-keypress').innerText = event.key 4 | console.log(`You pressed ${event.key}`) 5 | } 6 | 7 | window.addEventListener('keyup', handleKeyPress, true) 8 | -------------------------------------------------------------------------------- /docs/fiddles/features/macos-dock-menu/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Hello World! 6 | 7 | 8 | 9 |

Hello World!

10 |

Right click the dock icon to see the custom menu options.

11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/fiddles/features/notifications/main/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Hello World! 6 | 7 | 8 | 9 |

Hello World!

10 |

After launching this application, you should see the system notification.

11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/fiddles/features/notifications/renderer/renderer.js: -------------------------------------------------------------------------------- 1 | const NOTIFICATION_TITLE = 'Title' 2 | const NOTIFICATION_BODY = 'Notification from the Renderer process. Click to log to console.' 3 | const CLICK_MESSAGE = 'Notification clicked!' 4 | 5 | new window.Notification(NOTIFICATION_TITLE, { body: NOTIFICATION_BODY }) 6 | .onclick = () => { document.getElementById('output').innerText = CLICK_MESSAGE } 7 | -------------------------------------------------------------------------------- /docs/fiddles/features/online-detection/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Hello World! 6 | 7 | 8 | 9 |

Connection status:

10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /docs/fiddles/features/online-detection/renderer.js: -------------------------------------------------------------------------------- 1 | function onlineStatusIndicator () { 2 | document.getElementById('status').innerHTML = navigator.onLine ? 'online' : 'offline' 3 | } 4 | 5 | window.addEventListener('online', onlineStatusIndicator) 6 | window.addEventListener('offline', onlineStatusIndicator) 7 | 8 | onlineStatusIndicator() 9 | -------------------------------------------------------------------------------- /docs/fiddles/features/web-bluetooth/preload.js: -------------------------------------------------------------------------------- 1 | const { contextBridge, ipcRenderer } = require('electron') 2 | 3 | contextBridge.exposeInMainWorld('electronAPI', { 4 | cancelBluetoothRequest: (callback) => ipcRenderer.send('cancel-bluetooth-request', callback), 5 | bluetoothPairingRequest: (callback) => ipcRenderer.on('bluetooth-pairing-request', callback), 6 | bluetoothPairingResponse: (response) => ipcRenderer.send('bluetooth-pairing-response', response) 7 | }) 8 | -------------------------------------------------------------------------------- /docs/fiddles/ipc/pattern-1/preload.js: -------------------------------------------------------------------------------- 1 | const { contextBridge, ipcRenderer } = require('electron') 2 | 3 | contextBridge.exposeInMainWorld('electronAPI', { 4 | setTitle: (title) => ipcRenderer.send('set-title', title) 5 | }) 6 | -------------------------------------------------------------------------------- /docs/fiddles/ipc/pattern-1/renderer.js: -------------------------------------------------------------------------------- 1 | const setButton = document.getElementById('btn') 2 | const titleInput = document.getElementById('title') 3 | setButton.addEventListener('click', () => { 4 | const title = titleInput.value 5 | window.electronAPI.setTitle(title) 6 | }) 7 | -------------------------------------------------------------------------------- /docs/fiddles/ipc/pattern-2/preload.js: -------------------------------------------------------------------------------- 1 | const { contextBridge, ipcRenderer } = require('electron') 2 | 3 | contextBridge.exposeInMainWorld('electronAPI', { 4 | openFile: () => ipcRenderer.invoke('dialog:openFile') 5 | }) 6 | -------------------------------------------------------------------------------- /docs/fiddles/ipc/pattern-2/renderer.js: -------------------------------------------------------------------------------- 1 | const btn = document.getElementById('btn') 2 | const filePathElement = document.getElementById('filePath') 3 | 4 | btn.addEventListener('click', async () => { 5 | const filePath = await window.electronAPI.openFile() 6 | filePathElement.innerText = filePath 7 | }) 8 | -------------------------------------------------------------------------------- /docs/fiddles/ipc/pattern-3/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Menu Counter 8 | 9 | 10 | Current value: 0 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /docs/fiddles/ipc/pattern-3/preload.js: -------------------------------------------------------------------------------- 1 | const { contextBridge, ipcRenderer } = require('electron') 2 | 3 | contextBridge.exposeInMainWorld('electronAPI', { 4 | handleCounter: (callback) => ipcRenderer.on('update-counter', callback) 5 | }) 6 | -------------------------------------------------------------------------------- /docs/fiddles/ipc/pattern-3/renderer.js: -------------------------------------------------------------------------------- 1 | const counter = document.getElementById('counter') 2 | 3 | window.electronAPI.handleCounter((event, value) => { 4 | const oldValue = Number(counter.innerText) 5 | const newValue = oldValue + value 6 | counter.innerText = newValue 7 | event.sender.send('counter-value', newValue) 8 | }) 9 | -------------------------------------------------------------------------------- /docs/fiddles/ipc/webview-new-window/child.html: -------------------------------------------------------------------------------- 1 | 2 | new window 3 | 4 | -------------------------------------------------------------------------------- /docs/fiddles/ipc/webview-new-window/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /docs/fiddles/ipc/webview-new-window/preload.js: -------------------------------------------------------------------------------- 1 | const { ipcRenderer } = require('electron') 2 | const webview = document.getElementById('webview') 3 | ipcRenderer.on('webview-new-window', (e, webContentsId, details) => { 4 | console.log('webview-new-window', webContentsId, details) 5 | webview.dispatchEvent(new Event('new-window')) 6 | }) 7 | -------------------------------------------------------------------------------- /docs/fiddles/ipc/webview-new-window/renderer.js: -------------------------------------------------------------------------------- 1 | const webview = document.getElementById('webview') 2 | webview.addEventListener('new-window', () => { 3 | console.log('got new-window event') 4 | }) 5 | -------------------------------------------------------------------------------- /docs/fiddles/menus/customize-menus/renderer.js: -------------------------------------------------------------------------------- 1 | const { ipcRenderer } = require('electron') 2 | 3 | // Tell main process to show the menu when demo button is clicked 4 | const contextMenuBtn = document.getElementById('context-menu') 5 | 6 | contextMenuBtn.addEventListener('click', () => { 7 | ipcRenderer.send('show-context-menu') 8 | }) 9 | -------------------------------------------------------------------------------- /docs/fiddles/native-ui/dialogs/error-dialog/renderer.js: -------------------------------------------------------------------------------- 1 | const { ipcRenderer } = require('electron') 2 | 3 | const errorBtn = document.getElementById('error-dialog') 4 | 5 | errorBtn.addEventListener('click', event => { 6 | ipcRenderer.send('open-error-dialog') 7 | }) 8 | -------------------------------------------------------------------------------- /docs/fiddles/native-ui/dialogs/open-file-or-directory/renderer.js: -------------------------------------------------------------------------------- 1 | const { ipcRenderer } = require('electron') 2 | 3 | const selectDirBtn = document.getElementById('select-directory') 4 | 5 | selectDirBtn.addEventListener('click', event => { 6 | ipcRenderer.send('open-file-dialog') 7 | }) 8 | 9 | ipcRenderer.on('selected-directory', (event, path) => { 10 | document.getElementById('selected-file').innerHTML = `You selected: ${path}` 11 | }) 12 | -------------------------------------------------------------------------------- /docs/fiddles/native-ui/dialogs/save-dialog/renderer.js: -------------------------------------------------------------------------------- 1 | const { ipcRenderer } = require('electron') 2 | 3 | const saveBtn = document.getElementById('save-dialog') 4 | 5 | saveBtn.addEventListener('click', event => { 6 | ipcRenderer.send('save-dialog') 7 | }) 8 | 9 | ipcRenderer.on('saved-file', (event, path) => { 10 | if (!path) path = 'No path' 11 | document.getElementById('file-saved').innerHTML = `Path selected: ${path}` 12 | }) 13 | -------------------------------------------------------------------------------- /docs/fiddles/native-ui/drag-and-drop/renderer.js: -------------------------------------------------------------------------------- 1 | const { ipcRenderer } = require('electron') 2 | 3 | const dragFileLink = document.getElementById('drag-file-link') 4 | 5 | dragFileLink.addEventListener('dragstart', event => { 6 | event.preventDefault() 7 | ipcRenderer.send('ondragstart', __filename) 8 | }) 9 | -------------------------------------------------------------------------------- /docs/fiddles/quick-start/preload.js: -------------------------------------------------------------------------------- 1 | window.addEventListener('DOMContentLoaded', () => { 2 | const replaceText = (selector, text) => { 3 | const element = document.getElementById(selector) 4 | if (element) element.innerText = text 5 | } 6 | 7 | for (const type of ['chrome', 'node', 'electron']) { 8 | replaceText(`${type}-version`, process.versions[type]) 9 | } 10 | }) 11 | -------------------------------------------------------------------------------- /docs/fiddles/system/clipboard/copy/preload.js: -------------------------------------------------------------------------------- 1 | const { contextBridge, ipcRenderer } = require('electron') 2 | 3 | contextBridge.exposeInMainWorld('clipboard', { 4 | writeText: (text) => ipcRenderer.invoke('clipboard:writeText', text) 5 | }) 6 | -------------------------------------------------------------------------------- /docs/fiddles/system/clipboard/copy/renderer.js: -------------------------------------------------------------------------------- 1 | const copyBtn = document.getElementById('copy-to') 2 | const copyInput = document.getElementById('copy-to-input') 3 | 4 | copyBtn.addEventListener('click', () => { 5 | if (copyInput.value !== '') copyInput.value = '' 6 | copyInput.placeholder = 'Copied! Paste here to see.' 7 | window.clipboard.writeText('Electron Demo!') 8 | }) 9 | -------------------------------------------------------------------------------- /docs/fiddles/system/clipboard/paste/preload.js: -------------------------------------------------------------------------------- 1 | const { contextBridge, ipcRenderer } = require('electron') 2 | 3 | contextBridge.exposeInMainWorld('clipboard', { 4 | readText: () => ipcRenderer.invoke('clipboard:readText'), 5 | writeText: (text) => ipcRenderer.invoke('clipboard:writeText', text) 6 | }) 7 | -------------------------------------------------------------------------------- /docs/fiddles/system/clipboard/paste/renderer.js: -------------------------------------------------------------------------------- 1 | const pasteBtn = document.getElementById('paste-to') 2 | 3 | pasteBtn.addEventListener('click', async () => { 4 | await window.clipboard.writeText('What a demo!') 5 | const message = `Clipboard contents: ${await window.clipboard.readText()}` 6 | document.getElementById('paste-from').innerHTML = message 7 | }) 8 | -------------------------------------------------------------------------------- /docs/fiddles/system/protocol-handler/launch-app-from-URL-in-another-app/renderer.js: -------------------------------------------------------------------------------- 1 | // This file is required by the index.html file and will 2 | // be executed in the renderer process for that window. 3 | // All APIs exposed by the context bridge are available here. 4 | 5 | // Binds the buttons to the context bridge API. 6 | document.getElementById('open-in-browser').addEventListener('click', () => { 7 | window.shell.open() 8 | }) 9 | -------------------------------------------------------------------------------- /docs/fiddles/system/system-app-user-information/app-information/renderer.js: -------------------------------------------------------------------------------- 1 | const { ipcRenderer } = require('electron') 2 | 3 | const appInfoBtn = document.getElementById('app-info') 4 | 5 | appInfoBtn.addEventListener('click', async () => { 6 | const path = await ipcRenderer.invoke('get-app-path') 7 | const message = `This app is located at: ${path}` 8 | document.getElementById('got-app-info').innerHTML = message 9 | }) 10 | -------------------------------------------------------------------------------- /docs/fiddles/system/system-information/get-version-information/renderer.js: -------------------------------------------------------------------------------- 1 | const versionInfoBtn = document.getElementById('version-info') 2 | 3 | const electronVersion = process.versions.electron 4 | 5 | versionInfoBtn.addEventListener('click', () => { 6 | const message = `This app is using Electron version: ${electronVersion}` 7 | document.getElementById('got-version-info').innerHTML = message 8 | }) 9 | -------------------------------------------------------------------------------- /docs/fiddles/tutorial-preload/preload.js: -------------------------------------------------------------------------------- 1 | const { contextBridge } = require('electron') 2 | 3 | contextBridge.exposeInMainWorld('versions', { 4 | node: () => process.versions.node, 5 | chrome: () => process.versions.chrome, 6 | electron: () => process.versions.electron 7 | }) 8 | -------------------------------------------------------------------------------- /docs/fiddles/tutorial-preload/renderer.js: -------------------------------------------------------------------------------- 1 | const information = document.getElementById('info') 2 | information.innerText = `This app is using Chrome (v${window.versions.chrome()}), Node.js (v${window.versions.node()}), and Electron (v${window.versions.electron()})` 3 | -------------------------------------------------------------------------------- /docs/fiddles/windows/crashes-and-hangs/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/docs/fiddles/windows/crashes-and-hangs/.keep -------------------------------------------------------------------------------- /docs/fiddles/windows/manage-windows/frameless-window/renderer.js: -------------------------------------------------------------------------------- 1 | const { ipcRenderer } = require('electron') 2 | 3 | const newWindowBtn = document.getElementById('frameless-window') 4 | 5 | newWindowBtn.addEventListener('click', () => { 6 | const url = 'data:text/html,

Hello World!

Close this Window' 7 | ipcRenderer.send('create-frameless-window', { url }) 8 | }) 9 | -------------------------------------------------------------------------------- /docs/fiddles/windows/manage-windows/new-window/renderer.js: -------------------------------------------------------------------------------- 1 | const { ipcRenderer } = require('electron') 2 | 3 | const newWindowBtn = document.getElementById('new-window') 4 | 5 | newWindowBtn.addEventListener('click', (event) => { 6 | const url = 'https://electronjs.org' 7 | ipcRenderer.send('new-window', { url, width: 400, height: 320 }) 8 | }) 9 | -------------------------------------------------------------------------------- /docs/images/chrome-processes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/docs/images/chrome-processes.png -------------------------------------------------------------------------------- /docs/images/connection-status.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/docs/images/connection-status.png -------------------------------------------------------------------------------- /docs/images/dark_mode.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/docs/images/dark_mode.gif -------------------------------------------------------------------------------- /docs/images/dock-progress-bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/docs/images/dock-progress-bar.png -------------------------------------------------------------------------------- /docs/images/drag-and-drop.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/docs/images/drag-and-drop.gif -------------------------------------------------------------------------------- /docs/images/gatekeeper.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/docs/images/gatekeeper.png -------------------------------------------------------------------------------- /docs/images/linux-progress-bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/docs/images/linux-progress-bar.png -------------------------------------------------------------------------------- /docs/images/local-shortcut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/docs/images/local-shortcut.png -------------------------------------------------------------------------------- /docs/images/macos-dock-menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/docs/images/macos-dock-menu.png -------------------------------------------------------------------------------- /docs/images/macos-progress-bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/docs/images/macos-progress-bar.png -------------------------------------------------------------------------------- /docs/images/mission-control-progress-bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/docs/images/mission-control-progress-bar.png -------------------------------------------------------------------------------- /docs/images/performance-cpu-prof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/docs/images/performance-cpu-prof.png -------------------------------------------------------------------------------- /docs/images/performance-heap-prof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/docs/images/performance-heap-prof.png -------------------------------------------------------------------------------- /docs/images/preload-example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/docs/images/preload-example.png -------------------------------------------------------------------------------- /docs/images/recent-documents.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/docs/images/recent-documents.png -------------------------------------------------------------------------------- /docs/images/represented-file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/docs/images/represented-file.png -------------------------------------------------------------------------------- /docs/images/simplest-electron-app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/docs/images/simplest-electron-app.png -------------------------------------------------------------------------------- /docs/images/subpixel-rendering-screenshot.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/docs/images/subpixel-rendering-screenshot.gif -------------------------------------------------------------------------------- /docs/images/versioning-sketch-0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/docs/images/versioning-sketch-0.png -------------------------------------------------------------------------------- /docs/images/versioning-sketch-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/docs/images/versioning-sketch-1.png -------------------------------------------------------------------------------- /docs/images/versioning-sketch-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/docs/images/versioning-sketch-2.png -------------------------------------------------------------------------------- /docs/images/versioning-sketch-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/docs/images/versioning-sketch-3.png -------------------------------------------------------------------------------- /docs/images/versioning-sketch-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/docs/images/versioning-sketch-4.png -------------------------------------------------------------------------------- /docs/images/versioning-sketch-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/docs/images/versioning-sketch-5.png -------------------------------------------------------------------------------- /docs/images/versioning-sketch-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/docs/images/versioning-sketch-6.png -------------------------------------------------------------------------------- /docs/images/versioning-sketch-7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/docs/images/versioning-sketch-7.png -------------------------------------------------------------------------------- /docs/images/vs-options-debugging-symbols.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/docs/images/vs-options-debugging-symbols.png -------------------------------------------------------------------------------- /docs/images/vs-tools-options.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/docs/images/vs-tools-options.png -------------------------------------------------------------------------------- /docs/images/web-contents-text-selection-after.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/docs/images/web-contents-text-selection-after.png -------------------------------------------------------------------------------- /docs/images/web-contents-text-selection-before.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/docs/images/web-contents-text-selection-before.png -------------------------------------------------------------------------------- /docs/images/windows-progress-bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/docs/images/windows-progress-bar.png -------------------------------------------------------------------------------- /docs/images/windows-taskbar-icon-overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/docs/images/windows-taskbar-icon-overlay.png -------------------------------------------------------------------------------- /docs/images/windows-taskbar-jumplist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/docs/images/windows-taskbar-jumplist.png -------------------------------------------------------------------------------- /docs/images/windows-taskbar-thumbnail-toolbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/docs/images/windows-taskbar-thumbnail-toolbar.png -------------------------------------------------------------------------------- /docs/tutorial/support.md: -------------------------------------------------------------------------------- 1 | # This doc has moved! 2 | 3 | * For information on supported releases, see the [Electron Releases](./electron-timelines.md) doc. 4 | * For community support on Electron, see the [Community page](https://www.electronjs.org/community). 5 | * For platform support info, see the [README](https://github.com/electron/electron/blob/main/README.md). 6 | -------------------------------------------------------------------------------- /docs/tutorial/using-pepper-flash-plugin.md: -------------------------------------------------------------------------------- 1 | # Pepper Flash Plugin 2 | 3 | Electron no longer supports the Pepper Flash plugin, as Chrome has removed support. 4 | 5 | See [Chromium's Flash Roadmap](https://www.chromium.org/flash-roadmap) for more 6 | details. 7 | -------------------------------------------------------------------------------- /filenames.libcxxabi.gni: -------------------------------------------------------------------------------- 1 | libcxxabi_headers = [ 2 | "//third_party/libc++abi/src/include/CMakeLists.txt", 3 | "//third_party/libc++abi/src/include/__cxxabi_config.h", 4 | "//third_party/libc++abi/src/include/cxxabi.h", 5 | ] 6 | 7 | libcxxabi_licenses = [ "//third_party/libc++abi/src/LICENSE.TXT" ] 8 | -------------------------------------------------------------------------------- /lib/asar/init.ts: -------------------------------------------------------------------------------- 1 | import { wrapFsWithAsar } from './fs-wrapper'; 2 | 3 | wrapFsWithAsar(require('fs')); 4 | -------------------------------------------------------------------------------- /lib/browser/api/auto-updater.ts: -------------------------------------------------------------------------------- 1 | if (process.platform === 'win32') { 2 | module.exports = require('./auto-updater/auto-updater-win'); 3 | } else { 4 | module.exports = require('./auto-updater/auto-updater-native'); 5 | } 6 | -------------------------------------------------------------------------------- /lib/browser/api/auto-updater/auto-updater-native.ts: -------------------------------------------------------------------------------- 1 | const { autoUpdater } = process._linkedBinding('electron_browser_auto_updater'); 2 | 3 | export default autoUpdater; 4 | -------------------------------------------------------------------------------- /lib/browser/api/browser-view.ts: -------------------------------------------------------------------------------- 1 | const { BrowserView } = process._linkedBinding('electron_browser_browser_view'); 2 | 3 | export default BrowserView; 4 | -------------------------------------------------------------------------------- /lib/browser/api/clipboard.ts: -------------------------------------------------------------------------------- 1 | const clipboard = process._linkedBinding('electron_common_clipboard'); 2 | 3 | export default clipboard; 4 | -------------------------------------------------------------------------------- /lib/browser/api/content-tracing.ts: -------------------------------------------------------------------------------- 1 | export default process._linkedBinding('electron_browser_content_tracing'); 2 | -------------------------------------------------------------------------------- /lib/browser/api/exports/electron.ts: -------------------------------------------------------------------------------- 1 | import { defineProperties } from '@electron/internal/common/define-properties'; 2 | import { commonModuleList } from '@electron/internal/common/api/module-list'; 3 | import { browserModuleList } from '@electron/internal/browser/api/module-list'; 4 | 5 | module.exports = {}; 6 | 7 | defineProperties(module.exports, commonModuleList); 8 | defineProperties(module.exports, browserModuleList); 9 | -------------------------------------------------------------------------------- /lib/browser/api/global-shortcut.ts: -------------------------------------------------------------------------------- 1 | const { globalShortcut } = process._linkedBinding('electron_browser_global_shortcut'); 2 | export default globalShortcut; 3 | -------------------------------------------------------------------------------- /lib/browser/api/ipc-main.ts: -------------------------------------------------------------------------------- 1 | import { IpcMainImpl } from '@electron/internal/browser/ipc-main-impl'; 2 | 3 | const ipcMain = new IpcMainImpl(); 4 | 5 | export default ipcMain; 6 | -------------------------------------------------------------------------------- /lib/browser/api/native-theme.ts: -------------------------------------------------------------------------------- 1 | const { nativeTheme } = process._linkedBinding('electron_browser_native_theme'); 2 | 3 | module.exports = nativeTheme; 4 | -------------------------------------------------------------------------------- /lib/browser/api/notification.ts: -------------------------------------------------------------------------------- 1 | const { 2 | Notification: ElectronNotification, 3 | isSupported 4 | } = process._linkedBinding('electron_browser_notification'); 5 | 6 | ElectronNotification.isSupported = isSupported; 7 | 8 | export default ElectronNotification; 9 | -------------------------------------------------------------------------------- /lib/browser/api/power-save-blocker.ts: -------------------------------------------------------------------------------- 1 | const { powerSaveBlocker } = process._linkedBinding('electron_browser_power_save_blocker'); 2 | export default powerSaveBlocker; 3 | -------------------------------------------------------------------------------- /lib/browser/api/push-notifications.ts: -------------------------------------------------------------------------------- 1 | const { pushNotifications } = process._linkedBinding('electron_browser_push_notifications'); 2 | 3 | export default pushNotifications; 4 | -------------------------------------------------------------------------------- /lib/browser/api/safe-storage.ts: -------------------------------------------------------------------------------- 1 | const safeStorage = process._linkedBinding('electron_browser_safe_storage'); 2 | 3 | module.exports = safeStorage; 4 | -------------------------------------------------------------------------------- /lib/browser/api/tray.ts: -------------------------------------------------------------------------------- 1 | const { Tray } = process._linkedBinding('electron_browser_tray'); 2 | 3 | export default Tray; 4 | -------------------------------------------------------------------------------- /lib/browser/api/view.ts: -------------------------------------------------------------------------------- 1 | const { View } = process._linkedBinding('electron_browser_view'); 2 | 3 | export default View; 4 | -------------------------------------------------------------------------------- /lib/browser/api/views/image-view.ts: -------------------------------------------------------------------------------- 1 | import { View } from 'electron/main'; 2 | 3 | const { ImageView } = process._linkedBinding('electron_browser_image_view'); 4 | 5 | Object.setPrototypeOf(ImageView.prototype, View.prototype); 6 | 7 | export default ImageView; 8 | -------------------------------------------------------------------------------- /lib/browser/api/web-contents-view.ts: -------------------------------------------------------------------------------- 1 | import { View } from 'electron/main'; 2 | 3 | const { WebContentsView } = process._linkedBinding('electron_browser_web_contents_view'); 4 | 5 | Object.setPrototypeOf(WebContentsView.prototype, View.prototype); 6 | 7 | export default WebContentsView; 8 | -------------------------------------------------------------------------------- /lib/browser/ipc-main-internal.ts: -------------------------------------------------------------------------------- 1 | import { IpcMainImpl } from '@electron/internal/browser/ipc-main-impl'; 2 | 3 | export const ipcMainInternal = new IpcMainImpl() as ElectronInternal.IpcMainInternal; 4 | -------------------------------------------------------------------------------- /lib/common/api/module-list.ts: -------------------------------------------------------------------------------- 1 | // Common modules, please sort alphabetically 2 | export const commonModuleList: ElectronInternal.ModuleEntry[] = [ 3 | { name: 'nativeImage', loader: () => require('./native-image') }, 4 | { name: 'shell', loader: () => require('./shell') } 5 | ]; 6 | -------------------------------------------------------------------------------- /lib/common/api/native-image.ts: -------------------------------------------------------------------------------- 1 | const { nativeImage } = process._linkedBinding('electron_common_native_image'); 2 | 3 | export default nativeImage; 4 | -------------------------------------------------------------------------------- /lib/common/api/shell.ts: -------------------------------------------------------------------------------- 1 | const shell = process._linkedBinding('electron_common_shell'); 2 | 3 | export default shell; 4 | -------------------------------------------------------------------------------- /lib/common/webpack-globals-provider.ts: -------------------------------------------------------------------------------- 1 | // Captures original globals into a scope to ensure that userland modifications do 2 | // not impact Electron. Note that users doing: 3 | // 4 | // global.Promise.resolve = myFn 5 | // 6 | // Will mutate this captured one as well and that is OK. 7 | 8 | export const Promise = global.Promise; 9 | -------------------------------------------------------------------------------- /lib/isolated_renderer/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-restricted-imports": [ 4 | "error", 5 | { 6 | "paths": [ 7 | "electron", 8 | "electron/main" 9 | ], 10 | "patterns": [ 11 | "./*", 12 | "../*", 13 | "@electron/internal/browser/*" 14 | ] 15 | } 16 | ] 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/renderer/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-restricted-imports": [ 4 | "error", 5 | { 6 | "paths": [ 7 | "electron", 8 | "electron/main" 9 | ], 10 | "patterns": [ 11 | "./*", 12 | "../*", 13 | "@electron/internal/browser/*" 14 | ] 15 | } 16 | ] 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/renderer/api/crash-reporter.ts: -------------------------------------------------------------------------------- 1 | const binding = process._linkedBinding('electron_renderer_crash_reporter'); 2 | 3 | export default { 4 | addExtraParameter (key: string, value: string) { 5 | binding.addExtraParameter(key, value); 6 | }, 7 | 8 | removeExtraParameter (key: string) { 9 | binding.removeExtraParameter(key); 10 | }, 11 | 12 | getParameters () { 13 | return binding.getParameters(); 14 | } 15 | }; 16 | -------------------------------------------------------------------------------- /lib/renderer/api/exports/electron.ts: -------------------------------------------------------------------------------- 1 | import { defineProperties } from '@electron/internal/common/define-properties'; 2 | import { commonModuleList } from '@electron/internal/common/api/module-list'; 3 | import { rendererModuleList } from '@electron/internal/renderer/api/module-list'; 4 | 5 | module.exports = {}; 6 | 7 | defineProperties(module.exports, commonModuleList); 8 | defineProperties(module.exports, rendererModuleList); 9 | -------------------------------------------------------------------------------- /lib/renderer/api/web-frame.ts: -------------------------------------------------------------------------------- 1 | const { mainFrame } = process._linkedBinding('electron_renderer_web_frame'); 2 | 3 | export default mainFrame; 4 | -------------------------------------------------------------------------------- /lib/sandboxed_renderer/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-restricted-imports": [ 4 | "error", 5 | { 6 | "paths": [ 7 | "electron", 8 | "electron/main" 9 | ], 10 | "patterns": [ 11 | "./*", 12 | "../*", 13 | "@electron/internal/browser/*" 14 | ] 15 | } 16 | ] 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/sandboxed_renderer/api/exports/electron.ts: -------------------------------------------------------------------------------- 1 | import { defineProperties } from '@electron/internal/common/define-properties'; 2 | import { moduleList } from '@electron/internal/sandboxed_renderer/api/module-list'; 3 | 4 | module.exports = {}; 5 | 6 | defineProperties(module.exports, moduleList); 7 | -------------------------------------------------------------------------------- /lib/utility/api/exports/electron.ts: -------------------------------------------------------------------------------- 1 | import { defineProperties } from '@electron/internal/common/define-properties'; 2 | import { utilityNodeModuleList } from '@electron/internal/utility/api/module-list'; 3 | 4 | module.exports = {}; 5 | 6 | defineProperties(module.exports, utilityNodeModuleList); 7 | -------------------------------------------------------------------------------- /lib/utility/api/module-list.ts: -------------------------------------------------------------------------------- 1 | // Utility side modules, please sort alphabetically. 2 | export const utilityNodeModuleList: ElectronInternal.ModuleEntry[] = []; 3 | -------------------------------------------------------------------------------- /lib/worker/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-restricted-imports": [ 4 | "error", 5 | { 6 | "paths": [ 7 | "electron", 8 | "electron/main" 9 | ], 10 | "patterns": [ 11 | "./*", 12 | "../*", 13 | "@electron/internal/browser/*" 14 | ] 15 | } 16 | ] 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /npm/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "main": "index.js", 3 | "types": "electron.d.ts", 4 | "bin": { 5 | "electron": "cli.js" 6 | }, 7 | "scripts": { 8 | "postinstall": "node install.js" 9 | }, 10 | "dependencies": { 11 | "@electron/get": "^2.0.0", 12 | "@types/node": "^18.11.18", 13 | "extract-zip": "^2.0.1" 14 | }, 15 | "engines": { 16 | "node": ">= 12.20.55" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /patches/Mantle/.patches: -------------------------------------------------------------------------------- 1 | remove_mtlmanagedobjectadapter_h.patch 2 | -------------------------------------------------------------------------------- /patches/README.md: -------------------------------------------------------------------------------- 1 | See [/docs/development/patches.md](/docs/development/patches.md). 2 | -------------------------------------------------------------------------------- /patches/ReactiveObjC/.patches: -------------------------------------------------------------------------------- 1 | build_conditionally_import_ext_headers_from_framework_or_from.patch 2 | chore_explicitly_cast_long_max_to_double.patch 3 | -------------------------------------------------------------------------------- /patches/boringssl/.patches: -------------------------------------------------------------------------------- 1 | expose_ripemd160.patch 2 | revert_track_ssl_error_zero_return_explicitly.patch 3 | feat_expose_several_extra_cipher_functions.patch 4 | -------------------------------------------------------------------------------- /patches/devtools_frontend/.patches: -------------------------------------------------------------------------------- 1 | fix_expose_globals_to_allow_patching_devtools_dock.patch 2 | -------------------------------------------------------------------------------- /patches/ffmpeg/.patches: -------------------------------------------------------------------------------- 1 | link_with_loader_path.patch 2 | -------------------------------------------------------------------------------- /patches/nan/.patches: -------------------------------------------------------------------------------- 1 | use_new_constructor_for_scriptorigin_when_17_x.patch 2 | chore_remove_deprecated_accessorsignatures.patch 3 | -------------------------------------------------------------------------------- /patches/perfetto/.patches: -------------------------------------------------------------------------------- 1 | define_ssize_t_to_be_intptr_t_to_match_libuv.patch 2 | -------------------------------------------------------------------------------- /patches/v8/.patches: -------------------------------------------------------------------------------- 1 | build_gn.patch 2 | do_not_export_private_v8_symbols_on_windows.patch 3 | fix_build_deprecated_attribute_for_older_msvc_versions.patch 4 | chore_allow_customizing_microtask_policy_per_context.patch 5 | -------------------------------------------------------------------------------- /patches/webrtc/.patches: -------------------------------------------------------------------------------- 1 | fix_fallback_to_x11_capturer_on_wayland.patch 2 | fix_mark_pipewire_capturer_as_failed_after_session_is_closed.patch 3 | -------------------------------------------------------------------------------- /script/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": [ 3 | "unicorn" 4 | ], 5 | "rules": { 6 | "unicorn/prefer-node-protocol": "error" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /script/codesign/.gitignore: -------------------------------------------------------------------------------- 1 | .working -------------------------------------------------------------------------------- /script/codesign/codesign.cnf: -------------------------------------------------------------------------------- 1 | [req] 2 | default_bits = 4096 3 | encrypt_key = no 4 | default_md = sha512 5 | distinguished_name = req_distinguished_name 6 | prompt = no 7 | 8 | [req_distinguished_name] 9 | C = CA 10 | ST = BC 11 | L = Vancouver 12 | O = ElectronJS 13 | OU = BuildAutomation 14 | CN = codesign.electronjs.org 15 | 16 | [extended] 17 | keyUsage = critical,digitalSignature 18 | extendedKeyUsage = critical,codeSigning 19 | -------------------------------------------------------------------------------- /script/codesign/get-trusted-identity.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | valid_certs=$(security find-identity -p codesigning -v) 6 | if [[ $valid_certs == *"1)"* ]]; then 7 | first_valid_cert=$(echo $valid_certs | sed 's/ \".*//' | sed 's/.* //') 8 | echo $first_valid_cert 9 | exit 0 10 | else 11 | # No Certificate 12 | exit 0 13 | fi 14 | -------------------------------------------------------------------------------- /script/generate-zip-manifest.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import zipfile 4 | import sys 5 | 6 | def main(zip_path, manifest_out): 7 | with open(manifest_out, 'w') as manifest, \ 8 | zipfile.ZipFile(zip_path, 'r', allowZip64=True) as z: 9 | for name in sorted(z.namelist()): 10 | manifest.write(name + '\n') 11 | return 0 12 | 13 | if __name__ == '__main__': 14 | sys.exit(main(sys.argv[1], sys.argv[2])) 15 | -------------------------------------------------------------------------------- /script/gn-asar-hash.js: -------------------------------------------------------------------------------- 1 | const asar = require('@electron/asar'); 2 | const crypto = require('node:crypto'); 3 | const fs = require('node:fs'); 4 | 5 | const archive = process.argv[2]; 6 | const hashFile = process.argv[3]; 7 | 8 | const { headerString } = asar.getRawHeader(archive); 9 | fs.writeFileSync(hashFile, crypto.createHash('SHA256').update(headerString).digest('hex')); 10 | -------------------------------------------------------------------------------- /script/lib/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/script/lib/__init__.py -------------------------------------------------------------------------------- /script/lib/electron.gitattributes: -------------------------------------------------------------------------------- 1 | *.mm diff=objc 2 | *.m diff=objc 3 | -------------------------------------------------------------------------------- /script/lib/npm.py: -------------------------------------------------------------------------------- 1 | import subprocess 2 | import sys 3 | 4 | 5 | def npm(*npm_args): 6 | call_args = [__get_executable_name()] + list(npm_args) 7 | subprocess.check_call(call_args) 8 | 9 | 10 | def __get_executable_name(): 11 | executable = 'npm' 12 | if sys.platform == 'win32': 13 | executable += '.cmd' 14 | return executable 15 | 16 | 17 | if __name__ == '__main__': 18 | npm(*sys.argv[1:]) 19 | -------------------------------------------------------------------------------- /script/native-test-targets.json: -------------------------------------------------------------------------------- 1 | [ 2 | "shell_browser_ui_unittests" 3 | ] -------------------------------------------------------------------------------- /script/print-version.py: -------------------------------------------------------------------------------- 1 | from lib.util import get_electron_version 2 | 3 | print(get_electron_version()) 4 | -------------------------------------------------------------------------------- /script/release/notes/.gitignore: -------------------------------------------------------------------------------- 1 | .cache -------------------------------------------------------------------------------- /script/tar.py: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | import tarfile 4 | 5 | source = sys.argv[1] 6 | target = sys.argv[2] 7 | 8 | os.chdir(os.path.dirname(source)) 9 | 10 | tarball = tarfile.open(name=os.path.basename(target), mode='w:gz') 11 | tarball.add(os.path.relpath(source)) 12 | tarball.close() 13 | -------------------------------------------------------------------------------- /shell/app/BRANDING.json: -------------------------------------------------------------------------------- 1 | { 2 | "project_name": "electron", 3 | "product_name": "Electron", 4 | "mac_bundle_id": "com.github.Electron" 5 | } 6 | -------------------------------------------------------------------------------- /shell/app/node_main.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 GitHub, Inc. 2 | // Use of this source code is governed by the MIT license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef ELECTRON_SHELL_APP_NODE_MAIN_H_ 6 | #define ELECTRON_SHELL_APP_NODE_MAIN_H_ 7 | 8 | namespace electron { 9 | 10 | int NodeMain(int argc, char* argv[]); 11 | 12 | } // namespace electron 13 | 14 | #endif // ELECTRON_SHELL_APP_NODE_MAIN_H_ 15 | -------------------------------------------------------------------------------- /shell/app/uv_stdio_fix.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2022 Slack Technologies, Inc. 2 | // Use of this source code is governed by the MIT license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef ELECTRON_SHELL_APP_UV_STDIO_FIX_H_ 6 | #define ELECTRON_SHELL_APP_UV_STDIO_FIX_H_ 7 | 8 | void FixStdioStreams(); 9 | 10 | #endif // ELECTRON_SHELL_APP_UV_STDIO_FIX_H_ 11 | -------------------------------------------------------------------------------- /shell/browser/extensions/electron_display_info_provider.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include "shell/browser/extensions/electron_display_info_provider.h" 6 | 7 | namespace extensions { 8 | 9 | ElectronDisplayInfoProvider::ElectronDisplayInfoProvider() = default; 10 | 11 | } // namespace extensions 12 | -------------------------------------------------------------------------------- /shell/browser/feature_list.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019 GitHub, Inc. 2 | // Use of this source code is governed by the MIT license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef ELECTRON_SHELL_BROWSER_FEATURE_LIST_H_ 6 | #define ELECTRON_SHELL_BROWSER_FEATURE_LIST_H_ 7 | 8 | namespace electron { 9 | void InitializeFeatureList(); 10 | void InitializeFieldTrials(); 11 | } // namespace electron 12 | 13 | #endif // ELECTRON_SHELL_BROWSER_FEATURE_LIST_H_ 14 | -------------------------------------------------------------------------------- /shell/browser/native_window_features.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2022 Slack Technologies, Inc. 2 | // Use of this source code is governed by the MIT license that can be 3 | // found in the LICENSE file. 4 | 5 | #include "shell/browser/native_window_features.h" 6 | 7 | namespace features { 8 | const base::Feature kWaylandWindowDecorations{ 9 | "WaylandWindowDecorations", base::FEATURE_DISABLED_BY_DEFAULT}; 10 | } 11 | -------------------------------------------------------------------------------- /shell/browser/resources/mac/electron.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/shell/browser/resources/mac/electron.icns -------------------------------------------------------------------------------- /shell/browser/resources/win/electron.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/shell/browser/resources/win/electron.ico -------------------------------------------------------------------------------- /shell/browser/resources/win/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | 4 | #define IDR_MAINFRAME 1 5 | 6 | // Next default values for new objects 7 | // 8 | #ifdef APSTUDIO_INVOKED 9 | #ifndef APSTUDIO_READONLY_SYMBOLS 10 | #define _APS_NEXT_RESOURCE_VALUE 101 11 | #define _APS_NEXT_COMMAND_VALUE 40001 12 | #define _APS_NEXT_CONTROL_VALUE 1001 13 | #define _APS_NEXT_SYMED_VALUE 101 14 | #endif 15 | #endif 16 | -------------------------------------------------------------------------------- /shell/browser/ui/electron_gdk_pixbuf.sigs: -------------------------------------------------------------------------------- 1 | GdkPixbuf* gdk_pixbuf_new(GdkColorspace colorspace, gboolean has_alpha, int bits_per_sample, int width, int height) 2 | GdkPixbuf* gdk_pixbuf_scale_simple(const GdkPixbuf* src, int dest_width, int dest_height, GdkInterpType interp_type) 3 | guchar* gdk_pixbuf_get_pixels(const GdkPixbuf* pixbuf) 4 | -------------------------------------------------------------------------------- /shell/browser/ui/electron_gtk.fragment: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | -------------------------------------------------------------------------------- /spec-chromium/configs/browsertests.yml: -------------------------------------------------------------------------------- 1 | tests: 2 | - content_browsertests 3 | -------------------------------------------------------------------------------- /spec/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": true, 4 | "mocha": true, 5 | "serviceworker": true 6 | }, 7 | "globals": { 8 | "Bindings": true, 9 | "Components": true, 10 | "UI": true, 11 | "WebView": true 12 | }, 13 | "plugins": [ 14 | "mocha", 15 | "unicorn" 16 | ], 17 | "rules": { 18 | "mocha/no-exclusive-tests": "error", 19 | "unicorn/prefer-node-protocol": "error" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /spec/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules -------------------------------------------------------------------------------- /spec/ambient.d.ts: -------------------------------------------------------------------------------- 1 | declare let standardScheme: string; 2 | declare let serviceWorkerScheme: string; 3 | 4 | declare module 'dbus-native'; 5 | -------------------------------------------------------------------------------- /spec/api-view-spec.ts: -------------------------------------------------------------------------------- 1 | import { closeWindow } from './lib/window-helpers'; 2 | import { BaseWindow, View } from 'electron/main'; 3 | 4 | describe('View', () => { 5 | let w: BaseWindow; 6 | afterEach(async () => { 7 | await closeWindow(w as any); 8 | w = null as unknown as BaseWindow; 9 | }); 10 | 11 | it('can be used as content view', () => { 12 | w = new BaseWindow({ show: false }); 13 | w.setContentView(new View()); 14 | }); 15 | }); 16 | -------------------------------------------------------------------------------- /spec/fixtures/api/app-path/lib/index.js: -------------------------------------------------------------------------------- 1 | const { app } = require('electron'); 2 | 3 | const payload = { 4 | appPath: app.getAppPath() 5 | }; 6 | 7 | process.stdout.write(JSON.stringify(payload)); 8 | process.stdout.end(); 9 | 10 | process.exit(); 11 | -------------------------------------------------------------------------------- /spec/fixtures/api/app-path/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "electron-test-app-path", 3 | "main": "lib/index.js" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/api/beforeunload-empty-string.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /spec/fixtures/api/beforeunload-false.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /spec/fixtures/api/beforeunload-undefined.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /spec/fixtures/api/blank.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /spec/fixtures/api/close.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /spec/fixtures/api/command-line/main.js: -------------------------------------------------------------------------------- 1 | const { app } = require('electron'); 2 | 3 | app.whenReady().then(() => { 4 | const payload = { 5 | hasSwitch: app.commandLine.hasSwitch('foobar'), 6 | getSwitchValue: app.commandLine.getSwitchValue('foobar') 7 | }; 8 | 9 | process.stdout.write(JSON.stringify(payload)); 10 | process.stdout.end(); 11 | 12 | app.quit(); 13 | }); 14 | -------------------------------------------------------------------------------- /spec/fixtures/api/command-line/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "electron-test-command-line", 3 | "main": "main.js" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/api/context-bridge/can-bind-preload.js: -------------------------------------------------------------------------------- 1 | const { contextBridge, ipcRenderer } = require('electron'); 2 | 3 | console.info(contextBridge); 4 | 5 | let bound = false; 6 | try { 7 | contextBridge.exposeInMainWorld('test', {}); 8 | bound = true; 9 | } catch { 10 | // Ignore 11 | } 12 | 13 | ipcRenderer.send('context-bridge-bound', bound); 14 | -------------------------------------------------------------------------------- /spec/fixtures/api/context-bridge/context-bridge-mutability/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "electron-test-context-bridge-mutability", 3 | "main": "main.js" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/api/context-bridge/context-bridge-mutability/preload.js: -------------------------------------------------------------------------------- 1 | const { contextBridge } = require('electron'); 2 | 3 | contextBridge.exposeInMainWorld('str', 'some-text'); 4 | contextBridge.exposeInMainWorld('obj', { prop: 'obj-prop' }); 5 | contextBridge.exposeInMainWorld('arr', [1, 2, 3, 4]); 6 | -------------------------------------------------------------------------------- /spec/fixtures/api/context-bridge/empty.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spec/fixtures/api/cookie-app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "electron-test-cookie-app", 3 | "main": "main.js" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/api/default-menu/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "electron-test-default-menu", 3 | "main": "main.js" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/api/did-fail-load-iframe.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /spec/fixtures/api/electron-main-module/app.asar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/spec/fixtures/api/electron-main-module/app.asar -------------------------------------------------------------------------------- /spec/fixtures/api/electron-main-module/app/index.js: -------------------------------------------------------------------------------- 1 | try { 2 | require('some-module'); 3 | } catch (err) { 4 | console.error(err); 5 | process.exit(1); 6 | } 7 | 8 | process.exit(0); 9 | -------------------------------------------------------------------------------- /spec/fixtures/api/exit-closes-all-windows-app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "electron-exit-closes-all-windows", 3 | "main": "main.js" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/api/first-party-sets/base/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "electron-test-first-party-sets-base", 3 | "main": "main.js" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/api/first-party-sets/command-line/main.js: -------------------------------------------------------------------------------- 1 | const { app } = require('electron'); 2 | 3 | app.whenReady().then(function () { 4 | const hasSwitch = app.commandLine.hasSwitch('use-first-party-set'); 5 | const value = app.commandLine.getSwitchValue('use-first-party-set'); 6 | if (hasSwitch) { 7 | process.stdout.write(JSON.stringify(value)); 8 | process.stdout.end(); 9 | } 10 | 11 | app.quit(); 12 | }); 13 | -------------------------------------------------------------------------------- /spec/fixtures/api/first-party-sets/command-line/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "electron-test-first-party-sets-command-line", 3 | "main": "main.js" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/api/frame-subscriber.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 11 | 12 | -------------------------------------------------------------------------------- /spec/fixtures/api/globals.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Document 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /spec/fixtures/api/ipc-main-listeners/main.js: -------------------------------------------------------------------------------- 1 | const { app, ipcMain } = require('electron'); 2 | 3 | app.whenReady().then(() => { 4 | process.stdout.write(JSON.stringify(ipcMain.eventNames())); 5 | process.stdout.end(); 6 | 7 | app.quit(); 8 | }); 9 | -------------------------------------------------------------------------------- /spec/fixtures/api/ipc-main-listeners/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "electron-test-ipc-main-listeners", 3 | "main": "main.js" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/api/isolated-fetch-preload.js: -------------------------------------------------------------------------------- 1 | const { ipcRenderer } = require('electron'); 2 | 3 | // Ensure fetch works from isolated world origin 4 | fetch('https://localhost:1234').catch(err => { 5 | ipcRenderer.send('isolated-fetch-error', err.message); 6 | }); 7 | -------------------------------------------------------------------------------- /spec/fixtures/api/isolated-process.js: -------------------------------------------------------------------------------- 1 | const { ipcRenderer } = require('electron'); 2 | 3 | ipcRenderer.send('context-isolation', process.contextIsolated); 4 | -------------------------------------------------------------------------------- /spec/fixtures/api/loaded-from-dataurl.js: -------------------------------------------------------------------------------- 1 | window.ping = 'pong'; 2 | -------------------------------------------------------------------------------- /spec/fixtures/api/locale-check/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "electron-test-locale-check", 3 | "main": "main.js" 4 | } 5 | 6 | -------------------------------------------------------------------------------- /spec/fixtures/api/localstorage.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /spec/fixtures/api/mixed-sandbox-app/electron-app-mixed-sandbox-preload.js: -------------------------------------------------------------------------------- 1 | require('electron').ipcRenderer.send('argv', process.argv); 2 | -------------------------------------------------------------------------------- /spec/fixtures/api/mixed-sandbox-app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "electron-test-mixed-sandbox", 3 | "main": "main.js" 4 | } 5 | 6 | -------------------------------------------------------------------------------- /spec/fixtures/api/native-window-open-blank.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /spec/fixtures/api/native-window-open-child.html: -------------------------------------------------------------------------------- 1 |

Hello

2 | -------------------------------------------------------------------------------- /spec/fixtures/api/native-window-open-file.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spec/fixtures/api/native-window-open-iframe.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /spec/fixtures/api/native-window-open-isolated-preload.js: -------------------------------------------------------------------------------- 1 | const { ipcRenderer } = require('electron'); 2 | 3 | window.addEventListener('message', (event) => { 4 | ipcRenderer.send('answer', event.data); 5 | }); 6 | -------------------------------------------------------------------------------- /spec/fixtures/api/native-window-open-isolated.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /spec/fixtures/api/native-window-open-no-allowpopups.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /spec/fixtures/api/native-window-open-noopener.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | noopener example 4 | 5 | 10 | 11 | -------------------------------------------------------------------------------- /spec/fixtures/api/net-log/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "electron-test-net-log", 3 | "main": "main.js" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/api/new-window-preload.js: -------------------------------------------------------------------------------- 1 | const { ipcRenderer } = require('electron'); 2 | 3 | ipcRenderer.send('answer', { 4 | argv: process.argv 5 | }); 6 | window.close(); 7 | -------------------------------------------------------------------------------- /spec/fixtures/api/new-window-webview-preload.js: -------------------------------------------------------------------------------- 1 | const { ipcRenderer } = require('electron'); 2 | 3 | window.ipcRenderer = ipcRenderer; 4 | -------------------------------------------------------------------------------- /spec/fixtures/api/new-window.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /spec/fixtures/api/no-leak.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Document 5 | 6 | 7 | 16 | 17 | -------------------------------------------------------------------------------- /spec/fixtures/api/offscreen-rendering.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 11 | 12 | -------------------------------------------------------------------------------- /spec/fixtures/api/preload.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /spec/fixtures/api/quit-app/main.js: -------------------------------------------------------------------------------- 1 | const { app } = require('electron'); 2 | 3 | app.whenReady().then(function () { 4 | // This setImmediate call gets the spec passing on Linux 5 | setImmediate(function () { 6 | app.exit(123); 7 | }); 8 | }); 9 | 10 | process.on('exit', function (code) { 11 | console.log('Exit event with code: ' + code); 12 | }); 13 | -------------------------------------------------------------------------------- /spec/fixtures/api/quit-app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "electron-test-quit-app", 3 | "main": "main.js" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/api/relaunch/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "electron-test-relaunch", 3 | "main": "main.js" 4 | } 5 | 6 | -------------------------------------------------------------------------------- /spec/fixtures/api/safe-storage/decrypt-app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "electron-test-safe-storage", 3 | "main": "main.js" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/api/safe-storage/encrypt-app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "electron-test-safe-storage", 3 | "main": "main.js" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/api/send-sync-message.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /spec/fixtures/api/service-workers/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | -------------------------------------------------------------------------------- /spec/fixtures/api/service-workers/logs.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | -------------------------------------------------------------------------------- /spec/fixtures/api/service-workers/sw-logs.js: -------------------------------------------------------------------------------- 1 | self.addEventListener('install', function () { 2 | console.log('log log'); 3 | console.info('info log'); 4 | console.warn('warn log'); 5 | console.error('error log'); 6 | }); 7 | -------------------------------------------------------------------------------- /spec/fixtures/api/service-workers/sw.js: -------------------------------------------------------------------------------- 1 | self.addEventListener('install', function () { 2 | console.log('Installed'); 3 | }); 4 | -------------------------------------------------------------------------------- /spec/fixtures/api/shared-worker/shared-worker1.js: -------------------------------------------------------------------------------- 1 | self.onconnect = function (e) { 2 | const port = e.ports[0]; 3 | port.postMessage('ready'); 4 | }; 5 | -------------------------------------------------------------------------------- /spec/fixtures/api/shared-worker/shared-worker2.js: -------------------------------------------------------------------------------- 1 | self.onconnect = function (e) { 2 | const port = e.ports[0]; 3 | port.postMessage('ready'); 4 | }; 5 | -------------------------------------------------------------------------------- /spec/fixtures/api/singleton-data/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "electron-test-singleton-data", 3 | "main": "main.js" 4 | } 5 | 6 | -------------------------------------------------------------------------------- /spec/fixtures/api/singleton-userdata/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "electron-test-singleton-userdata", 3 | "main": "main.js" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/api/singleton/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "electron-test-singleton", 3 | "main": "main.js" 4 | } 5 | 6 | -------------------------------------------------------------------------------- /spec/fixtures/api/test-menu-null/main.js: -------------------------------------------------------------------------------- 1 | const { app, BrowserWindow } = require('electron'); 2 | 3 | let win; 4 | app.whenReady().then(function () { 5 | win = new BrowserWindow({}); 6 | win.setMenu(null); 7 | 8 | setTimeout(() => { 9 | if (win.isMenuBarVisible()) { 10 | console.log('Window has a menu'); 11 | } else { 12 | console.log('Window has no menu'); 13 | } 14 | app.quit(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /spec/fixtures/api/test-menu-null/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "electron-test-menu", 3 | "main": "main.js" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/api/test-menu-visibility/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "electron-test-menu", 3 | "main": "main.js" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/api/unhandled-rejection-handled.js: -------------------------------------------------------------------------------- 1 | const { app } = require('electron'); 2 | 3 | const handleUnhandledRejection = (reason) => { 4 | console.error(`Unhandled Rejection: ${reason.stack}`); 5 | app.quit(); 6 | }; 7 | 8 | const main = async () => { 9 | process.on('unhandledRejection', handleUnhandledRejection); 10 | throw new Error('oops'); 11 | }; 12 | 13 | main(); 14 | -------------------------------------------------------------------------------- /spec/fixtures/api/unhandled-rejection.js: -------------------------------------------------------------------------------- 1 | const main = async () => { 2 | throw new Error('oops'); 3 | }; 4 | 5 | main(); 6 | -------------------------------------------------------------------------------- /spec/fixtures/api/unload.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /spec/fixtures/api/utility-process/crash.js: -------------------------------------------------------------------------------- 1 | process.crash(); 2 | -------------------------------------------------------------------------------- /spec/fixtures/api/utility-process/custom-exit.js: -------------------------------------------------------------------------------- 1 | const arg = process.argv[2]; 2 | const code = arg.split('=')[1]; 3 | process.exit(code); 4 | -------------------------------------------------------------------------------- /spec/fixtures/api/utility-process/dns-result-order.js: -------------------------------------------------------------------------------- 1 | const dns = require('node:dns'); 2 | console.log(dns.getDefaultResultOrder()); 3 | process.exit(0); 4 | -------------------------------------------------------------------------------- /spec/fixtures/api/utility-process/empty.js: -------------------------------------------------------------------------------- 1 | process.exit(0); 2 | -------------------------------------------------------------------------------- /spec/fixtures/api/utility-process/endless.js: -------------------------------------------------------------------------------- 1 | setInterval(() => {}, 2000); 2 | -------------------------------------------------------------------------------- /spec/fixtures/api/utility-process/env-app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "electron-test-utility-process-env-app", 3 | "main": "main.js" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/api/utility-process/env-app/test.js: -------------------------------------------------------------------------------- 1 | process.parentPort.postMessage(process.env.FROM); 2 | process.exit(0); 3 | -------------------------------------------------------------------------------- /spec/fixtures/api/utility-process/eval.js: -------------------------------------------------------------------------------- 1 | const vm = require('node:vm'); 2 | 3 | const contextObject = { result: 0 }; 4 | vm.createContext(contextObject); 5 | vm.runInContext('eval(\'result = 42\')', contextObject); 6 | process.parentPort.postMessage(contextObject.result); 7 | -------------------------------------------------------------------------------- /spec/fixtures/api/utility-process/exception.js: -------------------------------------------------------------------------------- 1 | nonExistingFunc(); // eslint-disable-line no-undef 2 | -------------------------------------------------------------------------------- /spec/fixtures/api/utility-process/inherit-stderr/main.js: -------------------------------------------------------------------------------- 1 | const { app, utilityProcess } = require('electron'); 2 | const path = require('node:path'); 3 | 4 | app.whenReady().then(() => { 5 | const payload = app.commandLine.getSwitchValue('payload'); 6 | const child = utilityProcess.fork(path.join(__dirname, 'test.js'), [`--payload=${payload}`]); 7 | child.on('exit', () => { 8 | app.quit(); 9 | }); 10 | }); 11 | -------------------------------------------------------------------------------- /spec/fixtures/api/utility-process/inherit-stderr/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "electron-test-utility-process-inherit-stderr", 3 | "main": "main.js" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/api/utility-process/inherit-stderr/test.js: -------------------------------------------------------------------------------- 1 | process.stderr.write(process.argv[2].split('--payload=')[1]); 2 | process.stderr.end(); 3 | process.exit(0); 4 | -------------------------------------------------------------------------------- /spec/fixtures/api/utility-process/inherit-stdout/main.js: -------------------------------------------------------------------------------- 1 | const { app, utilityProcess } = require('electron'); 2 | const path = require('node:path'); 3 | 4 | app.whenReady().then(() => { 5 | const payload = app.commandLine.getSwitchValue('payload'); 6 | const child = utilityProcess.fork(path.join(__dirname, 'test.js'), [`--payload=${payload}`]); 7 | child.on('exit', () => { 8 | app.quit(); 9 | }); 10 | }); 11 | -------------------------------------------------------------------------------- /spec/fixtures/api/utility-process/inherit-stdout/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "electron-test-utility-process-inherit-stdout", 3 | "main": "main.js" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/api/utility-process/inherit-stdout/test.js: -------------------------------------------------------------------------------- 1 | process.stdout.write(process.argv[2].split('--payload=')[1]); 2 | process.stdout.end(); 3 | process.exit(0); 4 | -------------------------------------------------------------------------------- /spec/fixtures/api/utility-process/log.js: -------------------------------------------------------------------------------- 1 | console.log('hello'); 2 | process.stderr.write('world'); 3 | process.exit(0); 4 | -------------------------------------------------------------------------------- /spec/fixtures/api/utility-process/post-message-queue.js: -------------------------------------------------------------------------------- 1 | setTimeout(() => { 2 | let called = 0; 3 | let result = ''; 4 | process.parentPort.on('message', (e) => { 5 | result += e.data; 6 | if (++called === 3) { 7 | process.parentPort.postMessage(result); 8 | } 9 | }); 10 | }, 3000); 11 | -------------------------------------------------------------------------------- /spec/fixtures/api/utility-process/post-message.js: -------------------------------------------------------------------------------- 1 | process.parentPort.on('message', (e) => { 2 | process.parentPort.postMessage(e.data); 3 | }); 4 | -------------------------------------------------------------------------------- /spec/fixtures/api/utility-process/preload.js: -------------------------------------------------------------------------------- 1 | const { ipcRenderer } = require('electron'); 2 | 3 | ipcRenderer.on('port', (e, msg) => { 4 | e.ports[0].postMessage(msg); 5 | }); 6 | -------------------------------------------------------------------------------- /spec/fixtures/api/utility-process/receive-message.js: -------------------------------------------------------------------------------- 1 | process.parentPort.on('message', (e) => { 2 | e.ports[0].on('message', (ev) => { 3 | process.parentPort.postMessage(ev.data); 4 | }); 5 | e.ports[0].start(); 6 | }); 7 | -------------------------------------------------------------------------------- /spec/fixtures/api/utility-process/suid.js: -------------------------------------------------------------------------------- 1 | const result = require('node:child_process').execSync('sudo --help'); 2 | process.parentPort.postMessage(result); 3 | -------------------------------------------------------------------------------- /spec/fixtures/api/window-all-closed/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "electron-test-window-all-closed", 3 | "main": "main.js" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/api/window-open-location-change.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | foo 9 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /spec/fixtures/api/window-open-location-final.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | bar 9 | 10 | 11 | -------------------------------------------------------------------------------- /spec/fixtures/api/window-open-location-open.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spec/fixtures/apps/crash/fork.js: -------------------------------------------------------------------------------- 1 | const path = require('node:path'); 2 | const childProcess = require('node:child_process'); 3 | 4 | const crashPath = path.join(__dirname, 'node-crash.js'); 5 | const child = childProcess.fork(crashPath, { silent: true }); 6 | child.on('exit', () => process.exit(0)); 7 | -------------------------------------------------------------------------------- /spec/fixtures/apps/crash/node-crash.js: -------------------------------------------------------------------------------- 1 | process.nextTick(() => process.crash()); 2 | -------------------------------------------------------------------------------- /spec/fixtures/apps/crash/node-extra-args.js: -------------------------------------------------------------------------------- 1 | process.on('message', function () { 2 | process.send(process.argv); 3 | }); 4 | 5 | // Allow time to send args, then crash the app. 6 | setTimeout(() => process.nextTick(() => process.crash()), 10000); 7 | -------------------------------------------------------------------------------- /spec/fixtures/apps/crash/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "electron-test-crash", 3 | "main": "main.js" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/apps/crash/sandbox-preload.js: -------------------------------------------------------------------------------- 1 | const { crashReporter } = require('electron'); 2 | 3 | const params = new URLSearchParams(location.search); 4 | if (params.get('set_extra') === '1') { 5 | crashReporter.addExtraParameter('rendererSpecific', 'rs'); 6 | crashReporter.addExtraParameter('addedThenRemoved', 'to-be-removed'); 7 | crashReporter.removeExtraParameter('addedThenRemoved'); 8 | } 9 | 10 | process.crash(); 11 | -------------------------------------------------------------------------------- /spec/fixtures/apps/libuv-hang/renderer.js: -------------------------------------------------------------------------------- 1 | const { run, ipcRenderer } = window.api; 2 | 3 | run().then(async () => { 4 | const count = await ipcRenderer.invoke('reload-successful'); 5 | if (count < 3) location.reload(); 6 | }).catch(console.log); 7 | -------------------------------------------------------------------------------- /spec/fixtures/apps/open-new-window-from-link/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Hello World! 7 | 8 | 9 | Open New Window 10 | 11 | 12 | -------------------------------------------------------------------------------- /spec/fixtures/apps/open-new-window-from-link/new-window-page.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Window From Link 7 | 8 | 9 | I'm a window opened from a link! 10 | 11 | 12 | -------------------------------------------------------------------------------- /spec/fixtures/apps/open-new-window-from-link/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "electron-test-open-new-window-from-link", 3 | "main": "main.js" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/apps/open-new-window-from-link/preload.js: -------------------------------------------------------------------------------- 1 | window.addEventListener('click', e => { 2 | console.log('click', e); 3 | }); 4 | -------------------------------------------------------------------------------- /spec/fixtures/apps/remote-control/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "electron-test-remote-control", 3 | "main": "main.js" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/apps/self-module-paths/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |

Hello World!

5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /spec/fixtures/apps/self-module-paths/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "electron-test-self-module-paths", 3 | "main": "main.js" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/apps/self-module-paths/worker.js: -------------------------------------------------------------------------------- 1 | self.postMessage(self.module.paths); 2 | -------------------------------------------------------------------------------- /spec/fixtures/apps/set-path/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "electron-test-set-path", 3 | "main": "main.js" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/apps/xwindow-icon/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/spec/fixtures/apps/xwindow-icon/icon.png -------------------------------------------------------------------------------- /spec/fixtures/apps/xwindow-icon/main.js: -------------------------------------------------------------------------------- 1 | const { app, BrowserWindow } = require('electron'); 2 | const path = require('node:path'); 3 | 4 | app.whenReady().then(() => { 5 | const w = new BrowserWindow({ 6 | show: false, 7 | icon: path.join(__dirname, 'icon.png') 8 | }); 9 | w.webContents.on('did-finish-load', () => { 10 | app.quit(); 11 | }); 12 | w.loadURL('about:blank'); 13 | }); 14 | -------------------------------------------------------------------------------- /spec/fixtures/apps/xwindow-icon/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "electron-test-xwindow-icon", 3 | "main": "main.js" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/assets/1x1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/spec/fixtures/assets/1x1.png -------------------------------------------------------------------------------- /spec/fixtures/assets/2x2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/spec/fixtures/assets/2x2.jpg -------------------------------------------------------------------------------- /spec/fixtures/assets/3x3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/spec/fixtures/assets/3x3.png -------------------------------------------------------------------------------- /spec/fixtures/assets/LICENSE: -------------------------------------------------------------------------------- 1 | tone.wav 2 | http://soundbible.com/1815-A-Tone.html 3 | License: Public Domain 4 | -------------------------------------------------------------------------------- /spec/fixtures/assets/capybara.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/spec/fixtures/assets/capybara.png -------------------------------------------------------------------------------- /spec/fixtures/assets/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/spec/fixtures/assets/icon.ico -------------------------------------------------------------------------------- /spec/fixtures/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/spec/fixtures/assets/logo.png -------------------------------------------------------------------------------- /spec/fixtures/assets/logo_Template.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/spec/fixtures/assets/logo_Template.png -------------------------------------------------------------------------------- /spec/fixtures/assets/shortcut.lnk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/spec/fixtures/assets/shortcut.lnk -------------------------------------------------------------------------------- /spec/fixtures/assets/tone.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/spec/fixtures/assets/tone.wav -------------------------------------------------------------------------------- /spec/fixtures/auto-update/check-with-headers/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "electron-test-check-with-headers", 3 | "version": "1.0.0", 4 | "main": "./index.js" 5 | } 6 | -------------------------------------------------------------------------------- /spec/fixtures/auto-update/check/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "electron-test-check", 3 | "version": "1.0.0", 4 | "main": "./index.js" 5 | } 6 | -------------------------------------------------------------------------------- /spec/fixtures/auto-update/initial/index.js: -------------------------------------------------------------------------------- 1 | process.on('uncaughtException', (err) => { 2 | console.error(err); 3 | process.exit(1); 4 | }); 5 | 6 | const { autoUpdater } = require('electron'); 7 | 8 | const feedUrl = process.argv[1]; 9 | 10 | console.log('Setting Feed URL'); 11 | 12 | autoUpdater.setFeedURL({ 13 | url: feedUrl 14 | }); 15 | 16 | console.log('Feed URL Set:', feedUrl); 17 | 18 | process.exit(0); 19 | -------------------------------------------------------------------------------- /spec/fixtures/auto-update/initial/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "electron-test-initial-app", 3 | "version": "1.0.0", 4 | "main": "./index.js" 5 | } -------------------------------------------------------------------------------- /spec/fixtures/auto-update/update-json/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "electron-test-update-json", 3 | "version": "1.0.0", 4 | "main": "./index.js" 5 | } 6 | -------------------------------------------------------------------------------- /spec/fixtures/auto-update/update/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "electron-test-update", 3 | "version": "1.0.0", 4 | "main": "./index.js" 5 | } 6 | -------------------------------------------------------------------------------- /spec/fixtures/blank.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/spec/fixtures/blank.html -------------------------------------------------------------------------------- /spec/fixtures/blank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/spec/fixtures/blank.png -------------------------------------------------------------------------------- /spec/fixtures/cat-spin.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/spec/fixtures/cat-spin.mp4 -------------------------------------------------------------------------------- /spec/fixtures/cat.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/spec/fixtures/cat.pdf -------------------------------------------------------------------------------- /spec/fixtures/certificates/client.p12: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/spec/fixtures/certificates/client.p12 -------------------------------------------------------------------------------- /spec/fixtures/chromium/spellchecker.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /spec/fixtures/crash-cases/early-in-memory-session-create/index.js: -------------------------------------------------------------------------------- 1 | const { app, session } = require('electron'); 2 | 3 | app.on('ready', () => { 4 | session.fromPartition('in-memory'); 5 | setImmediate(() => { 6 | process.exit(0); 7 | }); 8 | }); 9 | -------------------------------------------------------------------------------- /spec/fixtures/crash-cases/fs-promises-renderer-crash/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /spec/fixtures/crash-cases/in-memory-session-double-free/index.js: -------------------------------------------------------------------------------- 1 | const { app, BrowserWindow } = require('electron'); 2 | 3 | app.on('ready', async () => { 4 | const win = new BrowserWindow({ show: false, webPreferences: { partition: '123321' } }); 5 | await win.loadURL('data:text/html,'); 6 | setTimeout(() => app.quit()); 7 | }); 8 | -------------------------------------------------------------------------------- /spec/fixtures/crash-cases/js-execute-iframe/page2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | HELLO 4 | -------------------------------------------------------------------------------- /spec/fixtures/crash-cases/native-window-open-exit/index.html: -------------------------------------------------------------------------------- 1 | 2 | MAIN PAGE 3 | -------------------------------------------------------------------------------- /spec/fixtures/crash-cases/native-window-open-exit/preload.js: -------------------------------------------------------------------------------- 1 | const { ipcRenderer } = require('electron'); 2 | 3 | window.addEventListener('DOMContentLoaded', () => { 4 | window.open('127.0.0.1:7001', '_blank'); 5 | setTimeout(() => ipcRenderer.send('test-done')); 6 | }); 7 | -------------------------------------------------------------------------------- /spec/fixtures/crash-cases/setimmediate-renderer-crash/preload.js: -------------------------------------------------------------------------------- 1 | setImmediate(() => { 2 | throw new Error('oh no'); 3 | }); 4 | -------------------------------------------------------------------------------- /spec/fixtures/crash-cases/transparent-window-get-background-color/index.js: -------------------------------------------------------------------------------- 1 | const { app, BrowserWindow } = require('electron'); 2 | 3 | function createWindow () { 4 | // Create the browser window. 5 | const mainWindow = new BrowserWindow({ 6 | transparent: true 7 | }); 8 | mainWindow.getBackgroundColor(); 9 | } 10 | 11 | app.on('ready', () => { 12 | createWindow(); 13 | setTimeout(() => app.quit()); 14 | }); 15 | -------------------------------------------------------------------------------- /spec/fixtures/crash-cases/webcontents-create-leak-exit/index.js: -------------------------------------------------------------------------------- 1 | const { app, webContents } = require('electron'); 2 | app.whenReady().then(function () { 3 | webContents.create(); 4 | 5 | app.quit(); 6 | }); 7 | -------------------------------------------------------------------------------- /spec/fixtures/crash-cases/webcontentsview-create-leak-exit/index.js: -------------------------------------------------------------------------------- 1 | const { WebContentsView, app } = require('electron'); 2 | app.whenReady().then(function () { 3 | // eslint-disable-next-line no-new 4 | new WebContentsView({}); 5 | 6 | app.quit(); 7 | }); 8 | -------------------------------------------------------------------------------- /spec/fixtures/crash-cases/webview-attach-destroyed/index.js: -------------------------------------------------------------------------------- 1 | const { app, BrowserWindow } = require('electron'); 2 | 3 | app.whenReady().then(() => { 4 | const w = new BrowserWindow({ show: false, webPreferences: { webviewTag: true } }); 5 | w.loadURL('data:text/html,'); 6 | app.on('web-contents-created', () => { 7 | w.close(); 8 | }); 9 | }); 10 | -------------------------------------------------------------------------------- /spec/fixtures/crash-cases/webview-contents-error-on-creation/index.js: -------------------------------------------------------------------------------- 1 | const { app, BrowserWindow } = require('electron'); 2 | 3 | app.whenReady().then(() => { 4 | const mainWindow = new BrowserWindow({ 5 | show: false 6 | }); 7 | mainWindow.loadFile('about:blank'); 8 | 9 | app.on('web-contents-created', () => { 10 | throw new Error(); 11 | }); 12 | 13 | app.quit(); 14 | }); 15 | -------------------------------------------------------------------------------- /spec/fixtures/devtools-extensions/bad-manifest/manifest.json: -------------------------------------------------------------------------------- 1 | } 2 | -------------------------------------------------------------------------------- /spec/fixtures/devtools-extensions/foo/_locales/en/messages.json: -------------------------------------------------------------------------------- 1 | { 2 | "foo": { 3 | "message": "foo - $BAZ$ ($2)", 4 | "placeholders": { 5 | "baz": { 6 | "content": "$1" 7 | } 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /spec/fixtures/devtools-extensions/foo/devtools.js: -------------------------------------------------------------------------------- 1 | /* global chrome */ 2 | chrome.devtools.panels.create('Foo', 'foo.png', 'index.html'); 3 | -------------------------------------------------------------------------------- /spec/fixtures/devtools-extensions/foo/foo.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | foo 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /spec/fixtures/devtools-extensions/foo/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | a custom devtools extension 10 | 11 | 12 | -------------------------------------------------------------------------------- /spec/fixtures/devtools-extensions/foo/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "manifest_version": 2, 3 | "name": "foo", 4 | "permissions": [ 5 | "storage" 6 | ], 7 | "version": "1.0", 8 | "devtools_page": "foo.html", 9 | "default_locale": "en" 10 | } 11 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/chrome-api/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "chrome-api", 3 | "version": "1.0", 4 | "content_scripts": [ 5 | { 6 | "matches": [""], 7 | "js": ["main.js"], 8 | "run_at": "document_start" 9 | } 10 | ], 11 | "background": { 12 | "scripts": ["background.js"], 13 | "persistent": false 14 | }, 15 | "permissions": [ 16 | "" 17 | ], 18 | "manifest_version": 2 19 | } 20 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/chrome-i18n/v2/_locales/en/messages.json: -------------------------------------------------------------------------------- 1 | { 2 | "extName": { 3 | "message": "chrome-i18n", 4 | "description": "Extension name." 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/chrome-i18n/v2/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "__MSG_extName__", 3 | "default_locale": "en", 4 | "version": "1.0", 5 | "content_scripts": [ 6 | { 7 | "matches": [""], 8 | "js": ["main.js"], 9 | "run_at": "document_start" 10 | } 11 | ], 12 | "manifest_version": 2 13 | } 14 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/chrome-i18n/v3/_locales/es/messages.json: -------------------------------------------------------------------------------- 1 | { 2 | "extName": { 3 | "message": "Hola mundo!!", 4 | "description": "Nombre de extensión" 5 | } 6 | } -------------------------------------------------------------------------------- /spec/fixtures/extensions/chrome-i18n/v3/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "chrome-i18n", 3 | "version": "1.0", 4 | "default_locale": "es", 5 | "content_scripts": [ 6 | { 7 | "matches": [ 8 | "" 9 | ], 10 | "js": [ 11 | "main.js" 12 | ], 13 | "run_at": "document_start" 14 | } 15 | ], 16 | "manifest_version": 3 17 | } 18 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/chrome-runtime/background.js: -------------------------------------------------------------------------------- 1 | /* global chrome */ 2 | 3 | chrome.runtime.onMessage.addListener((message, sender, reply) => { 4 | switch (message) { 5 | case 'getPlatformInfo': 6 | chrome.runtime.getPlatformInfo(reply); 7 | break; 8 | } 9 | 10 | // Respond asynchronously 11 | return true; 12 | }); 13 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/chrome-runtime/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "chrome-runtime", 3 | "version": "1.0", 4 | "content_scripts": [ 5 | { 6 | "matches": [""], 7 | "js": ["main.js"], 8 | "run_at": "document_end" 9 | } 10 | ], 11 | "background": { 12 | "scripts": ["background.js"], 13 | "persistent": false 14 | }, 15 | "manifest_version": 2 16 | } 17 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/chrome-storage/main.js: -------------------------------------------------------------------------------- 1 | /* global chrome */ 2 | chrome.storage.local.set({ key: 'value' }, () => { 3 | chrome.storage.local.get(['key'], ({ key }) => { 4 | const script = document.createElement('script'); 5 | script.textContent = `require('electron').ipcRenderer.send('storage-success', ${JSON.stringify(key)})`; 6 | document.documentElement.appendChild(script); 7 | }); 8 | }); 9 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/chrome-storage/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "chrome-storage", 3 | "version": "1.0", 4 | "content_scripts": [ 5 | { 6 | "matches": [""], 7 | "js": ["main.js"], 8 | "run_at": "document_start" 9 | } 10 | ], 11 | "permissions": [ 12 | "storage" 13 | ], 14 | "manifest_version": 2 15 | } 16 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/chrome-tabs/api-async/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "api-async", 3 | "version": "1.0", 4 | "content_scripts": [ 5 | { 6 | "matches": [ ""], 7 | "js": ["main.js"], 8 | "run_at": "document_start" 9 | } 10 | ], 11 | "permissions": ["tabs"], 12 | "background": { 13 | "service_worker": "background.js" 14 | }, 15 | "manifest_version": 3 16 | } 17 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/chrome-tabs/no-privileges/background.js: -------------------------------------------------------------------------------- 1 | /* global chrome */ 2 | 3 | chrome.runtime.onMessage.addListener((_request, sender, sendResponse) => { 4 | chrome.tabs.get(sender.tab.id).then(sendResponse); 5 | return true; 6 | }); 7 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/chrome-tabs/no-privileges/main.js: -------------------------------------------------------------------------------- 1 | /* global chrome */ 2 | 3 | chrome.runtime.onMessage.addListener((request, sender, sendResponse) => { 4 | sendResponse(request); 5 | }); 6 | 7 | window.addEventListener('message', () => { 8 | chrome.runtime.sendMessage({}, response => { 9 | console.log(JSON.stringify(response)); 10 | }); 11 | }, false); 12 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/chrome-tabs/no-privileges/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "no-privileges", 3 | "version": "1.0", 4 | "content_scripts": [ 5 | { 6 | "matches": [ 7 | "" 8 | ], 9 | "js": [ 10 | "main.js" 11 | ], 12 | "run_at": "document_start" 13 | } 14 | ], 15 | "background": { 16 | "service_worker": "background.js" 17 | }, 18 | "manifest_version": 3 19 | } -------------------------------------------------------------------------------- /spec/fixtures/extensions/chrome-too-low-version/main.js: -------------------------------------------------------------------------------- 1 | document.documentElement.style.backgroundColor = 'blue'; 2 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/chrome-too-low-version/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "chrome-too-low-version", 3 | "version": "1.0", 4 | "minimum_chrome_version": "999", 5 | "content_scripts": [ 6 | { 7 | "matches": [""], 8 | "js": ["main.js"], 9 | "run_at": "document_start" 10 | } 11 | ], 12 | "permissions": ["storage"], 13 | "manifest_version": 3 14 | } 15 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/chrome-webRequest-wss/background.js: -------------------------------------------------------------------------------- 1 | /* global chrome */ 2 | 3 | chrome.webRequest.onBeforeSendHeaders.addListener( 4 | (details) => { 5 | if (details.requestHeaders) { 6 | details.requestHeaders.foo = 'bar'; 7 | } 8 | return { cancel: false, requestHeaders: details.requestHeaders }; 9 | }, 10 | { urls: ['*://127.0.0.1:*'] }, 11 | ['blocking'] 12 | ); 13 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/chrome-webRequest-wss/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "chrome-webRequest", 3 | "version": "1.0", 4 | "background": { 5 | "scripts": ["background.js"], 6 | "persistent": true 7 | }, 8 | "permissions": ["webRequest", "webRequestBlocking", ""], 9 | "manifest_version": 2 10 | } 11 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/chrome-webRequest/background.js: -------------------------------------------------------------------------------- 1 | /* global chrome */ 2 | 3 | chrome.webRequest.onBeforeRequest.addListener( 4 | // eslint-disable-next-line @typescript-eslint/no-unused-vars 5 | (details) => { 6 | return { cancel: true }; 7 | }, 8 | { urls: ['*://127.0.0.1:*'] }, 9 | ['blocking'] 10 | ); 11 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/chrome-webRequest/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "chrome-webRequest", 3 | "version": "1.0", 4 | "background": { 5 | "scripts": ["background.js"], 6 | "persistent": true 7 | }, 8 | "permissions": ["webRequest", "webRequestBlocking", ""], 9 | "manifest_version": 2 10 | } 11 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/content-script-document-end/end.js: -------------------------------------------------------------------------------- 1 | document.documentElement.style.backgroundColor = 'red'; 2 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/content-script-document-end/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "document-end", 3 | "version": "1.0", 4 | "description": "", 5 | "content_scripts": [ 6 | { 7 | "matches": [""], 8 | "js": ["end.js"], 9 | "run_at": "document_end" 10 | } 11 | ], 12 | "manifest_version": 2 13 | } 14 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/content-script-document-idle/idle.js: -------------------------------------------------------------------------------- 1 | document.body.style.backgroundColor = 'red'; 2 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/content-script-document-idle/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "document-idle", 3 | "version": "1.0", 4 | "description": "", 5 | "content_scripts": [ 6 | { 7 | "matches": [""], 8 | "js": ["idle.js"], 9 | "run_at": "document_idle" 10 | } 11 | ], 12 | "manifest_version": 2 13 | } 14 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/content-script-document-start/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "document-start", 3 | "version": "1.0", 4 | "description": "", 5 | "content_scripts": [ 6 | { 7 | "matches": [""], 8 | "js": ["start.js"], 9 | "run_at": "document_start" 10 | } 11 | ], 12 | "manifest_version": 2 13 | } 14 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/content-script-document-start/start.js: -------------------------------------------------------------------------------- 1 | document.documentElement.style.backgroundColor = 'red'; 2 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/content-script/all_frames-disabled.css: -------------------------------------------------------------------------------- 1 | #all_frames_disabled { 2 | background: blue; 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/content-script/all_frames-enabled.css: -------------------------------------------------------------------------------- 1 | #all_frames_enabled { 2 | background: red; 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/content-script/frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Document 6 | 7 | 8 | This is a frame, it has no children 9 |
10 |
11 | 12 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/devtools-extension/foo.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | foo 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/devtools-extension/foo.js: -------------------------------------------------------------------------------- 1 | /* global chrome */ 2 | chrome.devtools.panels.create('Foo', 'icon.png', 'index.html'); 3 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/devtools-extension/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | a custom devtools extension 4 | 5 | 6 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/devtools-extension/index.js: -------------------------------------------------------------------------------- 1 | /* global chrome */ 2 | chrome.devtools.inspectedWindow.eval('require("electron").ipcRenderer.send("winning")', (result, exc) => { 3 | console.log(result, exc); 4 | }); 5 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/devtools-extension/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "foo", 3 | "version": "1.0", 4 | "devtools_page": "foo.html", 5 | "manifest_version": 2 6 | } 7 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/lazy-background-page/background.js: -------------------------------------------------------------------------------- 1 | /* global chrome */ 2 | chrome.runtime.onMessage.addListener((message, sender, reply) => { 3 | window.receivedMessage = message; 4 | reply({ message, sender }); 5 | }); 6 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/lazy-background-page/content_script.js: -------------------------------------------------------------------------------- 1 | /* global chrome */ 2 | chrome.runtime.sendMessage({ some: 'message' }, (response) => { 3 | const script = document.createElement('script'); 4 | script.textContent = `require('electron').ipcRenderer.send('bg-page-message-response', ${JSON.stringify(response)})`; 5 | document.documentElement.appendChild(script); 6 | }); 7 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/lazy-background-page/get-background-page.js: -------------------------------------------------------------------------------- 1 | /* global chrome */ 2 | window.completionPromise = new Promise((resolve) => { 3 | window.completionPromiseResolve = resolve; 4 | }); 5 | chrome.runtime.sendMessage({ some: 'message' }, () => { 6 | window.completionPromiseResolve(chrome.extension.getBackgroundPage().receivedMessage); 7 | }); 8 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/lazy-background-page/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lazy-background-page", 3 | "version": "1.0", 4 | "background": { 5 | "scripts": ["background.js"], 6 | "persistent": false 7 | }, 8 | "content_scripts": [ 9 | { 10 | "matches": [""], 11 | "js": ["content_script.js"], 12 | "run_at": "document_start" 13 | } 14 | ], 15 | "manifest_version": 2 16 | } 17 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/lazy-background-page/page-get-background.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/lazy-background-page/page-runtime-get-background.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/lazy-background-page/runtime-get-background-page.js: -------------------------------------------------------------------------------- 1 | /* global chrome */ 2 | window.completionPromise = new Promise((resolve) => { 3 | window.completionPromiseResolve = resolve; 4 | }); 5 | chrome.runtime.sendMessage({ some: 'message' }, () => { 6 | chrome.runtime.getBackgroundPage((bgPage) => { 7 | window.completionPromiseResolve(bgPage.receivedMessage); 8 | }); 9 | }); 10 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/load-error/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "load-error", 3 | "version": "1.0", 4 | "icons": { 5 | "16": "/images/error.png" 6 | }, 7 | "manifest_version": 2 8 | } 9 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/missing-manifest/main.js: -------------------------------------------------------------------------------- 1 | console.log('oh no where is my manifest'); 2 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/mv3-service-worker/background.js: -------------------------------------------------------------------------------- 1 | /* global chrome */ 2 | 3 | chrome.runtime.onMessage.addListener((message, _sender, sendResponse) => { 4 | if (message === 'fetch-confirmation') { 5 | sendResponse({ message: 'Hello from background.js' }); 6 | } 7 | }); 8 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/mv3-service-worker/main.js: -------------------------------------------------------------------------------- 1 | /* global chrome */ 2 | 3 | chrome.runtime.onMessage.addListener((message, sender, sendResponse) => { 4 | sendResponse(message); 5 | }); 6 | 7 | window.addEventListener('message', (event) => { 8 | if (event.data === 'fetch-confirmation') { 9 | chrome.runtime.sendMessage('fetch-confirmation', response => { 10 | console.log(JSON.stringify(response)); 11 | }); 12 | } 13 | }, false); 14 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/persistent-background-page/background.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/spec/fixtures/extensions/persistent-background-page/background.js -------------------------------------------------------------------------------- /spec/fixtures/extensions/persistent-background-page/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "persistent-background-page", 3 | "version": "1.0", 4 | "background": { 5 | "scripts": ["background.js"], 6 | "persistent": true 7 | }, 8 | "manifest_version": 2 9 | } 10 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/red-bg/main.js: -------------------------------------------------------------------------------- 1 | document.documentElement.style.backgroundColor = 'red'; 2 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/red-bg/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "red-bg", 3 | "version": "1.0", 4 | "content_scripts": [ 5 | { 6 | "matches": [""], 7 | "js": ["main.js"], 8 | "run_at": "document_start" 9 | } 10 | ], 11 | "manifest_version": 2 12 | } 13 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/ui-page/bare-page.html: -------------------------------------------------------------------------------- 1 | 2 | ui page loaded ok 3 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/ui-page/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ui-page", 3 | "version": "1.0", 4 | "manifest_version": 2, 5 | "permissions": [""] 6 | } 7 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/ui-page/page-get-background.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/ui-page/page-script-load.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/ui-page/script.js: -------------------------------------------------------------------------------- 1 | document.write('script loaded ok'); 2 | -------------------------------------------------------------------------------- /spec/fixtures/hello.txt: -------------------------------------------------------------------------------- 1 | hello world 2 | -------------------------------------------------------------------------------- /spec/fixtures/module/asar.js: -------------------------------------------------------------------------------- 1 | const fs = require('node:fs'); 2 | process.on('message', function (file) { 3 | process.send(fs.readFileSync(file).toString()); 4 | }); 5 | -------------------------------------------------------------------------------- /spec/fixtures/module/check-arguments.js: -------------------------------------------------------------------------------- 1 | const { ipcRenderer } = require('electron'); 2 | window.onload = function () { 3 | ipcRenderer.send('answer', process.argv); 4 | }; 5 | -------------------------------------------------------------------------------- /spec/fixtures/module/create_socket.js: -------------------------------------------------------------------------------- 1 | const net = require('node:net'); 2 | const server = net.createServer(function () {}); 3 | server.listen(process.argv[2]); 4 | process.exit(0); 5 | -------------------------------------------------------------------------------- /spec/fixtures/module/declare-buffer.js: -------------------------------------------------------------------------------- 1 | const Buffer = 'declared Buffer'; 2 | module.exports = Buffer; 3 | -------------------------------------------------------------------------------- /spec/fixtures/module/declare-global.js: -------------------------------------------------------------------------------- 1 | const global = 'declared global'; 2 | module.exports = global; 3 | -------------------------------------------------------------------------------- /spec/fixtures/module/declare-process.js: -------------------------------------------------------------------------------- 1 | const process = 'declared process'; 2 | module.exports = process; 3 | -------------------------------------------------------------------------------- /spec/fixtures/module/delay-exit.js: -------------------------------------------------------------------------------- 1 | const { app } = require('electron'); 2 | 3 | process.on('message', () => { 4 | console.log('Notified to quit'); 5 | app.quit(); 6 | }); 7 | -------------------------------------------------------------------------------- /spec/fixtures/module/echo-renamed.js: -------------------------------------------------------------------------------- 1 | let echo; 2 | try { 3 | echo = require('@electron-ci/echo'); 4 | } catch { 5 | process.exit(1); 6 | } 7 | process.exit(echo(0)); 8 | -------------------------------------------------------------------------------- /spec/fixtures/module/echo.js: -------------------------------------------------------------------------------- 1 | process.on('uncaughtException', function (err) { 2 | process.send(err.message); 3 | }); 4 | 5 | const echo = require('@electron-ci/echo'); 6 | process.send(echo('ok')); 7 | -------------------------------------------------------------------------------- /spec/fixtures/module/empty.js: -------------------------------------------------------------------------------- 1 | const { ipcRenderer } = require('electron'); 2 | 3 | window.addEventListener('message', (event) => { 4 | ipcRenderer.send('leak-result', event.data); 5 | }); 6 | -------------------------------------------------------------------------------- /spec/fixtures/module/fail.js: -------------------------------------------------------------------------------- 1 | process.exit(1); 2 | -------------------------------------------------------------------------------- /spec/fixtures/module/get-global-preload.js: -------------------------------------------------------------------------------- 1 | require('electron').ipcRenderer.send('vars', window.preload1, window.preload2, window.preload3); 2 | -------------------------------------------------------------------------------- /spec/fixtures/module/hello-child.js: -------------------------------------------------------------------------------- 1 | class Hello { 2 | say () { 3 | return 'hi child window'; 4 | } 5 | } 6 | module.exports = Hello; 7 | -------------------------------------------------------------------------------- /spec/fixtures/module/hello.js: -------------------------------------------------------------------------------- 1 | class Hello { 2 | say () { 3 | return 'hi'; 4 | } 5 | } 6 | module.exports = Hello; 7 | -------------------------------------------------------------------------------- /spec/fixtures/module/isolated-ping.js: -------------------------------------------------------------------------------- 1 | const { ipcRenderer } = require('electron'); 2 | ipcRenderer.send('pong'); 3 | -------------------------------------------------------------------------------- /spec/fixtures/module/locale-compare.js: -------------------------------------------------------------------------------- 1 | process.on('message', function () { 2 | process.send([ 3 | 'a'.localeCompare('a'), 4 | 'ä'.localeCompare('z', 'de'), 5 | 'ä'.localeCompare('a', 'sv', { sensitivity: 'base' }) 6 | ]); 7 | }); 8 | -------------------------------------------------------------------------------- /spec/fixtures/module/no-asar.js: -------------------------------------------------------------------------------- 1 | const fs = require('node:fs'); 2 | const path = require('node:path'); 3 | 4 | const stats = fs.statSync(path.join(__dirname, '..', 'test.asar', 'a.asar')); 5 | 6 | const details = { 7 | isFile: stats.isFile(), 8 | size: stats.size 9 | }; 10 | 11 | if (process.send != null) { 12 | process.send(details); 13 | } else { 14 | console.log(JSON.stringify(details)); 15 | } 16 | -------------------------------------------------------------------------------- /spec/fixtures/module/noop.js: -------------------------------------------------------------------------------- 1 | process.exit(0); 2 | -------------------------------------------------------------------------------- /spec/fixtures/module/original-fs.js: -------------------------------------------------------------------------------- 1 | process.on('message', function () { 2 | process.send(typeof require('original-fs')); 3 | }); 4 | -------------------------------------------------------------------------------- /spec/fixtures/module/ping.js: -------------------------------------------------------------------------------- 1 | process.on('message', function (msg) { 2 | process.send(msg); 3 | process.exit(0); 4 | }); 5 | -------------------------------------------------------------------------------- /spec/fixtures/module/preload-context.js: -------------------------------------------------------------------------------- 1 | var test = 'test'; // eslint-disable-line no-var,@typescript-eslint/no-unused-vars 2 | 3 | const types = { 4 | require: typeof require, 5 | electron: typeof electron, 6 | window: typeof window, 7 | localVar: typeof window.test 8 | }; 9 | 10 | console.log(JSON.stringify(types)); 11 | -------------------------------------------------------------------------------- /spec/fixtures/module/preload-electron.js: -------------------------------------------------------------------------------- 1 | window.electron = require('electron'); 2 | -------------------------------------------------------------------------------- /spec/fixtures/module/preload-error-exception.js: -------------------------------------------------------------------------------- 1 | throw new Error('Hello World!'); 2 | -------------------------------------------------------------------------------- /spec/fixtures/module/preload-error-syntax.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line 2 | foobar 3 | -------------------------------------------------------------------------------- /spec/fixtures/module/preload-ipc-ping-pong.js: -------------------------------------------------------------------------------- 1 | const { ipcRenderer } = require('electron'); 2 | 3 | ipcRenderer.on('ping', function ({ senderId, senderIsMainFrame }, payload) { 4 | ipcRenderer.sendTo(senderId, 'pong', { payload, senderIsMainFrame }); 5 | }); 6 | 7 | ipcRenderer.on('ping-æøåü', function (event, payload) { 8 | ipcRenderer.sendTo(event.senderId, 'pong-æøåü', payload); 9 | }); 10 | -------------------------------------------------------------------------------- /spec/fixtures/module/preload-ipc.js: -------------------------------------------------------------------------------- 1 | const { ipcRenderer } = require('electron'); 2 | ipcRenderer.on('ping', function (event, message) { 3 | ipcRenderer.sendToHost('pong', message); 4 | }); 5 | -------------------------------------------------------------------------------- /spec/fixtures/module/preload-node-off-wrapper.js: -------------------------------------------------------------------------------- 1 | setImmediate(function () { 2 | require('./preload-required-module'); 3 | }); 4 | -------------------------------------------------------------------------------- /spec/fixtures/module/preload-node-off.js: -------------------------------------------------------------------------------- 1 | setImmediate(function () { 2 | try { 3 | const types = { 4 | process: typeof process, 5 | setImmediate: typeof setImmediate, 6 | global: typeof global, 7 | Buffer: typeof Buffer 8 | }; 9 | console.log(JSON.stringify(types)); 10 | } catch (e) { 11 | console.log(e.message); 12 | } 13 | }); 14 | -------------------------------------------------------------------------------- /spec/fixtures/module/preload-required-module.js: -------------------------------------------------------------------------------- 1 | try { 2 | const types = { 3 | process: typeof process, 4 | setImmediate: typeof setImmediate, 5 | global: typeof global, 6 | Buffer: typeof Buffer, 7 | 'global.Buffer': typeof global.Buffer 8 | }; 9 | console.log(JSON.stringify(types)); 10 | } catch (e) { 11 | console.log(e.message); 12 | } 13 | -------------------------------------------------------------------------------- /spec/fixtures/module/preload-sandboxæø åü.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | window.require = require; 3 | if (location.protocol === 'file:') { 4 | window.test = 'preload'; 5 | } 6 | })(); 7 | -------------------------------------------------------------------------------- /spec/fixtures/module/preload-set-global.js: -------------------------------------------------------------------------------- 1 | window.foo = 'bar'; 2 | -------------------------------------------------------------------------------- /spec/fixtures/module/preload-webview.js: -------------------------------------------------------------------------------- 1 | const { ipcRenderer } = require('electron'); 2 | 3 | window.onload = function () { 4 | ipcRenderer.send('webview', typeof WebView); 5 | }; 6 | -------------------------------------------------------------------------------- /spec/fixtures/module/preload.js: -------------------------------------------------------------------------------- 1 | const types = { 2 | require: typeof require, 3 | module: typeof module, 4 | exports: typeof exports, 5 | process: typeof process, 6 | Buffer: typeof Buffer 7 | }; 8 | console.log(JSON.stringify(types)); 9 | -------------------------------------------------------------------------------- /spec/fixtures/module/print-crash-parameters.js: -------------------------------------------------------------------------------- 1 | process.crashReporter.addExtraParameter('hello', 'world'); 2 | process.stdout.write(JSON.stringify(process.crashReporter.getParameters()) + '\n'); 3 | -------------------------------------------------------------------------------- /spec/fixtures/module/process-stdout.js: -------------------------------------------------------------------------------- 1 | process.stdout.write('pipes stdio'); 2 | -------------------------------------------------------------------------------- /spec/fixtures/module/process_args.js: -------------------------------------------------------------------------------- 1 | process.on('message', function () { 2 | process.send(process.argv); 3 | process.exit(0); 4 | }); 5 | -------------------------------------------------------------------------------- /spec/fixtures/module/run-as-node.js: -------------------------------------------------------------------------------- 1 | console.log(JSON.stringify({ 2 | stdoutType: process.stdout._type, 3 | processType: typeof process.type, 4 | window: typeof window 5 | })); 6 | -------------------------------------------------------------------------------- /spec/fixtures/module/send-later.js: -------------------------------------------------------------------------------- 1 | const { ipcRenderer } = require('electron'); 2 | window.onload = function () { 3 | ipcRenderer.send('answer', typeof window.process, typeof window.Buffer); 4 | }; 5 | -------------------------------------------------------------------------------- /spec/fixtures/module/set-global-preload-1.js: -------------------------------------------------------------------------------- 1 | window.preload1 = 'preload-1'; 2 | -------------------------------------------------------------------------------- /spec/fixtures/module/set-global-preload-2.js: -------------------------------------------------------------------------------- 1 | window.preload2 = window.preload1 + '-2'; 2 | -------------------------------------------------------------------------------- /spec/fixtures/module/set-global-preload-3.js: -------------------------------------------------------------------------------- 1 | window.preload3 = window.preload2 + '-3'; 2 | -------------------------------------------------------------------------------- /spec/fixtures/module/set-global.js: -------------------------------------------------------------------------------- 1 | if (!window.test) window.test = 'preload'; 2 | -------------------------------------------------------------------------------- /spec/fixtures/module/set-immediate.js: -------------------------------------------------------------------------------- 1 | process.on('uncaughtException', function (error) { 2 | process.send(error.message); 3 | process.exit(1); 4 | }); 5 | 6 | process.on('message', function () { 7 | setImmediate(function () { 8 | process.send('ok'); 9 | process.exit(0); 10 | }); 11 | }); 12 | -------------------------------------------------------------------------------- /spec/fixtures/module/test.coffee: -------------------------------------------------------------------------------- 1 | module.exports = yes 2 | -------------------------------------------------------------------------------- /spec/fixtures/module/uv-dlopen.js: -------------------------------------------------------------------------------- 1 | require('@electron-ci/uv-dlopen'); 2 | -------------------------------------------------------------------------------- /spec/fixtures/native-addon/echo/binding.gyp: -------------------------------------------------------------------------------- 1 | { 2 | "targets": [ 3 | { 4 | "target_name": "echo", 5 | "sources": [ 6 | "binding.cc" 7 | ] 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /spec/fixtures/native-addon/echo/lib/echo.js: -------------------------------------------------------------------------------- 1 | module.exports = require('../build/Release/echo.node').Print; 2 | -------------------------------------------------------------------------------- /spec/fixtures/native-addon/echo/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "main": "./lib/echo.js", 3 | "name": "@electron-ci/echo", 4 | "version": "0.0.1" 5 | } 6 | -------------------------------------------------------------------------------- /spec/fixtures/native-addon/uv-dlopen/binding.gyp: -------------------------------------------------------------------------------- 1 | { 2 | "targets": [ 3 | { 4 | "target_name": "test_module", 5 | "sources": [ "main.cpp" ], 6 | }, 7 | { 8 | "target_name": "libfoo", 9 | "type": "shared_library", 10 | "sources": [ "foo.cpp" ] 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /spec/fixtures/native-addon/uv-dlopen/foo.cpp: -------------------------------------------------------------------------------- 1 | extern "C" void foo() {} -------------------------------------------------------------------------------- /spec/fixtures/native-addon/uv-dlopen/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@electron-ci/uv-dlopen", 3 | "version": "0.0.1", 4 | "main": "index.js" 5 | } 6 | -------------------------------------------------------------------------------- /spec/fixtures/pages/a.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
Hello World
7 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spec/fixtures/pages/b.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /spec/fixtures/pages/base-page-security-onload-message.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /spec/fixtures/pages/base-page-security.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /spec/fixtures/pages/base-page.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /spec/fixtures/pages/beforeunload-false.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /spec/fixtures/pages/blank.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/spec/fixtures/pages/blank.html -------------------------------------------------------------------------------- /spec/fixtures/pages/button.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /spec/fixtures/pages/c.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /spec/fixtures/pages/cache-storage.html: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /spec/fixtures/pages/close.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /spec/fixtures/pages/d.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spec/fixtures/pages/datalist-text.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /spec/fixtures/pages/datalist-time.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spec/fixtures/pages/dom-ready.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /spec/fixtures/pages/e.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /spec/fixtures/pages/external-string.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /spec/fixtures/pages/fetch.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /spec/fixtures/pages/form-with-data.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 |
7 | 8 | 9 | -------------------------------------------------------------------------------- /spec/fixtures/pages/fullscreen.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spec/fixtures/pages/geolocation/index.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spec/fixtures/pages/history-replace.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /spec/fixtures/pages/history.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /spec/fixtures/pages/iframe-protocol.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | 12 | -------------------------------------------------------------------------------- /spec/fixtures/pages/insecure-resources.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /spec/fixtures/pages/ipc-message.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /spec/fixtures/pages/jquery.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /spec/fixtures/pages/key-events.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spec/fixtures/pages/media-id-reset.html: -------------------------------------------------------------------------------- 1 | 10 | -------------------------------------------------------------------------------- /spec/fixtures/pages/native-module.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /spec/fixtures/pages/onkeyup.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /spec/fixtures/pages/onmouseup.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /spec/fixtures/pages/partition/one.html: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /spec/fixtures/pages/pdf-in-iframe.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /spec/fixtures/sub-frames/frame-container.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Document 8 | 9 | 10 | This is the root page 11 | 12 | 13 | -------------------------------------------------------------------------------- /spec/fixtures/sub-frames/frame-with-frame-container.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Document 8 | 9 | 10 | This is the root page 11 | 12 | 13 | -------------------------------------------------------------------------------- /spec/fixtures/sub-frames/frame-with-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Document 8 | 9 | 10 | This is a frame, is has one child 11 | 12 | 13 | -------------------------------------------------------------------------------- /spec/fixtures/sub-frames/frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Document 8 | 9 | 10 | This is a frame, it has no children 11 | 12 | -------------------------------------------------------------------------------- /spec/fixtures/sub-frames/preload.js: -------------------------------------------------------------------------------- 1 | const { ipcRenderer, webFrame } = require('electron'); 2 | 3 | window.isolatedGlobal = true; 4 | 5 | ipcRenderer.send('preload-ran', window.location.href, webFrame.routingId); 6 | 7 | ipcRenderer.on('preload-ping', () => { 8 | ipcRenderer.send('preload-pong', webFrame.routingId); 9 | }); 10 | -------------------------------------------------------------------------------- /spec/fixtures/sub-frames/test.js: -------------------------------------------------------------------------------- 1 | console.log('hello'); 2 | -------------------------------------------------------------------------------- /spec/fixtures/test.asar/a.asar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/spec/fixtures/test.asar/a.asar -------------------------------------------------------------------------------- /spec/fixtures/test.asar/echo.asar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/spec/fixtures/test.asar/echo.asar -------------------------------------------------------------------------------- /spec/fixtures/test.asar/empty.asar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/spec/fixtures/test.asar/empty.asar -------------------------------------------------------------------------------- /spec/fixtures/test.asar/file: -------------------------------------------------------------------------------- 1 | file 2 | -------------------------------------------------------------------------------- /spec/fixtures/test.asar/logo.asar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/spec/fixtures/test.asar/logo.asar -------------------------------------------------------------------------------- /spec/fixtures/test.asar/script.asar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/spec/fixtures/test.asar/script.asar -------------------------------------------------------------------------------- /spec/fixtures/test.asar/unpack.asar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/spec/fixtures/test.asar/unpack.asar -------------------------------------------------------------------------------- /spec/fixtures/test.asar/unpack.asar.unpacked/a.txt: -------------------------------------------------------------------------------- 1 | a 2 | -------------------------------------------------------------------------------- /spec/fixtures/test.asar/unpack.asar.unpacked/atom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/spec/fixtures/test.asar/unpack.asar.unpacked/atom.png -------------------------------------------------------------------------------- /spec/fixtures/test.asar/video.asar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/spec/fixtures/test.asar/video.asar -------------------------------------------------------------------------------- /spec/fixtures/test.asar/web.asar: -------------------------------------------------------------------------------- 1 |  {"files":{"index.html":{"size":150,"offset":"0","integrity":{"algorithm":"SHA256","hash":"d0c74a69720d745496017312b205ddcc2fb0b6cd7dcf6a379a953d2d16675afd","blockSize":4194304,"blocks":["d0c74a69720d745496017312b205ddcc2fb0b6cd7dcf6a379a953d2d16675afd"]}}}} 2 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /spec/fixtures/test.asar/worker_threads.asar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/spec/fixtures/test.asar/worker_threads.asar -------------------------------------------------------------------------------- /spec/fixtures/testsnap.js: -------------------------------------------------------------------------------- 1 | // taken from https://chromium.googlesource.com/v8/v8.git/+/HEAD/test/cctest/test-serialize.cc 2 | // eslint-disable-next-line @typescript-eslint/no-unused-vars 3 | function f () { return g() * 2; } 4 | function g () { return 43; } 5 | -------------------------------------------------------------------------------- /spec/fixtures/video-source-image.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/win32ss/supermium-electron/202fe0435f9e192da80ff05c027cce4b7ef66cb7/spec/fixtures/video-source-image.webp -------------------------------------------------------------------------------- /spec/fixtures/webview/fullscreen/frame.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | WebView 4 |
5 | 6 | 13 | 14 | -------------------------------------------------------------------------------- /spec/fixtures/workers/load_shared_worker.html: -------------------------------------------------------------------------------- 1 | 15 | 16 | -------------------------------------------------------------------------------- /spec/fixtures/workers/load_worker.html: -------------------------------------------------------------------------------- 1 | 15 | -------------------------------------------------------------------------------- /spec/fixtures/workers/shared_worker.js: -------------------------------------------------------------------------------- 1 | this.onconnect = function (event) { 2 | const port = event.ports[0]; 3 | port.start(); 4 | port.onmessage = function (event) { 5 | port.postMessage(event.data); 6 | }; 7 | }; 8 | -------------------------------------------------------------------------------- /spec/fixtures/workers/shared_worker_node.js: -------------------------------------------------------------------------------- 1 | self.onconnect = function (event) { 2 | const port = event.ports[0]; 3 | port.start(); 4 | port.postMessage([typeof process, typeof setImmediate, typeof global, typeof Buffer].join(' ')); 5 | }; 6 | -------------------------------------------------------------------------------- /spec/fixtures/workers/worker.js: -------------------------------------------------------------------------------- 1 | this.onmessage = function (msg) { 2 | this.postMessage(msg.data); 3 | }; 4 | -------------------------------------------------------------------------------- /spec/fixtures/workers/worker_node.js: -------------------------------------------------------------------------------- 1 | self.postMessage([typeof process, typeof setImmediate, typeof global, typeof Buffer].join(' ')); 2 | -------------------------------------------------------------------------------- /spec/fixtures/workers/workers.asar: -------------------------------------------------------------------------------- 1 | hd_{"files":{"shared_worker.js":{"size":163,"offset":"0"},"worker.js":{"size":67,"offset":"163"}}}this.onconnect = function (event) { 2 | const port = event.ports[0]; 3 | port.start(); 4 | port.onmessage = function (event) { 5 | port.postMessage(event.data); 6 | }; 7 | }; 8 | this.onmessage = function (msg) { 9 | this.postMessage(msg.data); 10 | }; 11 | -------------------------------------------------------------------------------- /tsconfig.default_app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "rootDir": "default_app" 5 | }, 6 | "include": [ 7 | "default_app", 8 | "typings" 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /tsconfig.electron.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "rootDir": "lib" 5 | }, 6 | "include": [ 7 | "lib", 8 | "typings" 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /tsconfig.script.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "rootDir": ".", 5 | "noEmit": true, 6 | "skipLibCheck": true 7 | }, 8 | "include": [ 9 | "script" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "include": [ 4 | "spec", 5 | "typings" 6 | ] 7 | } 8 | --------------------------------------------------------------------------------