domdefs.ff4s.GlobalEventProps.scala Maven / Gradle / Ivy
package ff4s
import ff4s.EventProp
import org.scalajs.dom
// #NOTE: GENERATED CODE
// - This file is generated at compile time from the data in Scala DOM Types
// - See `project/DomDefsGenerator.scala` for code generation params
// - Contribute to https://github.com/raquo/scala-dom-types to add missing tags / attrs / props / etc.
trait GlobalEventProps {
/**
* Create custom event property
*
* @param name - event type in JS, e.g. "click"
*
* @tparam Ev - event type in JS, e.g. dom.MouseEvent
*/
def eventProp[Ev <: dom.Event](name: String): EventProp[Ev] = new EventProp(name)
// -- Mouse Events --
/**
* The click event is raised when the user clicks on an element. The click
* event will occur after the mousedown and mouseup events.
*
* - [[https://developer.mozilla.org/en-US/docs/Web/API/Element/click_event click_event @ MDN]]
* - [[https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent MouseEvent @ MDN]]
*/
lazy val onClick: EventProp[dom.MouseEvent] = eventProp("click")
/**
* The dblclick event is fired when a pointing device button (usually a
* mouse button) is clicked twice on a single element.
*
* - [[https://developer.mozilla.org/en-US/docs/Web/API/Element/dblclick_event dblclick_event @ MDN]]
* - [[https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent MouseEvent @ MDN]]
*/
lazy val onDblClick: EventProp[dom.MouseEvent] = eventProp("dblclick")
/**
* The mousedown event is raised when the user presses the mouse button.
*
* - [[https://developer.mozilla.org/en-US/docs/Web/API/Element/mousedown_event mousedown_event @ MDN]]
* - [[https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent MouseEvent @ MDN]]
*/
lazy val onMouseDown: EventProp[dom.MouseEvent] = eventProp("mousedown")
/**
* The mousemove event is raised when the user moves the mouse.
*
* - [[https://developer.mozilla.org/en-US/docs/Web/API/Element/mousemove_event mousemove_event @ MDN]]
* - [[https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent MouseEvent @ MDN]]
*/
lazy val onMouseMove: EventProp[dom.MouseEvent] = eventProp("mousemove")
/**
* 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).
*
* - [[https://developer.mozilla.org/en-US/docs/Web/API/Element/mouseout_event mouseout_event @ MDN]]
* - [[https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent MouseEvent @ MDN]]
*/
lazy val onMouseOut: EventProp[dom.MouseEvent] = eventProp("mouseout")
/**
* The mouseover event is raised when the user moves the mouse over a
* particular element.
*
* - [[https://developer.mozilla.org/en-US/docs/Web/API/Element/mouseover_event mouseover_event @ MDN]]
* - [[https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent MouseEvent @ MDN]]
*/
lazy val onMouseOver: EventProp[dom.MouseEvent] = eventProp("mouseover")
/**
* 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).
*
* - [[https://developer.mozilla.org/en-US/docs/Web/API/Element/mouseleave_event mouseleave_event @ MDN]]
* - [[https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent MouseEvent @ MDN]]
*/
lazy val onMouseLeave: EventProp[dom.MouseEvent] = eventProp("mouseleave")
/**
* 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.
*
* - [[https://developer.mozilla.org/en-US/docs/Web/API/Element/mouseenter_event mouseenter_event @ MDN]]
* - [[https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent MouseEvent @ MDN]]
*/
lazy val onMouseEnter: EventProp[dom.MouseEvent] = eventProp("mouseenter")
/**
* The mouseup event is raised when the user releases the mouse button.
*
* - [[https://developer.mozilla.org/en-US/docs/Web/API/Element/mouseup_event mouseup_event @ MDN]]
* - [[https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent MouseEvent @ MDN]]
*/
lazy val onMouseUp: EventProp[dom.MouseEvent] = eventProp("mouseup")
/**
* Fires when the mouse wheel rolls up or down over an element
*
* - [[https://developer.mozilla.org/en-US/docs/Web/API/Element/wheel_event wheel_event @ MDN]]
* - [[https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent WheelEvent @ MDN]]
*/
lazy val onWheel: EventProp[dom.WheelEvent] = eventProp("wheel")
/**
* Script to be run when a context menu is triggered
*
* - [[https://developer.mozilla.org/en-US/docs/Web/API/Element/contextmenu_event contextmenu_event @ MDN]]
* - [[https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent MouseEvent @ MDN]]
*/
lazy val onContextMenu: EventProp[dom.MouseEvent] = eventProp("contextmenu")
/**
* Script to be run when an element is dragged
*
* - [[https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/drag_event drag_event @ MDN]]
* - [[https://developer.mozilla.org/en-US/docs/Web/API/DragEvent DragEvent @ MDN]]
*/
lazy val onDrag: EventProp[dom.DragEvent] = eventProp("drag")
/**
* Script to be run at the end of a drag operation
*
* - [[https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/dragend_event dragend_event @ MDN]]
* - [[https://developer.mozilla.org/en-US/docs/Web/API/DragEvent DragEvent @ MDN]]
*/
lazy val onDragEnd: EventProp[dom.DragEvent] = eventProp("dragend")
/**
* Script to be run when an element has been dragged to a valid drop target
*
* - [[https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/dragenter_event dragenter_event @ MDN]]
* - [[https://developer.mozilla.org/en-US/docs/Web/API/DragEvent DragEvent @ MDN]]
*/
lazy val onDragEnter: EventProp[dom.DragEvent] = eventProp("dragenter")
/**
* Script to be run when an element leaves a valid drop target
*
* - [[https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/dragleave_event dragleave_event @ MDN]]
* - [[https://developer.mozilla.org/en-US/docs/Web/API/DragEvent DragEvent @ MDN]]
*/
lazy val onDragLeave: EventProp[dom.DragEvent] = eventProp("dragleave")
/**
* Script to be run when an element is being dragged over a valid drop target
*
* - [[https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/dragover_event dragover_event @ MDN]]
* - [[https://developer.mozilla.org/en-US/docs/Web/API/DragEvent DragEvent @ MDN]]
*/
lazy val onDragOver: EventProp[dom.DragEvent] = eventProp("dragover")
/**
* Script to be run at the start of a drag operation
*
* - [[https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/dragstart_event dragstart_event @ MDN]]
* - [[https://developer.mozilla.org/en-US/docs/Web/API/DragEvent DragEvent @ MDN]]
*/
lazy val onDragStart: EventProp[dom.DragEvent] = eventProp("dragstart")
/**
* Script to be run when dragged element is being dropped
*
* - [[https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/drop_event drop_event @ MDN]]
* - [[https://developer.mozilla.org/en-US/docs/Web/API/DragEvent DragEvent @ MDN]]
*/
lazy val onDrop: EventProp[dom.DragEvent] = eventProp("drop")
// -- Pointer Events --
/**
* fired when a pointing device is moved into an element's hit test boundaries.
*
* - [[https://developer.mozilla.org/en-US/docs/Web/API/Element/pointerover_event pointerover_event @ MDN]]
* - [[https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent PointerEvent @ MDN]]
*/
lazy val onPointerOver: EventProp[dom.PointerEvent] = eventProp("pointerover")
/**
* 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).
*
* - [[https://developer.mozilla.org/en-US/docs/Web/API/Element/pointerenter_event pointerenter_event @ MDN]]
* - [[https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent PointerEvent @ MDN]]
*/
lazy val onPointerEnter: EventProp[dom.PointerEvent] = eventProp("pointerenter")
/**
* fired when a pointer becomes active.
*
* - [[https://developer.mozilla.org/en-US/docs/Web/API/Element/pointerdown_event pointerdown_event @ MDN]]
* - [[https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent PointerEvent @ MDN]]
*/
lazy val onPointerDown: EventProp[dom.PointerEvent] = eventProp("pointerdown")
/**
* fired when a pointer changes coordinates.
*
* - [[https://developer.mozilla.org/en-US/docs/Web/API/Element/pointermove_event pointermove_event @ MDN]]
* - [[https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent PointerEvent @ MDN]]
*/
lazy val onPointerMove: EventProp[dom.PointerEvent] = eventProp("pointermove")
/**
* fired when a pointer is no longer active.
*
* - [[https://developer.mozilla.org/en-US/docs/Web/API/Element/pointerup_event pointerup_event @ MDN]]
* - [[https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent PointerEvent @ MDN]]
*/
lazy val onPointerUp: EventProp[dom.PointerEvent] = eventProp("pointerup")
/**
* 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).
*
* - [[https://developer.mozilla.org/en-US/docs/Web/API/Element/pointercancel_event pointercancel_event @ MDN]]
* - [[https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent PointerEvent @ MDN]]
*/
lazy val onPointerCancel: EventProp[dom.PointerEvent] = eventProp("pointercancel")
/**
* 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.
*
* - [[https://developer.mozilla.org/en-US/docs/Web/API/Element/pointerout_event pointerout_event @ MDN]]
* - [[https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent PointerEvent @ MDN]]
*/
lazy val onPointerOut: EventProp[dom.PointerEvent] = eventProp("pointerout")
/**
* 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.
*
* - [[https://developer.mozilla.org/en-US/docs/Web/API/Element/pointerleave_event pointerleave_event @ MDN]]
* - [[https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent PointerEvent @ MDN]]
*/
lazy val onPointerLeave: EventProp[dom.PointerEvent] = eventProp("pointerleave")
/**
* fired when an element receives pointer capture.
*
* - [[https://developer.mozilla.org/en-US/docs/Web/API/Element/gotpointercapture_event gotpointercapture_event @ MDN]]
* - [[https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent PointerEvent @ MDN]]
*/
lazy val gotPointerCapture: EventProp[dom.PointerEvent] = eventProp("gotpointercapture")
/**
* Fired after pointer capture is released for a pointer.
*
* - [[https://developer.mozilla.org/en-US/docs/Web/API/Element/lostpointercapture_event lostpointercapture_event @ MDN]]
* - [[https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent PointerEvent @ MDN]]
*/
lazy val lostPointerCapture: EventProp[dom.PointerEvent] = eventProp("lostpointercapture")
// -- Form Events --
/**
* The change event is fired for input, select, and textarea elements
* when a change to the element's value is committed by the user.
*
* [[https://developer.mozilla.org/en-US/docs/Web/API/Element/change_event change_event @ MDN]]
*/
lazy val onChange: EventProp[dom.Event] = eventProp("change")
/**
* 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.
*
* [[https://developer.mozilla.org/en-US/docs/Web/API/Element/select_event select_event @ MDN]]
*/
lazy val onSelect: EventProp[dom.Event] = eventProp("select")
/**
* The DOM beforeinput event fires when the value of an ``, or `