WithEvents

interface WithEvents<out T : EventTarget>

Contains all javascript event types. Take a look here.

Sometimes it is necessary to use a more generic type (like Event) because the type that is offered to the listener is not always consistent (on different browsers, different actions, etc.)

Inheritors

Properties

Link copied to clipboard
open val aborts: Listener<Event, T>

occurs when the loading of a media is aborted

Link copied to clipboard

occurs when the loading of a media is aborted

Link copied to clipboard

occurs when a page has started printing, or if the print dialogue box has been closed

Link copied to clipboard

occurs when a page has started printing, or if the print dialogue box has been closed

Link copied to clipboard

occurs when a page is about to be printed

Link copied to clipboard

occurs when a page is about to be printed

Link copied to clipboard

occurs before the document is about to be unloaded

Link copied to clipboard

occurs before the document is about to be unloaded

Link copied to clipboard

occurs when an element loses focus

Link copied to clipboard

occurs when an element loses focus

Link copied to clipboard
open val canplays: Listener<Event, T>

occurs when the browser can start playing the media (when it has buffered enough to begin)

Link copied to clipboard

occurs when the browser can start playing the media (when it has buffered enough to begin)

Link copied to clipboard

occurs when the browser can play through the media without stopping for buffering

Link copied to clipboard

occurs when the browser can play through the media without stopping for buffering

Link copied to clipboard
open val changes: Listener<Event, T>

occurs when the content of a form element, the selection, or the checked state have changed (for <input>, <select>, and <textarea>)

Link copied to clipboard

occurs when the content of a form element, the selection, or the checked state have changed (for <input>, <select>, and <textarea>)

Link copied to clipboard

occurs when the user clicks on an element

Link copied to clipboard

occurs when the user clicks on an element

Link copied to clipboard

occurs when the user right-clicks on an element to open a context menu

Link copied to clipboard

occurs when the user right-clicks on an element to open a context menu

Link copied to clipboard

occurs when the user copies the content of an element

Link copied to clipboard

occurs when the user copies the content of an element

Link copied to clipboard

occurs when the user cuts the content of an element

Link copied to clipboard

occurs when the user cuts the content of an element

Link copied to clipboard

occurs when the user double-clicks on an element

Link copied to clipboard

occurs when the user double-clicks on an element

Link copied to clipboard

occurs when the user has finished dragging an element

Link copied to clipboard

occurs when the user has finished dragging an element

Link copied to clipboard

occurs when the dragged element enters the drop target

Link copied to clipboard

occurs when the dragged element enters the drop target

Link copied to clipboard

occurs when the dragged element leaves the drop target

Link copied to clipboard

occurs when the dragged element leaves the drop target

Link copied to clipboard

occurs when the dragged element is over the drop target

Link copied to clipboard

occurs when the dragged element is over the drop target

Link copied to clipboard

occurs when an element is being dragged

Link copied to clipboard

occurs when an element is being dragged

Link copied to clipboard

occurs when the user starts to drag an element

Link copied to clipboard

occurs when the user starts to drag an element

Link copied to clipboard

occurs when the dragged element is dropped on the drop target

Link copied to clipboard

occurs when the dragged element is dropped on the drop target

Link copied to clipboard

occurs when the duration of the media is changed

Link copied to clipboard

occurs when the duration of the media is changed

Link copied to clipboard
open val endeds: Listener<Event, T>

occurs when the media has reach the end (useful for messages like "thanks for listening")

Link copied to clipboard

occurs when the media has reach the end (useful for messages like "thanks for listening")

Link copied to clipboard

occurs when an element is about to get focus

Link copied to clipboard

occurs when an element is about to get focus

Link copied to clipboard

occurs when an element is about to lose focus

Link copied to clipboard

occurs when an element is about to lose focus

Link copied to clipboard

occurs when an element gets focus

Link copied to clipboard

occurs when an element gets focus

Link copied to clipboard

occurs when an element is displayed in fullscreen mode

Link copied to clipboard

occurs when an element is displayed in fullscreen mode

Link copied to clipboard

occurs when an element can not be displayed in fullscreen mode

Link copied to clipboard

occurs when an element can not be displayed in fullscreen mode

Link copied to clipboard

