Barcode Event is an event-driven, framework-agnostic library capturing barcode input as simulated keystrokes, TypeScript supported
npm i
npm run-script buildSimply place the .js script just built to the HTML <head> tag, check out examples. Then use barcode scanner or barcode-scanner-emulator.vbs (3 seconds delay for your preparation) to test
- Occupied
window.barcodeEventbarcodeEvent.ON_BARCODE_SCANNEDcomponentDidMount() {
window.addEventListener(barcodeEvent.ON_BARCODE_SCANNED, e => {
// the barcode in in e.detail, do anything you want.
});
}Please help if you find bugs or want to test it, thanks!