diff options
Diffstat (limited to 'dev')
-rw-r--r-- | dev/database-vm.js | 6 | ||||
-rw-r--r-- | dev/translator-vm.js | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/dev/database-vm.js b/dev/database-vm.js index b682bca3..014c989f 100644 --- a/dev/database-vm.js +++ b/dev/database-vm.js @@ -101,8 +101,8 @@ function atob(data) { } class DatabaseVM extends VM { - constructor() { - super({ + constructor(globals={}) { + super(Object.assign({ chrome, Image, Blob, @@ -111,7 +111,7 @@ class DatabaseVM extends VM { IDBKeyRange: global.IDBKeyRange, JSZip, atob - }); + }, globals)); this.context.window = this.context; this.indexedDB = global.indexedDB; } diff --git a/dev/translator-vm.js b/dev/translator-vm.js index f68b25db..7eab47b8 100644 --- a/dev/translator-vm.js +++ b/dev/translator-vm.js @@ -26,8 +26,8 @@ function clone(value) { } class TranslatorVM extends DatabaseVM { - constructor() { - super(); + constructor(globals) { + super(globals); this._japaneseUtil = null; this._translator = null; this._ankiNoteDataCreator = null; |