We need to go deeper
This commit is contained in:
parent
a5fb6e26db
commit
6d59cc03f1
@ -1109,10 +1109,7 @@
|
||||
visibility: function() {
|
||||
var event, prefix, property;
|
||||
|
||||
if ('visibilityState' in document) {
|
||||
return;
|
||||
}
|
||||
if (!(prefix = ('webkitVisibilityState' in document ? 'webkit' : 'mozVisibilityState' in document ? 'moz' : void 0))) {
|
||||
if ('visibilityState' in document || !(prefix = ('webkitVisibilityState' in document ? 'webkit' : 'mozVisibilityState' in document ? 'moz' : void 0))) {
|
||||
return;
|
||||
}
|
||||
property = prefix + 'VisibilityState';
|
||||
|
||||
@ -3,12 +3,13 @@ Polyfill =
|
||||
Polyfill.visibility()
|
||||
visibility: ->
|
||||
# page visibility API
|
||||
return if 'visibilityState' of document
|
||||
return unless prefix = (
|
||||
if 'webkitVisibilityState' of document
|
||||
'webkit'
|
||||
else if 'mozVisibilityState' of document
|
||||
'moz'
|
||||
return if 'visibilityState' of document or not (
|
||||
prefix = (
|
||||
if 'webkitVisibilityState' of document
|
||||
'webkit'
|
||||
else if 'mozVisibilityState' of document
|
||||
'moz'
|
||||
)
|
||||
)
|
||||
|
||||
property = prefix + 'VisibilityState'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user