<html>
<head>
<script type="text/javascript" src="https://cdn.rawgit.com/joel-myworld/zebralibs/main/ebapi-modules.js"></script>
<script type="text/javascript">
function scanReceived(params){
if(params['data']== "" || params['time']==""){
document.getElementById('display').innerHTML = "Failed!";
return;
}
var displayStr = "Barcode Data: " +params['data']+"<br>Time: "+params['time'];
document.getElementById("display").innerHTML = displayStr;
}
function loadEvent(){
EB.Barcode.enable({allDecoders:true}, scanReceived);
}
function unloadEvent(){
EB.Barcode.disable();
}
window.addEventListener('DOMContentLoaded', loadEvent);
window.addEventListener('unload',unloadEvent);
</script>
</head>
<body onload="Javascript:loadEvent()" onunload="Javascript:unloadEvent()">
<h1>Scan Common API (EB)</h1>
Scan a barcode.<br><br><br>
<div id="display">
Barcode Data: <br>
Time:
</div><br>
</body>
</html>