summaryrefslogtreecommitdiff
path: root/ext/mixed/js/text-scanner.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/mixed/js/text-scanner.js')
-rw-r--r--ext/mixed/js/text-scanner.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/ext/mixed/js/text-scanner.js b/ext/mixed/js/text-scanner.js
index 98d87341..411b1b20 100644
--- a/ext/mixed/js/text-scanner.js
+++ b/ext/mixed/js/text-scanner.js
@@ -309,7 +309,7 @@ class TextScanner extends EventDispatcher {
try {
if (this._textSourceCurrent !== null && this._textSourceCurrent.hasSameStart(textSource)) {
- return;
+ return null;
}
({optionsContext, detail} = await this._getSearchContext());
@@ -327,9 +327,9 @@ class TextScanner extends EventDispatcher {
error = e;
}
- if (!searched) { return; }
+ if (!searched) { return null; }
- this.trigger('searched', {
+ const results = {
textScanner: this,
type,
definitions,
@@ -339,7 +339,9 @@ class TextScanner extends EventDispatcher {
optionsContext,
detail,
error
- });
+ };
+ this.trigger('searched', results);
+ return results;
}
_onMouseOver(e) {