File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
Expand file tree Collapse file tree 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
77Breaking changes:
88
99New features:
10+ - Added ` fromEventTarget ` function for ` Window ` (#53 by @thomashoneyman )
1011
1112Bugfixes:
1213
Original file line number Diff line number Diff line change 11module Web.HTML.Window
22 ( Window
33 , toEventTarget
4+ , fromEventTarget
45 , document
56 , navigator
67 , location
@@ -48,12 +49,16 @@ import Web.HTML.History (History)
4849import Web.HTML.Location (Location )
4950import Web.HTML.Navigator (Navigator )
5051import Web.Storage.Storage (Storage )
52+ import Web.Internal.FFI (unsafeReadProtoTagged )
5153
5254foreign import data Window :: Type
5355
5456toEventTarget :: Window -> EventTarget
5557toEventTarget = unsafeCoerce
5658
59+ fromEventTarget :: EventTarget -> Maybe Window
60+ fromEventTarget = unsafeReadProtoTagged " Window"
61+
5762foreign import document :: Window -> Effect HTMLDocument
5863
5964foreign import navigator :: Window -> Effect Navigator
You can’t perform that action at this time.
0 commit comments