4 ms·
Why not? If <canvas> is being used as a drop-in replacement for Flash, why wouldn't it just be used in exactly the same ways? There's nothing special about canv
by elblanco 17y ago
Why not? If <canvas> is being used as a drop-in replacement for Flash, why wouldn't it just be used in exactly the same ways? There's nothing special about canvas that would make it less prone to abuse.
- glhaynes 17y agoFlash includes a ton of controls: buttons, scrollbars, text areas, etcetera. It has its own scripting language and memory environment that is separate from the HTML page and its DOM/JavaScript environment that contains it. There are ways to shuffle data and events between the two, but that means going out of your way to do so. So if you're going to have a Flash-y data visualization component, say, it's easiest and most natural to have the controls for it (buttons adjusting parameters, display of those parameters, navigational controls) made in Flash too -- just expand the content rectangle of your Flash component out and drop in the controls. In HTML5, the 'environment' of the <canvas> object is that of the surrounding HTML page. Adding buttons and other controls around the edge of your visualizer is most straightforwardly done by using "native" HTML <button>s and other such elements. So it would be surprising to see <canvas>-using pages end up being done in a way where the <canvas> is essentially the whole page — it would require more programmer effort — whereas in Flash that's by far the easiest way to do it.