API Documentation for: 1.0.6
Show:

PageVisibility Class

Defined in: PageVisibility:8
Namespace: cloudkid

Handle the page visiblity change, if supported

Constructor

PageVisibility

(
  • onFocus
  • onBlur
)

Defined in PageVisibility:8

Parameters:

  • onFocus Function

    Callback when the page becomes visible

  • onBlur Function

    Callback when the page loses visibility

Methods

destroy

()

Defined in destroy:109

Disable the detection

initialize

(
  • onFocus
  • onBlur
)

Defined in initialize:71

Create new Page visibility

Parameters:

  • onFocus Function

    The callback when the page comes into focus

  • onBlur Function

    The callback when the page loses focus

Properties

_onBlur

Function private

Defined in _onBlur:39

Callback when the page loses visibility

_onFocus

Function private

Defined in _onFocus:32

Callback when the page becomes visible

_onToggle

Function private

Defined in _onToggle:46

The visibility toggle function

_visibilityChange

String private

The name of the visibility change event for the browser