Packages

class Notification extends raw.EventTarget

The Notification interface allows to notify users of an incoming message or event.

NOTE: requires permission Note: This feature is available in Web Workers.

MDN

returns

a new Notification

Annotations
@JSType() @JSGlobal("Notification") @native()
Linear Supertypes
raw.EventTarget, Object, Any, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Notification
  2. EventTarget
  3. Object
  4. Any
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Notification(title: String, options: NotificationOptions = ???)

    title

    The text title of the notification

    options

    The options to configure this notification

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. def addEventListener[T <: raw.Event](type: String, listener: Function1[T, _], options: EventListenerOptions): Unit

    The EventTarget.addEventListener() method registers the specified listener on the EventTarget it's called on.

    The EventTarget.addEventListener() method registers the specified listener on the EventTarget it's called on. The event target may be an Element in a document, the Document itself, a Window, or any other object that supports events (such as XMLHttpRequest).

    This implementation accepts a settings object of type EventListenerOptions.

    MDN

    Definition Classes
    EventTarget
  5. def addEventListener[T <: raw.Event](type: String, listener: Function1[T, _], useCapture: Boolean = js.native): Unit

    The EventTarget.addEventListener() method registers the specified listener on the EventTarget it's called on.

    The EventTarget.addEventListener() method registers the specified listener on the EventTarget it's called on. The event target may be an Element in a document, the Document itself, a Window, or any other object that supports events (such as XMLHttpRequest).

    MDN

    Definition Classes
    EventTarget
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. val body: String

    The body read-only property of the Notification interface indicates the body string of the notification, as specified in the body option of the Notification() constructor.

    The body read-only property of the Notification interface indicates the body string of the notification, as specified in the body option of the Notification() constructor.

    MDN

  8. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  9. def close(): Unit

    The close() method of the Notification interface is used to close a previously displayed notification.

    The close() method of the Notification interface is used to close a previously displayed notification.

    MDN

  10. val data: Object

    The data read-only property of the Notification interface returns a structured clone of the notification's data, as specified in the data option of the Notification() constructor.

    The data read-only property of the Notification interface returns a structured clone of the notification's data, as specified in the data option of the Notification() constructor.

    The notification's data can be any arbitrary data that you want associated with the notification.

    MDN

  11. val dir: String

    The dir read-only property of the Notification interface indicates the text direction of the notification, asspecified in the dir option of the Notification() constructor.

    The dir read-only property of the Notification interface indicates the text direction of the notification, asspecified in the dir option of the Notification() constructor.

    MDN

  12. def dispatchEvent(evt: raw.Event): Boolean

    Dispatches an Event at the specified EventTarget, invoking the affected EventListeners in the appropriate order.

    Dispatches an Event at the specified EventTarget, invoking the affected EventListeners in the appropriate order. The normal event processing rules (including the capturing and optional bubbling phase) apply to events dispatched manually with dispatchEvent().

    MDN

    Definition Classes
    EventTarget
  13. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  15. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  16. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  17. def hasOwnProperty(v: String): Boolean
    Definition Classes
    Object
  18. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  19. val icon: String

    The icon read-only property of the Notification interface contains the URL of an icon to be displayed as part of the notification, as specified in the icon option of the Notification() constructor.

    The icon read-only property of the Notification interface contains the URL of an icon to be displayed as part of the notification, as specified in the icon option of the Notification() constructor.

    MDN

  20. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  21. def isPrototypeOf(v: Object): Boolean
    Definition Classes
    Object
  22. val lang: String

    The lang read-only property of the Notification interface indicates the text direction of the notification, as specified in the lang option of the Notification() constructor.

    The lang read-only property of the Notification interface indicates the text direction of the notification, as specified in the lang option of the Notification() constructor.

    MDN

  23. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  24. val noscreen: Boolean

    The noscreen read-only property of the Notification interface specifies whether the notification firing should enable the device's screen or not, as specified in the noscreen option of the Notification() constructor.

    The noscreen read-only property of the Notification interface specifies whether the notification firing should enable the device's screen or not, as specified in the noscreen option of the Notification() constructor.

    MDN

  25. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  26. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  27. var onclick: Function0[Any]

    The onclick property of the Notification interface specifies an event listener to receive click events.

    The onclick property of the Notification interface specifies an event listener to receive click events. These events occur when the user clicks on a displayed Notification.

    MDN

  28. var onerror: Function0[Any]

    The onerror property of the Notification interface specifies an event listener to receive error events.

    The onerror property of the Notification interface specifies an event listener to receive error events. These events occur when something goes wrong with a Notification (in many cases an error preventing the notification from being displayed.)

    MDN

  29. def propertyIsEnumerable(v: String): Boolean
    Definition Classes
    Object
  30. def removeEventListener[T <: raw.Event](type: String, listener: Function1[T, _], options: EventListenerOptions): Unit

    Removes the event listener previously registered with EventTarget.addEventListener.

    Removes the event listener previously registered with EventTarget.addEventListener.

    This implementation accepts a settings object of type EventListenerOptions.

    MDN

    Definition Classes
    EventTarget
  31. def removeEventListener[T <: raw.Event](type: String, listener: Function1[T, _], useCapture: Boolean = js.native): Unit

    Removes the event listener previously registered with EventTarget.addEventListener.

    Removes the event listener previously registered with EventTarget.addEventListener.

    MDN

    Definition Classes
    EventTarget
  32. val renotify: Boolean

    The renotify read-only property of the Notification interface specifies whether the user should be notified after a new notification replaces an old one, as specified in the renotify option of the Notification() constructor.

    The renotify read-only property of the Notification interface specifies whether the user should be notified after a new notification replaces an old one, as specified in the renotify option of the Notification() constructor.

    MDN

  33. val silent: Boolean

    The silent read-only property of the Notification interface specifies whether the notification should be silent, i.e.

    The silent read-only property of the Notification interface specifies whether the notification should be silent, i.e. no sounds or vibrations should be issued, regardless of the device settings. This is specified in the renotify option of the Notification() constructor.

    MDN

  34. val sound: String

    The sound read-only property of the Notification interface specifies the URL of an audio file to be played when the notification fires.

    The sound read-only property of the Notification interface specifies the URL of an audio file to be played when the notification fires. This is specified in the sound option of the Notification() constructor.

    MDN

  35. val sticky: Boolean

    The sticky read-only property of the Notification interface specifies whether the notification should be 'sticky', i.e.

    The sticky read-only property of the Notification interface specifies whether the notification should be 'sticky', i.e. not easily clearable by the user. This is specified in the sticky option of the Notification() constructor.

    MDN

  36. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  37. val tag: String

    The tag read-only property of the Notification interface signifies an identifying tag for the notification, as specified in the tag option of the Notification() constructor.

    The tag read-only property of the Notification interface signifies an identifying tag for the notification, as specified in the tag option of the Notification() constructor.

    The idea of notification tags is that more than one notification can share the same tag, linking them together. One notification can then be programmatically replaced with another to avoid the users' screen being filled up with a huge number of similar notifications.

    MDN

  38. def toLocaleString(): String
    Definition Classes
    Object
  39. def toString(): String
    Definition Classes
    AnyRef → Any
  40. def valueOf(): Any
    Definition Classes
    Object
  41. val vibrate: Array[Double]

    The vibrate read-only property of the Notification interface.

    The vibrate read-only property of the Notification interface. Specifies a vibration pattern for devices with vibration hardware to emit.

    MDN

  42. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  43. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  44. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from raw.EventTarget

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped