From 44bd560068d545a51c8300a0255983c90a0dc3e7 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 16:54:21 -0700 Subject: [PATCH] docs: improve `win.setContentProtection()` docs (#47763) * docs: improve win.setContentProtection() docs Co-authored-by: Milan Burda * docs: update Windows display affinity value Co-authored-by: Niklas Wenzel * docs: update Windows behavior description Co-authored-by: Niklas Wenzel * Revert "docs: update Windows behavior description" This reverts commit 6d1942c53a4951b985643432d64cf79df26b2d34. Co-authored-by: Niklas Wenzel * Revert "docs: update Windows display affinity value" This reverts commit c15363e75d271100a437387e4512f084cb8d3cf9. Co-authored-by: Niklas Wenzel --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Milan Burda Co-authored-by: Niklas Wenzel --- docs/api/browser-window.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/api/browser-window.md b/docs/api/browser-window.md index 0f488b1388ab..4d1ba3cbc9ed 100644 --- a/docs/api/browser-window.md +++ b/docs/api/browser-window.md @@ -1533,8 +1533,8 @@ events. Prevents the window contents from being captured by other apps. -On macOS it sets the NSWindow's sharingType to NSWindowSharingNone. -On Windows it calls SetWindowDisplayAffinity with `WDA_EXCLUDEFROMCAPTURE`. +On macOS it sets the NSWindow's [`sharingType`](https://developer.apple.com/documentation/appkit/nswindow/sharingtype-swift.property?language=objc) to [`NSWindowSharingNone`](https://developer.apple.com/documentation/appkit/nswindow/sharingtype-swift.enum/none?language=objc). +On Windows it calls [`SetWindowDisplayAffinity`](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setwindowdisplayaffinity) with `WDA_EXCLUDEFROMCAPTURE`. For Windows 10 version 2004 and up the window will be removed from capture entirely, older Windows versions behave as if `WDA_MONITOR` is applied capturing a black window.