[Webkit-unassigned] [Bug 242930] New: Make webkit*Fullscreen properties as an alias of standard fullscreen ones

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 19 19:56:20 PDT 2022


https://bugs.webkit.org/show_bug.cgi?id=242930

            Bug ID: 242930
           Summary: Make webkit*Fullscreen  properties as an alias of
                    standard fullscreen ones
           Product: WebKit
           Version: Safari Technology Preview
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebCore Misc.
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: karlcow at apple.com

Currently WebKit is the only rendering engine using the prefixed property for fullScreen: window.document.webkitFullscreenElement

the standard property is implemented on Gecko and Blink.
See https://developer.mozilla.org/en-US/docs/Web/API/Document/fullscreenElement#browser_compatibility

It is probably time to add aliases 

* fullscreenElement <- webkitFullscreenElement.
* requestFullscreen <- webkitRequestFullscreen
* exitFullscreen    <- webkitExitFullscreen


it is common to see code such as 

```
{
  key: "isFullscreen",
  value: function() {
      return window.document.fullscreenElement || window.document.webkitFullscreenElement || window.document.mozFullScreenElement || window.document.msFullscreenElement
  }
}
```

This can't be fully removed because of probable webcompat breakage.

worse it encourages code like this. (if you read this, do not do that)

```
const isFullScreenCapable =
    document.fullscreenElement || document.webkitFullScreenElement;
  const isWebkit = document.webkitFullScreenElement;

  if (isFullScreenCapable) {
    if (isWebkit) {
      document.webkitExitFullscreen();
    } else {
      document.exitFullscreen();
    }
  }

  if (isWebkit) {
    canvas.webkitRequestFullscreen();
  } else {
    canvas.requestFullscreen();
  }
```

and allow for fingerprinting.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220720/b873958b/attachment.htm>


More information about the webkit-unassigned mailing list