-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathMessageEvent.res
More file actions
38 lines (33 loc) · 1.73 KB
/
Copy pathMessageEvent.res
File metadata and controls
38 lines (33 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
open EventAPI
open WebSocketsAPI
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MessageEvent)
*/
@new
external make: (~type_: string, ~eventInitDict: messageEventInit<'t>=?) => messageEvent<'t> =
"MessageEvent"
external asEvent: messageEvent<'t> => event = "%identity"
/**
Returns the invocation target objects of event's path (objects on which listeners will be invoked), except for any nodes in shadow trees of which the shadow root's mode is "closed" that are not reachable from event's currentTarget.
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Event/composedPath)
*/
@send
external composedPath: messageEvent<'t> => array<eventTarget> = "composedPath"
/**
When dispatched in a tree, invoking this method prevents event from reaching any objects other than the current object.
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Event/stopPropagation)
*/
@send
external stopPropagation: messageEvent<'t> => unit = "stopPropagation"
/**
Invoking this method prevents event from reaching any registered event listeners after the current one finishes running and, when dispatched in a tree, also prevents event from reaching any other objects.
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Event/stopImmediatePropagation)
*/
@send
external stopImmediatePropagation: messageEvent<'t> => unit = "stopImmediatePropagation"
/**
If invoked when the cancelable attribute value is true, and while executing a listener for the event with passive set to false, signals to the operation that caused event to be dispatched that it needs to be canceled.
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Event/preventDefault)
*/
@send
external preventDefault: messageEvent<'t> => unit = "preventDefault"