GlobalEventProps

com.raquo.laminar.defs.eventProps.GlobalEventProps

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Laminar

Members list

Value members

Concrete methods

def eventProp[Ev <: Event](name: String): EventProp[Ev]

Create custom event property

Create custom event property

Type parameters

Ev
  • event type in JS, e.g. dom.MouseEvent

Value parameters

name
  • event type in JS, e.g. "click"

Attributes

Concrete fields

lazy val gotPointerCapture: EventProp[PointerEvent]

fired when an element receives pointer capture.

fired when an element receives pointer capture.

Attributes

lazy val lostPointerCapture: EventProp[PointerEvent]

Fired after pointer capture is released for a pointer.

Fired after pointer capture is released for a pointer.

Attributes

lazy val onAbort: EventProp[Event]

Script to be run on abort

Script to be run on abort

abort_event @ MDN

Attributes

lazy val onAnimationEnd: EventProp[AnimationEvent]

The animationend event is event fires when a CSS animation reaches the end of its active period.

The animationend event is event fires when a CSS animation reaches the end of its active period.

Attributes

lazy val onAnimationIteration: EventProp[AnimationEvent]

The animationiteration event is sent when a CSS animation reaches the end of an iteration. An iteration ends when a single pass through the sequence of animation instructions is completed by executing the last animation step.

The animationiteration event is sent when a CSS animation reaches the end of an iteration. An iteration ends when a single pass through the sequence of animation instructions is completed by executing the last animation step.

Attributes

lazy val onAnimationStart: EventProp[AnimationEvent]

The animationstart event is sent when a CSS Animation starts to play.

The animationstart event is sent when a CSS Animation starts to play.

Attributes

lazy val onBeforeInput: EventProp[InputEvent]

The DOM beforeinput event fires when the value of an <input>, or <textarea> element is about to be modified. The event also applies to elements with contenteditable enabled, and to any element when designMode is turned on.

The DOM beforeinput event fires when the value of an <input>, or <textarea> element is about to be modified. The event also applies to elements with contenteditable enabled, and to any element when designMode is turned on.

Attributes

Note

IE does not support this event.

lazy val onBlur: EventProp[FocusEvent]

The blur event is raised when an element loses focus.

The blur event is raised when an element loses focus.

Attributes

lazy val onCanPlay: EventProp[Event]

Script to be run when a file is ready to start playing (when it has buffered enough to begin)

Script to be run when a file is ready to start playing (when it has buffered enough to begin)

canplay_event @ MDN

Attributes

lazy val onCanPlayThrough: EventProp[Event]

Script to be run when a file can be played all the way to the end without pausing for buffering

Script to be run when a file can be played all the way to the end without pausing for buffering

canplaythrough_event @ MDN

Attributes

lazy val onChange: EventProp[Event]

The change event is fired for input, select, and textarea elements when a change to the element's value is committed by the user.

The change event is fired for input, select, and textarea elements when a change to the element's value is committed by the user.

change_event @ MDN

Attributes

lazy val onClick: EventProp[MouseEvent]

The click event is raised when the user clicks on an element. The click event will occur after the mousedown and mouseup events.

The click event is raised when the user clicks on an element. The click event will occur after the mousedown and mouseup events.

Attributes

lazy val onContextMenu: EventProp[MouseEvent]

Script to be run when a context menu is triggered

Script to be run when a context menu is triggered

Attributes

lazy val onCopy: EventProp[ClipboardEvent]

Fires when the user copies the content of an element

Fires when the user copies the content of an element

Attributes

lazy val onCueChange: EventProp[Event]

Script to be run when the cue changes in a <track> element

Script to be run when the cue changes in a <track> element

cuechange_event @ MDN

Attributes

lazy val onCut: EventProp[ClipboardEvent]

Fires when the user cuts the content of an element

Fires when the user cuts the content of an element

Attributes

lazy val onDblClick: EventProp[MouseEvent]

The dblclick event is fired when a pointing device button (usually a mouse button) is clicked twice on a single element.

The dblclick event is fired when a pointing device button (usually a mouse button) is clicked twice on a single element.

Attributes

lazy val onDrag: EventProp[DragEvent]

Script to be run when an element is dragged

Script to be run when an element is dragged

Attributes

lazy val onDragEnd: EventProp[DragEvent]

Script to be run at the end of a drag operation

Script to be run at the end of a drag operation

Attributes

lazy val onDragEnter: EventProp[DragEvent]

Script to be run when an element has been dragged to a valid drop target

Script to be run when an element has been dragged to a valid drop target

Attributes

lazy val onDragLeave: EventProp[DragEvent]

