* fix: allow ESM loads from within ASAR files
* fix: ensure that ESM entry points finish loading before app ready
* fix: allow loading ESM entrypoints via default_app
* fix: allow ESM loading for renderer preloads
* docs: document current known limitations of esm
* chore: add patches to support blending esm handlers
* refactor: use SetDefersLoading instead of JoinAppCode in renderers
Blink has it's own event loop so pumping the uv loop in the renderer is not enough, luckily in blink we can suspend the loading of the frame while we do additional work.
* chore: add patch to expose SetDefersLoading
* fix: use fileURLToPath instead of pathname
* chore: update per PR feedback
* fix: fs.exists/existsSync should never throw
* fix: convert path to file url before importing
* fix: oops
* fix: oops
* Update docs/tutorial/esm-limitations.md
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
* windows...
* windows...
* chore: update patches
* spec: fix tests and document empty body edge case
* Apply suggestions from code review
Co-authored-by: Daniel Scalzi <d_scalzi@yahoo.com>
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
* spec: add tests for esm
* spec: windows
* chore: update per PR feedback
* chore: update patches
* Update shell/common/node_bindings.h
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
* chore: update patches
* rebase
* use cjs loader by default for preload scripts
* chore: fix lint
* chore: update patches
* chore: update patches
* chore: fix patches
* build: debug depshash
* ?
* Revert "build: debug depshash"
This reverts commit 0de82523fb.
* chore: allow electron as builtin protocol in esm loader
* Revert "Revert "build: debug depshash""
This reverts commit ff86b1243c.
* chore: fix esm doc
* chore: update node patches
---------
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
Co-authored-by: electron-patch-conflict-fixer[bot] <83340002+electron-patch-conflict-fixer[bot]@users.noreply.github.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Daniel Scalzi <d_scalzi@yahoo.com>
* feat:Add setter and getter apis to specify udp port range for webrtc (issue#9042)
* lint error fix for PR#39046
* feat: add setter and getter apis to specify udp port range for webrtc (issue#9042) , changed for codereview
* fix lint error
* fix lint errors in file api-web-contents-spec.ts
* feat: add setter and getter apis to specify udp port range for webrtc (issue#9042) , changed for review from itsananderson
* feat: add setter and getter apis to specify udp port range for webrtc (issue#9042) , changed for review from jkleinsc
* fix lint error
* feat: add setter and getter apis to specify udp port range for webrtc (issue#9042) , changed for review from codebyter
* docs: fix some string union types
Improve Type Union Typings in the Docs
* test: add smoke tests
* test: update `ses.clearStorageData` test case
* test: update `ses.clearStorageData` test case
---------
Co-authored-by: mhli <mhli@hillinsight.com>
* chore: bump chromium in DEPS to 117.0.5846.0
* chore: update patches
* 4628901: Bump the macOS deployment target to 10.15
https://chromium-review.googlesource.com/c/chromium/src/+/4628901
* 4593350: [Private Network Access] Trigger Permission Prompt
https://chromium-review.googlesource.com/c/chromium/src/+/4593350
* 4631011: Remove unlaunched "InstallReplacementAndroidApp" Platform App APIs
https://chromium-review.googlesource.com/c/chromium/src/+/4631011
* chore: disable API deprecation warnings in NSKeyedArchiver
* chore: update libcxx filenames
* chore: bump chromium in DEPS to 117.0.5848.2
* chore: update feat_add_set_theme_source_to_allow_apps_to.patch
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4629743
No manual changes; patch succeeded with fuzz
* chore: update process_singleton.patch
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4605398
Trivial manual patch adjustments to account for code shear.
* chore: remove electron::BrowserContext::GetMediaDeviceIDSalt()
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4608130
upstream tldr:
- content::BrowserContext::GetMediaDeviceIDSalt()
- content::ContentBrowserClient::ArePersistentMediaDeviceIDsAllowed()
+ content::ContentBrowserClient::GetMediaDeviceIDSalt()
This commit leaves ElectronBrowserContext::GetMediaDeviceIDSalt() in
place (now non-virtual, non-override). It is now called by the new
function ElectronBrowserClient::GetMediaDeviceIDSalt().
As a followup, we might want to consider using the new upstream
media_device_salt::MediaDeviceSaltService and removing our
electron::MediaDeviceIDSalt code. CC @MarshallOfSound for 2nd
opinion since he has done the most work on MediaDeviceIDSalt and
may have more context.
* chore: fix iwyu breakage
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4629624
electron_browser_main_parts.cc uses ui::ColorProviderManager but didn't
include it. Things worked anyway because we got it indirectly from
content/public/browser/web_contents.h until 4629624.
* chore: remove call to base::mac::IsAtLeastOS10_14
upstream has bumped minimum version to 10.15 so this call is moot?
* chore: remove obsolete API_AVAILABLE calls in IAP
upstream has bumped minimum version to 10.15 so this call is moot?
* chore: remove obsolete API_AVAILABLE calls in electron_application_delegate
upstream has bumped minimum version to 10.15 so this call is moot?
* chore: remove broken-before-macOS-10.15 patch in mas_avoid_usage_of_private_macos_apis.patch
Upstream has bumped minimum to macOS 10.15
* chore: remove @available(macOS 10.14) check
Upstream minimum requirement for macOS is now 10.15
* chore: update patches
* chore: bump chromium in DEPS to 117.0.5850.0
* chore: update patches
* chore: bump chromium in DEPS to 117.0.5852.0
* chore: update patches
* Move two params from NetworkContextParams to NetworkContextFilePaths.
https://chromium-review.googlesource.com/c/chromium/src/+/4615930
* WebUSB: Add exclusionFilters to USBRequestDeviceOptions
https://chromium-review.googlesource.com/c/chromium/src/+/4614682
* Convert /chrome/browser/ui to use ARC
https://chromium-review.googlesource.com/c/chromium/src/+/4615920
* fixup! Bump the macOS deployment target to 10.15
* fixup! Bump the macOS deployment target to 10.15
* chore: update libcxx files
* win: Remove 10Glass from Windows10Glass function and var names
https://chromium-review.googlesource.com/c/chromium/src/+/4641314
* chore: revert 392e5f43 from chromium
* Add an ExecutionContext to ScriptState
https://chromium-review.googlesource.com/c/chromium/src/+/4609446
* fixup! Add an ExecutionContext to ScriptState
* chore: fix header
* Revert "chore: revert 392e5f43 from chromium"
This reverts commit b7f782943e4ce83cae8cd35780d8d3618cf0772c.
* fix: return correct min/max sizes in WinFrameView
* fixup! Revert chore: revert 392e5f43 from chromium
* fixup! Add an ExecutionContext to ScriptState
* Revert "fixup! Revert chore: revert 392e5f43 from chromium"
This reverts commit 7e2c7281abfc4f309255339fdba073d90a9ae3eb.
* Revert "fix: return correct min/max sizes in WinFrameView"
This reverts commit 3f418b1ab5155686730e087ae6cabe4a21b4bb61.
* Revert "Revert "chore: revert 392e5f43 from chromium""
This reverts commit 56296d8b7c434147e032e3c3b08c0e371b6c27ba.
---------
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
* build(deps): update @electron/lint-roller
* chore: type check JS in docs
* docs: add @ts-check and @ts-expect-error to code blocks
* chore: fix type check errors in docs
* chore: add ts-type to blocks
* feat: add will-navigate-in-frame event to webContents
* docs: add documentation for webview will-frame-navigate event
* feat: Eliminate isInPlace argument from will-frame-navigate event
* fix: Fire will-frame-navigate before will-navigate
* feat: send will-frame-navigate with a WebFrameMain in the event details
* docs: Update WebContents docs for new API signature
* feat: Add custom event forwarding for <webview> will-frame-navigate
* fix: wrap WebFrameMain so it can be sent as an event
* test: update webContents and <webview> tests to match new signatures
* chore: undo unnecessary change
* fix: don't switch will-navigate to use EmitNavigationEventDetails
* test: clean up will-navigate and will-frame-navigate tests for <webview>
* chore: apply lint fixes
* chore: move GetRenderFrameHost helper into anonymous namespace
* docs: auto-generate WillFrameNavigateDetails rather than defining it manually
* test: Update <webview> tests to actually pass under new spec runner
* docs: Add section explaining relationship between various nav events
* test: Add some tests to ensure navigation event order doesn't silently change
* test: Always monitor all nav events to ensure unexpected ones don't fire
* test: Add test to verify in-page navigation event order
* feat: Change to new style where extra params are exposed as event props
* fix: Remove unused EmitNavigationEventDetails
* fix: Update tests to use new async helpers
* docs: Rename and reorder sections documenting navigation events
---------
Co-authored-by: Milan Burda <milan.burda@gmail.com>
* fix: allow cancelling of bluetooth requests
allows cancelling of bluetooth requests when no devices present
* docs: update docs to reflect how bluetooth works.
* Allow an absolute path to be used for creating sessions
Allows an absolute path to be used for creating sessions
by adding the session.fromPath() API.
* Fixup! Clarify that an emptry string is not permitted as a parameter to fromPath()
* fix: about panel is a base::Value::Dict
* nix this test for a diff PR
* what if the about dialog was not blocking
* add this test back in
* document synchronicity
* github editor is a fan of spaces
Change factuality and word choice.
Added "or WOW" to the phrase, "when they are running the x64 version under Rosetta", to reflect the use of a supported platform, Windows, as a possible scenario.
Changed the wording of that same sentence to make it appear clearer. "incorrectly" to "mistakenly" and moved this word to before the verb instead of the end of the sentence.
#### Description of Change
The first sentence within the documentation "[Important: signing your code](https://www.electronjs.org/docs/latest/tutorial/tutorial-packaging#important-signing-your-code)" is grammatically incorrect.
> In order to distribute desktop applications to end users, we highly recommended for you to code sign your Electron app.
I've adjusted the copy to switch "highly recommended" to "highly recommend". I've also switched out "for you to code sign" for "that you code sign" for clarity.
> In order to distribute desktop applications to end users, we _highly recommend_ that you **code sign** your Electron app.
docs: fix code highlighting in preload tutorial
The highlighted lines in the code snippets were unaligned,
which could cause a newcomer unneeded confusion on what
lines need to be changed.
Fix incorrect highlight in an example snippet
At the moment, the "Communicating between processes" `main.js` snippet highlights the line containing `})` when the relevant line is `ipcMain.handle('ping', () => 'pong')`.
* Add MDN link to web-request-filter.md
When I was using the Electron docs I wanted to know how to use [webRequest.onBeforeSendHeaders](https://www.electronjs.org/docs/latest/api/web-request#webrequestonbeforesendheadersfilter-listener) but I was unable to correctly guess the correct format for the `WebRequestFilter` URL strings, and there was no explanation in the Electron docs. Eventually I googled it and found the MDN article which helped me.
* Update docs/api/structures/web-request-filter.md
Co-authored-by: Black-Hole <158blackhole@gmail.com>
* Update docs/api/structures/web-request-filter.md
Co-authored-by: Black-Hole <158blackhole@gmail.com>
Co-authored-by: Black-Hole <158blackhole@gmail.com>
* docs: fix broken links
* docs: change link to navigator.getUserMedia
Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
* docs: fix link in examples.md
Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
* chore: drop support for Windows 7 & 8
* chore: remove disable-redraw-lock.patch
* chore: update patches
* Update docs/breaking-changes.md
Co-authored-by: Erick Zhao <erick@hotmail.ca>
* Update docs/breaking-changes.md
Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>
* fix breaking-changes.md
* chore: note last supported version
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
* chore: add link to deprecation policy
* Update docs/breaking-changes.md
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
* update README.md
Co-authored-by: Milan Burda <miburda@microsoft.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Erick Zhao <erick@hotmail.ca>
Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
* feat: add support for WebUSB
* fixup for gn check
* fixup gn check on Windows
* Apply review feedback
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* chore: address review feedback
* chore: removed unneeded code
* Migrate non-default ScopedObservation<> instantiations to ScopedObservationTraits<> in chrome/browser/
https://chromium-review.googlesource.com/c/chromium/src/+/4016595
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* feat: add app.getSystemLanguage() API
* Change the API to getPreferredSystemLanguages
* Fix test
* Clarify docs and add Linux impl
* Remove USE_GLIB
* Don't add C to list
* Remove examples since there's a lot of edge cases
* Fix lint
* Add examples
* Fix compile error
* Apply PR feedback
* Update the example
* Updated docs on uploading
- replaced mention of Application Loader with Apple Transporter, its replacement
- replaced mention of iTunes Connect with App Store Connect
- updated link for creating a record
* Update mac-app-store-submission-guide.md
Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
* feat: Add BrowserWindow option to ignore Mission Control (macOS)
* There are many circumstances when app developers may want to hide their
windows from mission control. E.g., full screen overlays, small helper
windows, dialogs, etc.
* This PR adds the functionality, docs, and tests.
* chore:Rename variables
* Update shell/browser/native_window_mac.h
Co-authored-by: Samuel Maddock <samuel.maddock@gmail.com>
Co-authored-by: Samuel Maddock <samuel.maddock@gmail.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Correcting main example
The entry `*://electron.github.io` is invalid and produces an exception. i.e.
> UnhandledPromiseRejectionWarning: TypeError: Invalid url pattern *://electron.github.io: Empty path.
Setting a valid path to resolve this issue
Fixed MenuItem documentation
Some of the items in the list of possible roles were formatted differently, which made it harder to read.
Sorry if this was intended, but I found it easier to read with them all formatted the same.
* docs: use webContents.mainFrame.on() in MessagePort tutorial
* Update docs/tutorial/message-ports.md
Co-authored-by: Samuel Maddock <smaddock@salesforce.com>
Co-authored-by: Samuel Maddock <smaddock@salesforce.com>
* docs: changed event.data to data under the message.port in docs
* docs: corrected BrowserWindow wrong usage and change window.messagePort to window.electronMessagePort
Update security.md
Under "4. Process Sandboxing", it said "For mor information on what `contextIsolation` is..." which was the previous section (copied from there). This updates it to say "For more information on what Process Sandboxing is..."
* Updates to allow for using a custom v8 snapshot file name
* Allow using a custom v8 snapshot file name
* Fix up patch due to merge
* Use fuse to set up custom v8 snapshot file in browser process
* Refactor to use delegate instead of command line parameter
* Refactoring
* Update due to merge
* PR comments
* Rename patch
* Rename patch
* Fix reference definitions should be needed
* typo
* typo
* typo and style
* Fix reference definitions should be needed
* Fix typo
* restore to previous
* Use absolute URL in faq.md image link
The relative link is rendered relative to the host domain, which works fine when viewing it on Github, but since you also use the same generated HTML in your doc site, the link is broken. See here: https://www.electronjs.org/docs/latest/faq#the-font-looks-blurry-what-is-this-and-what-can-i-do
Using an absolute URL here should fix the issue on the main site.
* Use inline image reference for subpixel rendering example
As suggested by @dsanders11
* fix: pass rfh instances through to the permission helper
* refactor: use WeakDocumentPtr instead of frame node id
* fix: handle missing initiator document
* fix: dispatch openExternal event for top level webview navs still