Skip to content

Commit 821ed8e

Browse files
authored
Refine custom test for InstallEvent
1 parent f9bcb66 commit 821ed8e

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

custom/tests.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3293,13 +3293,17 @@ api:
32933293
var instance = new InputEvent('input');
32943294
InstallEvent:
32953295
__base: |-
3296+
if (!('InstallEvent' in self)) {
3297+
return {result: false, message: 'InstallEvent is not defined'}
3298+
}
3299+
32963300
// During the installation of the service worker, we set an "installEvent" global variable so that we may easily reuse it here:
32973301
// var installEvent = null;
32983302
// self.addEventListener('install', function (event) {
32993303
// installEvent = event;
33003304
// });
33013305
3302-
var instance = installEvent;
3306+
var instance = installEvent of InstallEvent ? installEvent : undefined;
33033307
IntersectionObserver:
33043308
IntersectionObserver:
33053309
__additional:

0 commit comments

Comments
 (0)