* feat: enable nativeWindowOpen by default
* set nativeWindowOpen: false on spec/ main window
* update snapshots
* fix tests
* fix test
* fix webview test missing allowpopups
* fix other test
* update default
* fix: invoke the window open handler for _blank links
* feat: add disposition to setWindowOpenHandler details
* fix: pass postData to new-window event
* postData can be heterogeneous
* fix type of postBody
* fix type of UploadFile and UploadRawData to be discriminated unions
* exclude the empty string from additionalFeatures
* add a test
* add postBody and referrer to setWindowOpenHandler args
* appease typescript
* Update api-browser-window-spec.ts
* update snapshots
* docs: update Node global symbols example to use contextBridge
* Trigger Build
* docs: change Node API example to show how to expose a crypto API
Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
* docs: Fix lint warning for crypto code sample
* docs: update node API example description to emphasize APIs instead of symbols
Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
* feat: Raise a browser view via `BrowserWindow.setTopBrowserView()`.
This is similar to removing and re-adding a browser view, but avoids a visible flicker as the browser view is not removed from the window when using `setTopBrowserView`. Note: if the given browser view is not attached to the window, it will be added.
This commit contains the macOS implementation.
* feat: setTopBrowserView support for Windows and Linux
* docs: add info about setTopBrowserView
* docs: Clarify behavior when browserView is not yet attached.
* fix: throw en error when browserView is not attached to the window
* fix: build error
* fix: test
* fix: add test case
* fix: tests
* fix: reparenting
* fix: close second window in tests
Co-authored-by: sentialx <sentialx@gmail.com>
* fix: optionally transform processes on win.SetVisibleOnAllWorkspaces on macOS, making it backwards-compatible with v9.2.1 (#27101)
* fix: optionally transform processes on win.SetVisibleOnAllWorkspaces on macOS, making it backwards-compatible with v9.2.1 (#27101)
Co-authored-by: Cyrus Roshan <cyrusroshan@users.noreply.github.com>
* Rewrite titleBarStyle impls with WindowButtonsView
* Remove fullscreenWindowTitle option
* Make buttons show correctly under RTL
* Fix docs about traffic lights position
* Fix test on fullscreen resizable
* Fix button states with closabe/minimizable/fullscreenable
* Fix typo
* Deprecate the fullscreenWindowTitle option
* feat: support exclude from capture on Windows
Check for WDA_EXCLUDEFROMCAPTURE support, and fallback to WDA_MONITOR. Windows versions that support exclude from capture will exclude the window entirely when `setContentProtection` is enabled similar to how Mac behaves. Fall back to `WDA_MONITOR` for windows verisions that do not support.
This flag is mentioned at the very end of a Microsoft blog post here: https://blogs.windows.com/windowsdeveloper/2019/09/16/new-ways-to-do-screen-capture/
Use WDA_EXCLUDEFROMCAPTURE for content protection on windows
Starting with Windows 10, version 2004 this will exclude a window similar to the expected behavior on mac. It is safe to use WDA_EXCLUDEFROMCAPTURE on older Windows versions, as it will still behave as if WDA_MONITOR is applied.
https://github.com/microsoft/Windows.UI.Composition-Win32-Samples/issues/64#issuecomment-697074762
See the docs here: https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setwindowdisplayaffinity
* docs: update setContentProtection docs
Update `setContentProtection` docs with `WDA_EXCLUDEFROMCAPTURE` info. This is to support screen capture fully excluding a particular window instead of showing it as a black screen.
* feat: add worldSafe flag for executeJS results
* chore: do not log warning for webContents.executeJS
* Apply suggestions from code review
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
* chore: apply PR feedback
* chore: split logic a bit
* chore: allow primitives through the world safe checl
* chore: clean up per PR feedback
* chore: flip boolean logic
* chore: update per PR feedback
* chore: fix typo
* chore: fix spec
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
Address incorrect typing for isEnabled. The root cause of this was due
to missing backticks which caused the docs parser to think that the
return type of the `isEnabled` function was null, where it was supposed
to be a boolean type.
The side effect of this was that the generated typescript typings were
incorrect for this function.
Fixes#24409
* docs: document what experimental means explicitly
* Apply suggestions from code review
Co-Authored-By: Jeremy Apthorp <jeremya@chromium.org>
* Update experimental.md
Co-authored-by: Jeremy Apthorp <jeremya@chromium.org>
* docs: fix minor grammar error 'punctuations'
* docs: fix minor grammar error pluralizing Chromium
* docs: fix typo 'updateCurrentActiviy'
* docs: use consistent spelling of 'behavior'
* docs: use 'macOS' instead of 'Mac OS' or 'OS X'.
* docs: use 'GTK' instead of 'GTK+'
https://mail.gnome.org/archives/gtk-devel-list/2019-February/msg00000.html
* docs: minor capitalization: use 'TCP' not 'tcp'
* Update docs/development/build-instructions-linux.md
Co-Authored-By: Mark Lee <malept@users.noreply.github.com>
Co-authored-by: Mark Lee <malept@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@github.com>
* feat: default gtk darkTheme option to nativeTheme.shouldUseDarkColors for better platform support
* chore: update syntax for PR feedback
* refactor: only define SetGTKDarkThemeEnabled when needed
Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
* feat: set app.enableRendererProcessReuse to true by default
* chore: add context aware info to breaking changes doc
* spec: fix nodeIntegration in child windows test for rendererprocessreuse
* spec: fix remote listeners in destroyed renderers spec as the error is now async
* Update api-browser-window-spec.ts
* chore: deprecate affinity
* chore: fix docs
* spec: handle tests crashing without an exist code
* spec: update tests for new rendererprocessreuse default
* spec: with renderer process re-use we get to destroy less views