Skip to content

Justin790126/webpack-jsqrcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Webpack-jsqrcode

This is the porting from jsqrcode.

Build

npm install
npm run build

The jsqrcode.js is in dist folder.

Usage

Example in index.html. Just inculde jsqrcode.js, then, you can use qrcode object.

    <script src="dist/jsqrcode.js"></script>

API

New an object

    var qrcode = window.qrcode;

Start decode

To feed the source image to qrcode object, create a canvas with id of qr-canvas, and drawImage on it, and then call decode to decode the result.

    qrcode.decode(); // After decode finished onGetResult event will be evoked

Event

When qrcode is decoded, and get the decoded result.

    qrcode.onGetResult = function(decodedResult) {
         
    }

More detail example

Reference to jsqrcode test.html.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published