occurs when there has been changes to the anchor part of a URL

Link copied to clipboard

occurs when there has been changes to the anchor part of a URL

Link copied to clipboard
open val inputs: Listener<Event, T>

occurs when an element gets user input has to use Event as type because Chrome and Safari offer Events instead of InputEvents when selecting from a datalist

Link copied to clipboard

occurs when an element gets user input has to use Event as type because Chrome and Safari offer Events instead of InputEvents when selecting from a datalist

Link copied to clipboard
open val invalids: Listener<Event, T>

occurs when an element is invalid

Link copied to clipboard

occurs when an element is invalid

Link copied to clipboard

occurs when the user is pressing a key

Link copied to clipboard

occurs when the user is pressing a key

Link copied to clipboard

occurs when the user presses a key

Link copied to clipboard

occurs when the user presses a key

Link copied to clipboard

occurs when the user releases a key

Link copied to clipboard

occurs when the user releases a key

Link copied to clipboard

occurs when media data is loaded

Link copied to clipboard

occurs when media data is loaded

Link copied to clipboard

occurs when metadata (like dimensions and duration) are loaded

Link copied to clipboard

occurs when metadata (like dimensions and duration) are loaded

Link copied to clipboard
open val loads: Listener<Event, T>

occurs when an object has loaded

Link copied to clipboard

occurs when an object has loaded

Link copied to clipboard

occurs when the browser starts looking for the specified media

Link copied to clipboard

occurs when the browser starts looking for the specified media

Link copied to clipboard
open val messages: Listener<Event, T>

occurs when a message is received through the event source

Link copied to clipboard

occurs when a message is received through the event source

Link copied to clipboard

occurs when the user presses a mouse button over an element

Link copied to clipboard

occurs when the user presses a mouse button over an element

Link copied to clipboard

occurs when the pointer is moved onto an element

Link copied to clipboard

occurs when the pointer is moved onto an element

Link copied to clipboard

occurs when the pointer is moved out of an element

Link copied to clipboard

occurs when the pointer is moved out of an element

Link copied to clipboard

occurs when the pointer is moving while it is over an element

Link copied to clipboard

occurs when the pointer is moving while it is over an element

Link copied to clipboard

occurs when a user moves the mouse pointer out of an element, or out of one of its children

Link copied to clipboard

occurs when a user moves the mouse pointer out of an element, or out of one of its children

Link copied to clipboard

occurs when the pointer is moved onto an element, or onto one of its children

Link copied to clipboard

occurs when the pointer is moved onto an element, or onto one of its children

Link copied to clipboard

occurs when a user releases a mouse button over an element

Link copied to clipboard

occurs when a user releases a mouse button over an element

Link copied to clipboard
open val offlines: Listener<Event, T>

occurs when the browser starts to work offline

Link copied to clipboard

occurs when the browser starts to work offline

Link copied to clipboard
open val onlines: Listener<Event, T>

occurs when the browser starts to work online

Link copied to clipboard

occurs when the browser starts to work online

Link copied to clipboard
open val opens: Listener<Event, T>

occurs when a connection with the event source is opened

Link copied to clipboard

occurs when a connection with the event source is opened

Link copied to clipboard

occurs when the user navigates away from a webpage

Link copied to clipboard

occurs when the user navigates away from a webpage

Link copied to clipboard

occurs when the user navigates to a webpage

Link copied to clipboard

occurs when the user navigates to a webpage

Link copied to clipboard

occurs when the user pastes some content in an element

Link copied to clipboard

occurs when the user pastes some content in an element

Link copied to clipboard
open val pauses: Listener<Event, T>

occurs when the media is paused either by the user or programmatically

Link copied to clipboard

occurs when the media is paused either by the user or programmatically

Link copied to clipboard
open val playings: Listener<Event, T>

occurs when the media is playing after having been paused or stopped for buffering

Link copied to clipboard

occurs when the media is playing after having been paused or stopped for buffering

Link copied to clipboard
open val plays: Listener<Event, T>

occurs when the media has been started or is no longer paused

Link copied to clipboard

occurs when the media has been started or is no longer paused

Link copied to clipboard

occurs when the window's history changes

Link copied to clipboard

occurs when the window's history changes

