Better return guard for the page visibility polyfill.

This commit is contained in:
Mayhem 2013-11-10 04:20:00 +01:00
parent 61d55c2cba
commit 9eaf16576c

View File

@ -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