File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -3293,13 +3293,18 @@ 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+ }
32963299 // During the installation of the service worker, we set an "installEvent" global variable so that we may easily reuse it here:
32973300 // var installEvent = null;
32983301 // self.addEventListener('install', function (event) {
32993302 // installEvent = event;
33003303 // });
3301-
3302- var instance = installEvent;
3304+ if (!(installEvent instanceof InstallEvent)) {
3305+ return {result: false, message: 'install event has unexpected type: ' + installEvent.constructor.name}
3306+ }
3307+ var instance = installEvent instanceof InstallEvent ? installEvent : undefined;
33033308 IntersectionObserver :
33043309 IntersectionObserver :
33053310 __additional :
You can’t perform that action at this time.
0 commit comments