Skip to content

Commit 13fd085

Browse files
committed
Fix the CustomEvent's makeWithOption signature.
As seen in [1], the options is an object with a `detail` property, not the detail directly. [1]: https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent
1 parent f64e3eb commit 13fd085

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Webapi/Dom/Webapi__Dom__CustomEvent.res

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ module Make = (
1919
include Webapi__Dom__Event.Impl({
2020
type t = t
2121
})
22+
type options = {detail: Detail.t}
2223

2324
@new external make: string => t = "CustomEvent"
24-
@new external makeWithOptions: (string, Detail.t) => t = "CustomEvent"
25+
@new external makeWithOptions: (string, options) => t = "CustomEvent"
2526
@get external detail: t => Detail.t = "detail"
2627
}

0 commit comments

Comments
 (0)