qrElement.addEventListener("DOMSubtreeModified", function(){
// fires once without the src set, then again with it set
imageSourceURL = qrElement.getElementsByTagName("canvas").getAttribute("src");
if (imageSourceURL) {
//console.log(imageSourceURL);
window.location.href = imageSourceURL;
}
}, true);
document.addEventListener('DOMContentLoaded', function(){
var elText = "12331232312332";
qrcode.makeCode(elText);
});