Module

Web.Event.Event

Package
purescript-web-events
Repository
purescript-web/purescript-web-events

#EventType Source

newtype EventType

The type of strings used for event types.

Constructors

Instances

#type_ Source

type_ :: Event -> EventType

The event type.

#target Source

target :: Event -> Maybe EventTarget

The element that was the source of the event.

#currentTarget Source

currentTarget :: Event -> Maybe EventTarget

The element that the event listener was added to.

#eventPhase Source

eventPhase :: Partial => Event -> EventPhase

Indicates which phase of the event flow that is currently being processed for the event.

#stopPropagation Source

stopPropagation :: Event -> Effect Unit

Prevents the event from bubbling up to futher event listeners. Other event listeners on the current target will still fire.

#stopImmediatePropagation Source

stopImmediatePropagation :: Event -> Effect Unit

Prevents all other listeners for the event from being called. This includes event listeners added to the current target after the current listener.

#bubbles Source

bubbles :: Event -> Boolean

Indicates whether the event will bubble up through the DOM or not.

#cancelable Source

cancelable :: Event -> Boolean

Indicates whether the event can be cancelled.

#preventDefault Source

preventDefault :: Event -> Effect Unit

Cancels the event if it can be cancelled.

#defaultPrevented Source

defaultPrevented :: Event -> Boolean

Indicates whether preventDefault was called on the event.

#timeStamp Source

timeStamp :: Event -> Instant

The time in milliseconds between 01/01/1970 and when the event was dispatched.

Re-exports from Web.Event.Internal.Types

#Event Source

data Event :: Type

Basic type for all DOM events.