File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3293,13 +3293,19 @@ 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+ var name = installEvent.constructor.name;
3305+ if (name !== 'InstallEvent') {
3306+ return {result: true, message: 'InstallEvent is defined, but install event is an instance of ' + name}
3307+ }
3308+ var instance = installEvent instanceof InstallEvent ? installEvent : undefined;
33033309 IntersectionObserver :
33043310 IntersectionObserver :
33053311 __additional :
You can’t perform that action at this time.
0 commit comments