Webcomponent wrapper to read QR codes, using jsqrcode lib.
Maintained by Eduard C..
Check it live. (works at least on Chrome Canary 32.0.1657.2)
-
Import Web Components' polyfill:
<script src="//cdnjs.cloudflare.com/ajax/libs/polymer/0.0.20130711/polymer.min.js"></script>
-
Import Custom Element:
<link rel="import" href="src/qr-reader.html">
-
Import jsqrcode lib:
<script src="src/jsqrcode.js"></script>
-
Start using it!
<qr-reader output></qr-reader>
Attribute | Options | Default | Description |
---|---|---|---|
output |
string | undefined |
Default output if set, or CSS selectors of an external tag. |
outputAttr |
string | textContent |
Attribute of the external tag where the value will be set. |
onRead |
string | undefined |
String containing a function name to be executed after read. It can contain namespaces, i.e.: "App.ctrl.onRead". |
interval |
int | 1000 |
Interval of time in each capture (in ms). |
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -m 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
- v0.0.3 September 18, 2013
- jsqrcode it's not called from the component. It needs now to be added as a dependency.
- v0.0.2 September 18, 2013
- First working version of the component.
- v0.0.1 September 16, 2013
- Started project using boilerplate-element