aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/backend.js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2017-09-05 20:35:39 -0700
committerAlex Yatskov <alex@foosoft.net>2017-09-05 20:35:39 -0700
commit722ddf163818035d603ba8042e1e32ff7dcdfc84 (patch)
tree1fd4ed0766b2b4ea19ac6eb9224bb5d66edde859 /ext/bg/js/backend.js
parent9eac50ea05ae48e77c1bb0ef7b42d9662094cbf8 (diff)
work on sandbox
Diffstat (limited to 'ext/bg/js/backend.js')
-rw-r--r--ext/bg/js/backend.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js
index 6b3acaa9..9802ea7c 100644
--- a/ext/bg/js/backend.js
+++ b/ext/bg/js/backend.js
@@ -22,6 +22,7 @@ class Backend {
this.translator = new Translator();
this.anki = new AnkiNull();
this.options = null;
+ this.sequence = 0;
}
async prepare() {
@@ -36,6 +37,14 @@ class Backend {
}
}
+ sequenceNew() {
+ return this.sequence++;
+ }
+
+ sandbox() {
+ return document.getElementById('sandbox').contentWindow;
+ }
+
onOptionsUpdated(options) {
this.options = utilIsolate(options);