<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>242930</bug_id>
          
          <creation_ts>2022-07-19 19:56:20 -0700</creation_ts>
          <short_desc>Make webkit*Fullscreen  properties as an alias of standard fullscreen ones</short_desc>
          <delta_ts>2022-10-13 11:39:14 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebCore Misc.</component>
          <version>Safari Technology Preview</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>158125</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>BrowserCompat, InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Karl Dubost">karlcow</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>han.guokai</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1885280</commentid>
    <comment_count>0</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2022-07-19 19:56:20 -0700</bug_when>
    <thetext>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 &lt;- webkitFullscreenElement.
* requestFullscreen &lt;- webkitRequestFullscreen
* exitFullscreen    &lt;- webkitExitFullscreen


it is common to see code such as 

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

This can&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1885281</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-07-19 19:57:23 -0700</bug_when>
    <thetext>&lt;rdar://problem/97296290&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1885341</commentid>
    <comment_count>2</comment_count>
    <who name="Sam Sneddon [:gsnedders]">gsnedders</who>
    <bug_when>2022-07-20 05:34:31 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 158125 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>