Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
purescript-reactix
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
purescript-reactix
Commits
ce528d16
Commit
ce528d16
authored
Apr 26, 2019
by
James Laver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delay stopPropagation and preventDefault in line with Effect
parent
3a3fb2e1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
SyntheticEvent.purs
src/Reactix/SyntheticEvent.purs
+3
-3
No files found.
src/Reactix/SyntheticEvent.purs
View file @
ce528d16
...
@@ -5,7 +5,7 @@ import Prelude
...
@@ -5,7 +5,7 @@ import Prelude
import DOM.Simple as DOM
import DOM.Simple as DOM
import Effect ( Effect )
import Effect ( Effect )
import Effect.Uncurried ( EffectFn1, runEffectFn1 )
import Effect.Uncurried ( EffectFn1, runEffectFn1 )
import FFI.Simple ( (..), (...) )
import FFI.Simple ( (..), (...)
, delay
)
class IsSyntheticEvent e
class IsSyntheticEvent e
...
@@ -48,10 +48,10 @@ type' e = e .. "type"
...
@@ -48,10 +48,10 @@ type' e = e .. "type"
-- nativeEvent e = e .. "nativeEvent"
-- nativeEvent e = e .. "nativeEvent"
stopPropagation :: forall e. IsSyntheticEvent e => e -> Effect Unit
stopPropagation :: forall e. IsSyntheticEvent e => e -> Effect Unit
stopPropagation e = e ... "stopPropagation" $ []
stopPropagation e =
delay $ \_ -> pure $
e ... "stopPropagation" $ []
preventDefault :: forall e. IsSyntheticEvent e => e -> Effect Unit
preventDefault :: forall e. IsSyntheticEvent e => e -> Effect Unit
preventDefault e = e ... "preventDefault" $ []
preventDefault e =
delay $ \_ -> pure $
e ... "preventDefault" $ []
isPropagationStopped :: forall e. IsSyntheticEvent e => e -> Effect Unit
isPropagationStopped :: forall e. IsSyntheticEvent e => e -> Effect Unit
isPropagationStopped e = e ... "isPropagationStopped" $ []
isPropagationStopped e = e ... "isPropagationStopped" $ []
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment