Closed elantion closed 8 years ago
Oh, there is a 'embedded' event trigger after embed. I can use it like this:
image.embed(parentEl);
image.addEventListener('embedded', function(){
var imageEl = parentEl.getElementsByTagName('img') || parentEl.getElementsByTagName('canvas');
});
Sorry I didn't read document carefully.
Create canvas element seem like not a sync behavior. So we need a callback after create a canvas.