Skip to content
This repository has been archived by the owner on Oct 4, 2020. It is now read-only.

Commit

Permalink
Merge pull request #14 from nwolverson/domdom
Browse files Browse the repository at this point in the history
Avoid duplicate rows / eventListener
  • Loading branch information
garyb committed Aug 22, 2015
2 parents edbca6b + f1538d3 commit e8a73fc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/DOM/Event/EventTarget.purs
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ import DOM.Event.Types
foreign import data EventListener :: # ! -> *

-- | Creates an EventListener from a normal PureScript Eff function.
foreign import eventListener :: forall eff a. (Event -> Eff (dom :: DOM | eff) a) -> EventListener (dom :: DOM | eff)
foreign import eventListener :: forall eff a. (Event -> Eff eff a) -> EventListener eff

-- | Adds a listener to an event target. The boolean argument indicates whether
-- | the listener should be added for the "capture" phase.
foreign import addEventListener :: forall eff. EventType -> EventListener eff -> Boolean -> EventTarget -> Eff (dom :: DOM | eff) Unit
foreign import addEventListener :: forall eff. EventType -> EventListener (dom :: DOM | eff) -> Boolean -> EventTarget -> Eff (dom :: DOM | eff) Unit

-- | Removes a listener to an event target. The boolean argument indicates
-- | whether the listener should be removed for the "capture" phase.
foreign import removeEventListener :: forall eff. EventType -> EventListener eff -> Boolean -> EventTarget -> Eff (dom :: DOM | eff) Unit
foreign import removeEventListener :: forall eff. EventType -> EventListener (dom :: DOM | eff) -> Boolean -> EventTarget -> Eff (dom :: DOM | eff) Unit

-- | Dispatches an event from an event target.
foreign import dispatchEvent :: forall eff. Event -> EventTarget -> Eff (dom :: DOM, err :: EXCEPTION | eff) Boolean

0 comments on commit e8a73fc

Please sign in to comment.