Commit 6d233876 authored by Gabriel Monnerat's avatar Gabriel Monnerat

erp5_document_scanner: display alert just to debug easily in mobile

parent c21f9862
...@@ -177,6 +177,9 @@ ...@@ -177,6 +177,9 @@
.push(function (element) { .push(function (element) {
root = element; root = element;
selector = element.querySelector("select"); selector = element.querySelector("select");
if (!navigator.mediaDevices) {
throw("mediaDevices is not supported");
}
return navigator.mediaDevices.enumerateDevices(); return navigator.mediaDevices.enumerateDevices();
}) })
.push(function (info_list) { .push(function (info_list) {
...@@ -202,6 +205,9 @@ ...@@ -202,6 +205,9 @@
return startup(root, evt.target.value); return startup(root, evt.target.value);
} }
}); });
})
.then(undefined, function(e) {
alert(e);
}); });
}) })
.declareMethod('getContent', function () { .declareMethod('getContent', function () {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment