<commit_before>module DOM.Event.Event
  ( bubbles
  , cancelable
  , currentTarget
  , defaultPrevented
  , eventPhase
  , eventPhaseIndex
  , target
  , timeStamp
  , type_
  , preventDefault
  , stopImmediatePropagation
  , stopPropagation
  ) where

import Prelude

import Control.Monad.Eff (Eff())

import Data.Enum (toEnum)
import qualified Data.Maybe.Unsafe as U

import DOM
import DOM.Event.EventPhase
import DOM.Event.Types
import DOM.Node.Types

-- | The event type.
foreign import type_ :: Event -> EventType

-- | The element that was the source of the event.
foreign import target :: Event -> Node

-- | The element that the event listener was added to.
foreign import currentTarget :: Event -> Node

-- | Indicates which phase of the event flow that is currently being processed
-- | for the event.
eventPhase :: Event -> EventPhase
eventPhase = U.fromJust <<< toEnum <<< eventPhaseIndex

-- | The integer value for the current event phase.
foreign import eventPhaseIndex :: Event -> Int

-- | Prevents the event from bubbling up to futher event listeners. Other event
-- | listeners on the current target will still fire.
foreign import stopPropagation :: Event -> Eff (dom :: DOM) Unit

-- | Prevents all other listeners for the event from being called. This includes
-- | event listeners added to the current target after the current listener.
foreign import stopImmediatePropagation :: Event -> Eff (dom :: DOM) Unit

-- | Indicates whether the event will bubble up through the DOM or not.
foreign import bubbles :: Event -> Boolean

-- | Indicates whether the event can be cancelled.
foreign import cancelable :: Event -> Boolean

-- | Cancels the event if it can be cancelled.
foreign import preventDefault :: Event -> Eff (dom :: DOM) Unit
<commit_msg>Fixes #29<commit_after>module DOM.Event.Event
  ( bubbles
  , cancelable
  , currentTarget
  , defaultPrevented
  , eventPhase
  , eventPhaseIndex
  , target
  , timeStamp
  , type_
  , preventDefault
  , stopImmediatePropagation
  , stopPropagation
  ) where

import Prelude

import Control.Monad.Eff (Eff())

import Data.Enum (toEnum)
import qualified Data.Maybe.Unsafe as U

import DOM
import DOM.Event.EventPhase
import DOM.Event.Types
import DOM.Node.Types

-- | The event type.
foreign import type_ :: Event -> EventType

-- | The element that was the source of the event.
foreign import target :: Event -> Node

-- | The element that the event listener was added to.
foreign import currentTarget :: Event -> Node

-- | Indicates which phase of the event flow that is currently being processed
-- | for the event.
eventPhase :: Event -> EventPhase
eventPhase = U.fromJust <<< toEnum <<< eventPhaseIndex

-- | The integer value for the current event phase.
foreign import eventPhaseIndex :: Event -> Int

-- | Prevents the event from bubbling up to futher event listeners. Other event
-- | listeners on the current target will still fire.
foreign import stopPropagation :: forall eff. Event -> Eff (dom :: DOM | eff) Unit

-- | Prevents all other listeners for the event from being called. This includes
-- | event listeners added to the current target after the current listener.
foreign import stopImmediatePropagation :: forall eff. Event -> Eff (dom :: DOM | eff) Unit

-- | Indicates whether the event will bubble up through the DOM or not.
foreign import bubbles :: Event -> Boolean

-- | Indicates whether the event can be cancelled.
foreign import cancelable :: Event -> Boolean

-- | Cancels the event if it can be cancelled.
foreign import preventDefault :: forall eff. Event -> Eff (dom :: DOM | eff) Unit

{'fraction_non_alphanumeric': 0.08319421257651642, 'fraction_numerical': 0.0005564830272676684, 'mean_word_length': 3.650711513583441, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '629107', 'n_tokens_mistral': 977, 'n_tokens_neox': 957, 'n_words': 432}