Packages

t

org.scalajs.dom.raw

PageVisibility

trait PageVisibility extends Object

The Page Visibility API lets you know when a webpage is visible or in focus. With tabbed browsing, there is a reasonable chance that any given webpage is in the background and thus not visible to the user. When the user minimizes the webpage or moves to another tab, the API sends a visibilitychange event regarding the visibility of the page. You can detect the event and perform some actions or behave differently. For example, if your web app is playing a video, it would pause the moment the user looks at another browser, and plays again when the user returns to the tab. The user does not lose their place in the video and can continue watching.

MDN

Annotations
@RawJSType() @native()
See also

Page Visibility (Second Edition) W3C Recommendation 29 October 2013

Linear Supertypes
Object, Any, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. PageVisibility
  2. Object
  3. Any
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  10. def hasOwnProperty(v: String): Boolean
    Definition Classes
    Object
  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. def hidden: Boolean

    Returns true if the page is in a state considered to be hidden to the user, and false otherwise.

    Returns true if the page is in a state considered to be hidden to the user, and false otherwise.

    MDN

  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. def isPrototypeOf(v: Object): Boolean
    Definition Classes
    Object
  15. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  17. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  18. def propertyIsEnumerable(v: String): Boolean
    Definition Classes
    Object
  19. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  20. def toLocaleString(): String
    Definition Classes
    Object
  21. def toString(): String
    Definition Classes
    AnyRef → Any
  22. def valueOf(): Any
    Definition Classes
    Object
  23. def visibilityState: |[VisibilityState, String]

    Is a string denoting the visibility state of the document.

    Is a string denoting the visibility state of the document.

    Note: or a vendor prefixed DOMString as defined in 4.5 Vendor Prefixes

    MDN

  24. val visibilitychange: Function1[Event, _]

    The visibilitychange event is fired when the content of a tab has become visible or has been hidden.

    The visibilitychange event is fired when the content of a tab has become visible or has been hidden.

    MDN

  25. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped