3 ms·
It's interesting how it sticks the images in the DOM as hidden image elements. I've been working with canvas for the past year and I've never come across someon
by ronaldj 16y ago
It's interesting how it sticks the images in the DOM as hidden image elements. I've been working with canvas for the past year and I've never come across someone doing it that way before. Anyone know pros/cons over doing it that way versus loading an image using the Image object in JavaScript?
- donohoe 16y agoSo this is a wild guess since I'm unable to look at the source but having the images loaded prior to rendering on canvas might provide a speed boost so less chance ofnwaiting for images to load, and maybe there is a caching advantage you get by also having images in DOM? I'll dig into it tomorrow when I have a laptop to use.