Skip to content

Commit 533589d

Browse files
committed
Fix Clients.openWindow binding and add Install/Activate event types
Clients.openWindow was compiling to .open() instead of .openWindow(). Added Install and Activate variants to eventType for service worker lifecycle events.
1 parent 0b2c1bc commit 533589d

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/EventAPI.res

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
@unboxed
44
type eventType =
55
| @as("abort") Abort
6+
| @as("activate") Activate
67
| @as("auxclick") Auxclick
78
| @as("beforeinput") Beforeinput
89
| @as("beforetoggle") Beforetoggle
@@ -35,6 +36,7 @@ type eventType =
3536
| @as("focus") Focus
3637
| @as("formdata") Formdata
3738
| @as("input") Input
39+
| @as("install") Install
3840
| @as("invalid") Invalid
3941
| @as("keydown") Keydown
4042
| @as("keypress") Keypress

src/ServiceWorkerAPI/Clients.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Opens a new browser window for a given URL and returns a `Promise` for the new `
2424
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Clients/openWindow)
2525
*/
2626
@send
27-
external openWindow: (clients, string) => promise<windowClient> = "open"
27+
external openWindow: (clients, string) => promise<windowClient> = "openWindow"
2828

2929
/**
3030
Allows an active service worker to set itself as the controller for all clients within its scope.

0 commit comments

Comments
 (0)