google-code-export / bwip-js

Automatically exported from code.google.com/p/bwip-js
0 stars 0 forks source link

BWIP is not ready right away #10

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
1. Try to call BWIP in the onload() function in the browser
2. Get exception.

Is there an easy way to know when BWIP has finished loading all of its 
dependencies?

Original issue reported on code.google.com by dho...@gmail.com on 3 Nov 2014 at 9:17

GoogleCodeExporter commented 9 years ago
The demo was designed for interactive use, so there is no notification event 
but you can easily add in a post-load trigger.  The scripts are loaded in 
lib/canvas.js, lines 24-51.  Browsers will load the scripts in the order they 
are appended.  You could add a custom script that is appended at the end, after 
the fonts, that calls your custom post-load function.

Original comment by mwar...@metafloor.com on 4 Nov 2014 at 5:15