Quote from: danya_postfactum at Nov 21, 2012, 08:53 AMI would like to see DOM+canvas implementation. For now, we need many extra-divs for decoration (visual) purpose. But we can use only one div + canvas for each semantic element of widget.
One key thing to understand about canvas is that it runs in an immediate drawing more, whereas things like Flash, Silverlight, or SVG run very differently in what's called retained mode.
In retrained mode, a display list of objects is kept by the graphics renderer and objects are displayed on the screen according to attributes set in code.. This keeps the programmer away from the low-level operations, but gives her less control over the final rendering of the bitmapped screen. - HTML5 Canvas
Basically what that means is in Flash you can do something like "create ball" and then however many frames later "move ball" and ball still exists.
Canvas, the exact opposite.
HTML5 Canvas is an immediate mode bitmapped area of the screen that can be manipulated with JavaScript. Immediate mode refers to the way the canvas renders pixels on the screen. HTML5 Canvas completely redraws the bitmapped screen on every frame using Canvas API calls from JavaScript. As a programmer, your job is to set up the screen display before each frame is rendered so that the correct pixels will be shown. - HTML5 Canvas
So in canvas its "create ball" and then a few frames later there is no ball, unless you recreate one.
Being immediate mode, canvas caters towards animation but creating any sort of UI elements with it would seem like a nightmare, and require a lot more JS than the occasional extra few divs.
[ed. note: dinocorn last edited this post 11 years, 5 months ago.]