Override document.hidden

This commit is contained in:
Cheng Zhao 2015-10-01 18:39:35 +08:00
parent 8d61531f4e
commit 5d9e4fc8fd

View file

@ -122,3 +122,7 @@ window.history.go = (offset) -> sendHistoryOperation 'goToOffset', offset
Object.defineProperty window.history, 'length', Object.defineProperty window.history, 'length',
get: -> get: ->
getHistoryOperation 'length' getHistoryOperation 'length'
# Make document.hidden return the correct value.
Object.defineProperty document, 'hidden',
get: -> !remote.getCurrentWindow().isVisible()