Skip to content

Add fromEventTarget to Window #53

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 13, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add fromEventTarget to Window
  • Loading branch information
thomashoneyman authored Mar 9, 2021
commit 011a26d2c0d618fa993a96e392eee7fd7c931b53
3 changes: 3 additions & 0 deletions src/Web/HTML/Window.purs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ foreign import data Window :: Type
toEventTarget :: Window -> EventTarget
toEventTarget = unsafeCoerce

fromEventTarget :: EventTarget -> Maybe Window
fromEventTarget = unsafeReadProtoTagged "Window"

foreign import document :: Window -> Effect HTMLDocument

foreign import navigator :: Window -> Effect Navigator
Expand Down