File tree 2 files changed +6
-0
lines changed
2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ Notable changes to this project are documented in this file. The format is based
7
7
Breaking changes:
8
8
9
9
New features:
10
+ - Added ` fromEventTarget ` function for ` Window ` (#53 by @thomashoneyman )
10
11
11
12
Bugfixes:
12
13
Original file line number Diff line number Diff line change 1
1
module Web.HTML.Window
2
2
( Window
3
3
, toEventTarget
4
+ , fromEventTarget
4
5
, document
5
6
, navigator
6
7
, location
@@ -48,12 +49,16 @@ import Web.HTML.History (History)
48
49
import Web.HTML.Location (Location )
49
50
import Web.HTML.Navigator (Navigator )
50
51
import Web.Storage.Storage (Storage )
52
+ import Web.Internal.FFI (unsafeReadProtoTagged )
51
53
52
54
foreign import data Window :: Type
53
55
54
56
toEventTarget :: Window -> EventTarget
55
57
toEventTarget = unsafeCoerce
56
58
59
+ fromEventTarget :: EventTarget -> Maybe Window
60
+ fromEventTarget = unsafeReadProtoTagged " Window"
61
+
57
62
foreign import document :: Window -> Effect HTMLDocument
58
63
59
64
foreign import navigator :: Window -> Effect Navigator
You can’t perform that action at this time.
0 commit comments