Skip to content

Commit

Permalink
Fix fullscreen polyfill test.
Browse files Browse the repository at this point in the history
Only install a getter for fullscreenElement if the property does not
exist.  Previously, we installed the getter if the property existed
but was null.

Change-Id: Ibea5bc63a75a98cd1d50c56ca99fac2aa38e449b
  • Loading branch information
joeyparrish committed Apr 21, 2015
1 parent 34c4a7b commit 7ea820c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/polyfill/fullscreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ shaka.polyfill.Fullscreen.install = function() {
proto.msExitFullscreen ||
proto.webkitExitFullscreen;

if (!document.fullscreenElement) {
if (!('fullscreenElement' in document)) {
Object.defineProperty(document, 'fullscreenElement', {
get: function() {
return document.mozFullScreenElement ||
Expand Down

0 comments on commit 7ea820c

Please sign in to comment.