set default value of visibilityState and hidden

document.visibilityState and document.hidden  need default value.

Because  sometimes I need to check them's value in a function and the function will be called as soon as the app start-up.