Link copied to clipboard

occurs when the browser is in the process of getting the media data (downloading the media)

Link copied to clipboard

occurs when the browser is in the process of getting the media data (downloading the media)

Link copied to clipboard

occurs when the playing speed of the media is changed

Link copied to clipboard

occurs when the playing speed of the media is changed

Link copied to clipboard
open val resets: Listener<Event, T>

occurs when a form is reset

Link copied to clipboard

occurs when a form is reset

Link copied to clipboard
open val resizes: Listener<Event, T>

occurs when the document view is resized

Link copied to clipboard

occurs when the document view is resized

Link copied to clipboard
open val scrolls: Listener<Event, T>

occurs when an element's scrollbar is being scrolled

Link copied to clipboard

occurs when an element's scrollbar is being scrolled

Link copied to clipboard
open val searchs: Listener<Event, T>

occurs when the user writes something in a search field (for )

Link copied to clipboard

occurs when the user writes something in a search field (for )

Link copied to clipboard
open val seekeds: Listener<Event, T>

occurs when the user is finished moving/skipping to a new position in the media

Link copied to clipboard

occurs when the user is finished moving/skipping to a new position in the media

Link copied to clipboard
open val seekings: Listener<Event, T>

occurs when the user starts moving/skipping to a new position in the media

Link copied to clipboard

occurs when the user starts moving/skipping to a new position in the media

Link copied to clipboard
open val selects: Listener<Event, T>

occurs after the user selects some text (for and

Link copied to clipboard

occurs after the user selects some text (for and

Link copied to clipboard
open val shows: Listener<Event, T>

occurs when a

element is shown as a context menu

Link copied to clipboard

occurs when a

element is shown as a context menu

Link copied to clipboard
open val stalleds: Listener<Event, T>

occurs when the browser is trying to get media data, but data is not available

Link copied to clipboard

occurs when the browser is trying to get media data, but data is not available

Link copied to clipboard

occurs when a Web Storage area is updated

Link copied to clipboard

occurs when a Web Storage area is updated

Link copied to clipboard
open val submits: Listener<Event, T>

occurs when a form is submitted

Link copied to clipboard

occurs when a form is submitted

Link copied to clipboard
open val suspends: Listener<Event, T>

occurs when the browser is intentionally not getting media data

Link copied to clipboard

occurs when the browser is intentionally not getting media data

Link copied to clipboard

occurs when the playing position has changed (like when the user fast forwards to a different point in the media)

Link copied to clipboard

occurs when the playing position has changed (like when the user fast forwards to a different point in the media)

Link copied to clipboard
open val toggles: Listener<Event, T>

occurs when the user opens or closes the

element

Link copied to clipboard

occurs when the user opens or closes the

element

Link copied to clipboard

occurs when the touch is interrupted

Link copied to clipboard

occurs when the touch is interrupted

Link copied to clipboard

occurs when a finger is removed from a touch screen

Link copied to clipboard

occurs when a finger is removed from a touch screen

Link copied to clipboard

occurs when a finger is dragged across the screen

Link copied to clipboard

occurs when a finger is dragged across the screen

Link copied to clipboard

occurs when a finger is placed on a touch screen

Link copied to clipboard

occurs when a finger is placed on a touch screen

Link copied to clipboard
open val unloads: Listener<Event, T>

occurs once a page has unloaded (for )

Link copied to clipboard

occurs once a page has unloaded (for )

Link copied to clipboard

occurs when the volume of the media has changed (includes setting the volume to "mute")

Link copied to clipboard

occurs when the volume of the media has changed (includes setting the volume to "mute")

Link copied to clipboard
open val waitings: Listener<Event, T>

occurs when the media has paused but is expected to resume (like when the media pauses to buffer more data)

Link copied to clipboard

occurs when the media has paused but is expected to resume (like when the media pauses to buffer more data)

Link copied to clipboard

occurs when the mouse wheel rolls up or down over an element

Link copied to clipboard

occurs when the mouse wheel rolls up or down over an element

Functions

Link copied to clipboard
abstract fun <X : Event> subscribe(eventName: String, capture: Boolean = false, init: Event.() -> Unit = {}): Listener<X, T>

Creates an Listener for the given event eventName.