Skip to content

Commit

Permalink
worker tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
jrieken committed Aug 26, 2019
1 parent f60b7b8 commit 0cf92dc
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ declare namespace self {
let close: any;
let postMessage: any;
let addEventLister: any;
let indexedDB: any;
let caches: any;
let indexedDB: { open: any, [k: string]: any };
let caches: { open: any, [k: string]: any };
}

const nativeClose = self.close.bind(self);
Expand All @@ -32,9 +32,8 @@ self.postMessage = () => console.trace(`'postMessage' has been blocked`);
const nativeAddEventLister = addEventListener.bind(self);
self.addEventLister = () => console.trace(`'addEventListener' has been blocked`);

// readonly, cannot redefine...
// self.indexedDB = undefined;
// self.caches = undefined;
self.indexedDB.open = () => console.trace(`'indexedDB.open' has been blocked`);
self.caches.open = () => console.trace(`'indexedDB.caches' has been blocked`);

//#endregion ---

Expand Down

0 comments on commit 0cf92dc

Please sign in to comment.