Skip to content

Commit 4f09133

Browse files
themoritznatefaubion
authored andcommitted
add onCut, onCopy, onPaste (#4)
1 parent 861c2c2 commit 4f09133

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

src/DOM/HTML/Indexed.purs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
module DOM.HTML.Indexed where
22

3-
import Data.DateTime (DateTime)
4-
import Data.MediaType (MediaType)
3+
import DOM.Event.ClipboardEvent (ClipboardEvent)
54
import DOM.Event.Types (Event, MouseEvent, KeyboardEvent, FocusEvent, TouchEvent)
65
import DOM.HTML.Event.Types (DragEvent)
76
import DOM.HTML.Indexed.ButtonType (ButtonType)
@@ -10,14 +9,16 @@ import DOM.HTML.Indexed.DirValue (DirValue)
109
import DOM.HTML.Indexed.FormMethod (FormMethod)
1110
import DOM.HTML.Indexed.InputType (InputType)
1211
import DOM.HTML.Indexed.KindValue (KindValue)
13-
import DOM.HTML.Indexed.MenuitemType (MenuitemType)
1412
import DOM.HTML.Indexed.MenuType (MenuType)
13+
import DOM.HTML.Indexed.MenuitemType (MenuitemType)
1514
import DOM.HTML.Indexed.OnOff (OnOff)
1615
import DOM.HTML.Indexed.OrderedListType (OrderedListType)
1716
import DOM.HTML.Indexed.PreloadValue (PreloadValue)
1817
import DOM.HTML.Indexed.ScopeValue (ScopeValue)
1918
import DOM.HTML.Indexed.StepValue (StepValue)
2019
import DOM.HTML.Indexed.WrapValue (WrapValue)
20+
import Data.DateTime (DateTime)
21+
import Data.MediaType (MediaType)
2122

2223
type CSSPixel = Int
2324

@@ -111,7 +112,14 @@ type FocusEvents r =
111112
| r
112113
)
113114

114-
type InteractiveEvents r = FocusEvents (TransitionEvents (KeyEvents (PointerEvents (TouchEvents (DragEvents (MouseEvents r))))))
115+
type ClipboardEvents r =
116+
( onCopy :: ClipboardEvent
117+
, onCut :: ClipboardEvent
118+
, onPaste :: ClipboardEvent
119+
| r
120+
)
121+
122+
type InteractiveEvents r = ClipboardEvents (FocusEvents (TransitionEvents (KeyEvents (PointerEvents (TouchEvents (DragEvents (MouseEvents r)))))))
115123

116124
type GlobalProperties r = GlobalAttributes (GlobalEvents r)
117125

0 commit comments

Comments
 (0)