Script to be run when an element leaves a valid drop target

Script to be run when an element leaves a valid drop target

Attributes

lazy val onDragOver: EventProp[DragEvent]

Script to be run when an element is being dragged over a valid drop target

Script to be run when an element is being dragged over a valid drop target

Attributes

lazy val onDragStart: EventProp[DragEvent]

Script to be run at the start of a drag operation

Script to be run at the start of a drag operation

Attributes

lazy val onDrop: EventProp[DragEvent]

Script to be run when dragged element is being dropped

Script to be run when dragged element is being dropped

Attributes

lazy val onDurationChange: EventProp[Event]

Script to be run when the length of the media changes

Script to be run when the length of the media changes

durationchange_event @ MDN

Attributes

lazy val onEmptied: EventProp[Event]

Script to be run when something bad happens and the file is suddenly unavailable (like unexpectedly disconnects)

Script to be run when something bad happens and the file is suddenly unavailable (like unexpectedly disconnects)

emptied_event @ MDN

Attributes

lazy val onEnded: EventProp[Event]

Script to be run when the media has reach the end (a useful event for messages like "thanks for listening")

Script to be run when the media has reach the end (a useful event for messages like "thanks for listening")

ended_event @ MDN

Attributes

lazy val onError: EventProp[ErrorEvent]

Script to be run when an error occurs when the file is being loaded

Script to be run when an error occurs when the file is being loaded

Attributes

lazy val onFocus: EventProp[FocusEvent]

The focus event is raised when the user sets focus on the given element.

The focus event is raised when the user sets focus on the given element.

Attributes

lazy val onInput: EventProp[Event]

The input event is fired for input, select, textarea, and contentEditable elements when it gets user input.

The input event is fired for input, select, textarea, and contentEditable elements when it gets user input.

input_event @ MDN

Attributes

lazy val onInvalid: EventProp[Event]

Script to be run when an element is invalid

Script to be run when an element is invalid

invalid_event @ MDN

Attributes

lazy val onKeyDown: EventProp[KeyboardEvent]

The keydown event is raised when the user presses a keyboard key.

The keydown event is raised when the user presses a keyboard key.

Attributes

lazy val onKeyPress: EventProp[KeyboardEvent]

The keypress event should be raised when the user presses a key on the keyboard. However, not all browsers fire keypress events for certain keys.

The keypress event should be raised when the user presses a key on the keyboard. However, not all browsers fire keypress events for certain keys.

Webkit-based browsers (Google Chrome and Safari, for example) do not fire keypress events on the arrow keys. Firefox does not fire keypress events on modifier keys like SHIFT.

Attributes

lazy val onKeyUp: EventProp[KeyboardEvent]

The keyup event is raised when the user releases a key that's been pressed.

The keyup event is raised when the user releases a key that's been pressed.

Attributes

lazy val onLoad: EventProp[UIEvent]

The onload property of the GlobalEventHandlers mixin is an event handler for the load event of a Window, XMLHttpRequest, <img> element, etc., which fires when the resource has loaded.

The onload property of the GlobalEventHandlers mixin is an event handler for the load event of a Window, XMLHttpRequest, <img> element, etc., which fires when the resource has loaded.

Attributes

lazy val onLoadStart: EventProp[Event]

Script to be run just as the file begins to load before anything is actually loaded

Script to be run just as the file begins to load before anything is actually loaded

loadstart_event @ MDN

Attributes

lazy val onLoadedData: EventProp[Event]

Script to be run when media data is loaded

Script to be run when media data is loaded

loadeddata_event @ MDN

Attributes

lazy val onLoadedMetadata: EventProp[Event]

Script to be run when meta data (like dimensions and duration) are loaded

Script to be run when meta data (like dimensions and duration) are loaded

loadedmetadata_event @ MDN

Attributes

lazy val onMouseDown: EventProp[MouseEvent]

The mousedown event is raised when the user presses the mouse button.

The mousedown event is raised when the user presses the mouse button.

Attributes

lazy val onMouseEnter: EventProp[MouseEvent]

The mouseenter event is fired when a pointing device (usually a mouse) is moved over the element that has the listener attached.

The mouseenter event is fired when a pointing device (usually a mouse) is moved over the element that has the listener attached.

Similar to mouseover, it differs in that it doesn't bubble and that it isn't sent when the pointer is moved from one of its descendants' physical space to its own physical space.

With deep hierarchies, the amount of mouseenter events sent can be quite huge and cause significant performance problems. In such cases, it is better to listen for mouseover events.

Attributes

lazy val onMouseLeave: EventProp[MouseEvent]

The mouseleave event is fired when the pointer of a pointing device (usually a mouse) is moved out of an element.

The mouseleave event is fired when the pointer of a pointing device (usually a mouse) is moved out of an element.

mouseleave and mouseout are similar but differ in that mouseleave does not bubble and mouseout does.

This means that mouseleave is fired when the pointer has exited the element and all of its descendants, whereas mouseout is fired when the pointer leaves the element or leaves one of the element's descendants (even if the pointer is still within the element).

Attributes

lazy val onMouseMove: EventProp[MouseEvent]

The mousemove event is raised when the user moves the mouse.

The mousemove event is raised when the user moves the mouse.

Attributes

lazy val onMouseOut: EventProp[MouseEvent]

The mouseout event is raised when the mouse leaves an element (e.g, when the mouse moves off of an image in the web page, the mouseout event is raised for that image element).

The mouseout event is raised when the mouse leaves an element (e.g, when the mouse moves off of an image in the web page, the mouseout event is raised for that image element).

Attributes

lazy val onMouseOver: EventProp[MouseEvent]

The mouseover event is raised when the user moves the mouse over a particular element.

The mouseover event is raised when the user moves the mouse over a particular element.

Attributes

lazy val onMouseUp: EventProp[MouseEvent]

The mouseup event is raised when the user releases the mouse button.

The mouseup event is raised when the user releases the mouse button.

Attributes

lazy val onPaste: EventProp[ClipboardEvent]

Fires when the user pastes some content in an element

Fires when the user pastes some content in an element

Attributes

lazy val onPause: EventProp[Event]

Script to be run when the media is paused either by the user or programmatically

Script to be run when the media is paused either by the user or programmatically

pause_event @ MDN

Attributes

lazy val onPlay: EventProp[Event]

Script to be run when the media is ready to start playing

Script to be run when the media is ready to start playing

play_event @ MDN

Attributes

lazy val onPlaying: EventProp[Event]

Script to be run when the media actually has started playing

Script to be run when the media actually has started playing

playing_event @ MDN

Attributes

lazy val onPointerCancel: EventProp[PointerEvent]

a browser fires this event if it concludes the pointer will no longer be able to generate events (for example the related device is deactived).

a browser fires this event if it concludes the pointer will no longer be able to generate events (for example the related device is deactived).

Attributes

lazy val onPointerDown: EventProp[PointerEvent]

fired when a pointer becomes active.

fired when a pointer becomes active.

Attributes

lazy val onPointerEnter: EventProp[PointerEvent]

fired when a pointing device is moved into the hit test boundaries of an element or one of its descendants, including as a result of a pointerdown event from a device that does not support hover (see pointerdown).

fired when a pointing device is moved into the hit test boundaries of an element or one of its descendants, including as a result of a pointerdown event from a device that does not support hover (see pointerdown).

Attributes

lazy val onPointerLeave: EventProp[PointerEvent]

fired when a pointing device is moved out of the hit test boundaries of an element. For pen devices, this event is fired when the stylus leaves the hover range detectable by the digitizer.

fired when a pointing device is moved out of the hit test boundaries of an element. For pen devices, this event is fired when the stylus leaves the hover range detectable by the digitizer.

Attributes

lazy val onPointerMove: EventProp[PointerEvent]

fired when a pointer changes coordinates.

fired when a pointer changes coordinates.

Attributes

lazy val onPointerOut: EventProp[PointerEvent]

fired for several reasons including: pointing device is moved out of the hit test boundaries of an element; firing the pointerup event for a device that does not support hover (see pointerup); after firing the pointercancel event (see pointercancel); when a pen stylus leaves the hover range detectable by the digitizer.

fired for several reasons including: pointing device is moved out of the hit test boundaries of an element; firing the pointerup event for a device that does not support hover (see pointerup); after firing the pointercancel event (see pointercancel); when a pen stylus leaves the hover range detectable by the digitizer.

Attributes

lazy val onPointerOver: EventProp[PointerEvent]

fired when a pointing device is moved into an element's hit test boundaries.

fired when a pointing device is moved into an element's hit test boundaries.

Attributes

lazy val onPointerUp: EventProp[PointerEvent]

fired when a pointer is no longer active.

fired when a pointer is no longer active.

Attributes

lazy val onProgress: EventProp[Event]

Script to be run when the browser is in the process of getting the media data

Script to be run when the browser is in the process of getting the media data

progress_event @ MDN

Attributes

lazy val onRateChange: EventProp[Event]

Script to be run each time the playback rate changes (like when a user switches to a slow motion or fast forward mode)

Script to be run each time the playback rate changes (like when a user switches to a slow motion or fast forward mode)

