Skip to content
Snippets Groups Projects
Commit 7a59f75c authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

Inline sendUrl

parent 66cb128b
No related branches found
No related tags found
No related merge requests found
......@@ -291,7 +291,8 @@ export class QrCodeScanner extends ScopedElementsMixin(DBPLitElement) {
if (code) {
if (lastSentData !== code.data) {
that._outputData = code.data;
that.sendUrl(code.data);
that.dispatchEvent(new CustomEvent("code-detected",
{bubbles: true, composed: true, detail: {'code': code.data}}));
}
lastSentData = code.data;
} else {
......@@ -341,17 +342,6 @@ export class QrCodeScanner extends ScopedElementsMixin(DBPLitElement) {
this._loadingMessage = '';
}
/**
* Sends an event with the data which is detected from QR code reader
*
* @param data
*/
sendUrl(data) {
const event = new CustomEvent("code-detected",
{ bubbles: true, composed: true , detail: {'code': data}});
this.dispatchEvent(event);
}
static get styles() {
// language=css
return css`
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment