Skip to content
This repository has been archived by the owner on Oct 4, 2020. It is now read-only.

Reanimate MessageEvent - got lost #53

Merged
merged 1 commit into from
Jun 21, 2016
Merged
Changes from all commits
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
11 changes: 11 additions & 0 deletions src/DOM/Websocket/Event/Types.purs
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,14 @@ readCloseEvent = unsafeReadTagged "CloseEvent"

instance isForeignCloseEvent :: IsForeign CloseEvent where
read = readCloseEvent

foreign import data MessageEvent :: *

messageEventToEvent :: MessageEvent -> Event
messageEventToEvent = U.unsafeCoerce

readMessageEvent :: Foreign -> F MessageEvent
readMessageEvent = unsafeReadTagged "MessageEvent"

instance isForeignMessageEvent :: IsForeign MessageEvent where
read = readMessageEvent