ratechange_event @ MDN

Attributes

lazy val onReset: EventProp[Event]

The reset event is fired when a form is reset.

The reset event is fired when a form is reset.

reset_event @ MDN

Attributes

lazy val onResize: EventProp[UIEvent]

The GlobalEventHandlers.onresize property contains an EventHandler triggered when a resize event is received.

The GlobalEventHandlers.onresize property contains an EventHandler triggered when a resize event is received.

Attributes

lazy val onScroll: EventProp[UIEvent]

An event handler for scroll events on element.

An event handler for scroll events on element.

Attributes

lazy val onSearch: EventProp[Event]

Fires when the user writes something in a search field (for <input="search">)

Fires when the user writes something in a search field (for <input="search">)

search_event @ MDN

Attributes

lazy val onSeeked: EventProp[Event]

Script to be run when the seeking attribute is set to false indicating that seeking has ended

Script to be run when the seeking attribute is set to false indicating that seeking has ended

seeked_event @ MDN

Attributes

lazy val onSeeking: EventProp[Event]

Script to be run when the seeking attribute is set to true indicating that seeking is active

Script to be run when the seeking attribute is set to true indicating that seeking is active

seeking_event @ MDN

Attributes

lazy val onSelect: EventProp[Event]

The select event only fires when text inside a text input or textarea is selected. The event is fired after the text has been selected.

The select event only fires when text inside a text input or textarea is selected. The event is fired after the text has been selected.

select_event @ MDN

Attributes

lazy val onSelectStart: EventProp[Event]

Fires when a user starts a new selection. If the event is canceled, the selection is not changed.

Fires when a user starts a new selection. If the event is canceled, the selection is not changed.

selectstart_event @ MDN

Attributes

lazy val onShow: EventProp[Event]

Fires when a <menu> element is shown as a context menu

Fires when a <menu> element is shown as a context menu

show_event @ MDN

Attributes

lazy val onStalled: EventProp[Event]

Script to be run when the browser is unable to fetch the media data for whatever reason

Script to be run when the browser is unable to fetch the media data for whatever reason

stalled_event @ MDN

Attributes

lazy val onSubmit: EventProp[Event]

The submit event is fired when the user clicks a submit button in a form (<input type="submit"/>).

The submit event is fired when the user clicks a submit button in a form (<input type="submit"/>).

submit_event @ MDN

Attributes

lazy val onSuspend: EventProp[Event]

Script to be run when fetching the media data is stopped before it is completely loaded for whatever reason

Script to be run when fetching the media data is stopped before it is completely loaded for whatever reason

suspend_event @ MDN

Attributes

lazy val onTimeUpdate: EventProp[Event]

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

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

timeupdate_event @ MDN

Attributes

lazy val onToggle: EventProp[Event]

Fires when the user opens or closes the <details> element

Fires when the user opens or closes the <details> element

toggle_event @ MDN

Attributes

lazy val onTouchCancel: EventProp[TouchEvent]

The touchcancel event is fired when one or more touch points have been disrupted in an implementation-specific manner.

The touchcancel event is fired when one or more touch points have been disrupted in an implementation-specific manner.

Attributes

lazy val onTouchEnd: EventProp[TouchEvent]

The touchend event fires when one or more touch points are removed from the touch surface. Remember that it is possible to get a touchcancel event instead.

The touchend event fires when one or more touch points are removed from the touch surface. Remember that it is possible to get a touchcancel event instead.

Attributes

lazy val onTouchMove: EventProp[TouchEvent]

The touchmove event is fired when one or more touch points are moved along the touch surface.

The touchmove event is fired when one or more touch points are moved along the touch surface.

Attributes

lazy val onTouchStart: EventProp[TouchEvent]

The touchstart event is fired when one or more touch points are placed on the touch surface.

The touchstart event is fired when one or more touch points are placed on the touch surface.

Attributes

lazy val onTransitionEnd: EventProp[Event]

The transitionend event is sent to when a CSS transition completes.

The transitionend event is sent to when a CSS transition completes.

Note: If the transition is removed from its target node before the transition completes execution, the transitionend event won't be generated. One way this can happen is by changing the value of the transition-property attribute which applies to the target. Another is if the display attribute is set to none.

Attributes

See also
lazy val onVolumeChange: EventProp[Event]

Script to be run each time the volume is changed which (includes setting the volume to "mute")

Script to be run each time the volume is changed which (includes setting the volume to "mute")

volumechange_event @ MDN

Attributes

lazy val onWaiting: EventProp[Event]

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

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

waiting_event @ MDN

Attributes

lazy val onWheel: EventProp[WheelEvent]

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

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

Attributes