Module

Web.Event.Event

#EventType

newtype EventType

The type of strings used for event types.

Constructors

Instances

#type_

type_ :: Event -> EventType

The event type.

#target

target :: Event -> Maybe EventTarget

The element that was the source of the event.

#currentTarget

currentTarget :: Event -> Maybe EventTarget

The element that the event listener was added to.

#eventPhase

eventPhase :: Partial => Event -> EventPhase

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

#stopPropagation

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

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

bubbles :: Event -> Boolean

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

#cancelable

cancelable :: Event -> Boolean

Indicates whether the event can be cancelled.

#preventDefault

preventDefault :: Event -> Effect Unit

Cancels the event if it can be cancelled.

#defaultPrevented

defaultPrevented :: Event -> Effect Boolean

Indicates whether preventDefault was called on the event.

#timeStamp

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

data Event

Basic type for all DOM events.

Modules