Better return guard for the page visibility polyfill.
This commit is contained in:
parent
61d55c2cba
commit
9eaf16576c
@ -27,7 +27,7 @@ Polyfill =
|
|||||||
cb new Blob [ui8a], type: 'image/png'
|
cb new Blob [ui8a], type: 'image/png'
|
||||||
visibility: ->
|
visibility: ->
|
||||||
# page visibility API
|
# page visibility API
|
||||||
return unless 'webkitHidden' of document
|
return if 'visibilityState' of d
|
||||||
Object.defineProperties HTMLDocument.prototype,
|
Object.defineProperties HTMLDocument.prototype,
|
||||||
visibilityState:
|
visibilityState:
|
||||||
get: -> @webkitVisibilityState
|
get: -> @webkitVisibilityState
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user