Recently, I've come across certain web pages that have a unique feature preventing screen capture of specific regions. When attempting to take a screenshot using Chrome, some areas that are visible on the live page appear as black frames in the captured image. Surprisingly, Firefox does not exhibit this behavior and screenshots are taken normally without any issues.
An example of a site with this functionality is Netflix. Trying to use the "print screen" key while watching a movie on Chrome (latest update) on a Windows 11 desktop PC results in capturing video controls but showing only a black frame instead of the actual video content.
I'm curious about what kind of JavaScript functionality or API enables this interesting feature?