The processing of data also requires graphic tools for visualization:
- – to draw directly into the web page, from data array (vector format);
- – to display pictures, from image or video sources (pixel format).
9.1. To draw in the web page
First, we need a surface onto which to place the drawing. There are three approaches, corresponding to the three following elements:
- – <iframe>: this opens a new window, placed in a rectangle of the target window, although it is actually a different window from a different HTTP request and with an independent
windowobject, and is hence a different
- – <svg>: SVG is a markup language, like HTML, and can be run with a specific layout engine. We can display an <svg> page, just as we display an <html> page. Moreover, SVG shares several features with HTML: (a) a document model similar to the DOM, and which can be “embedded” as a branch of the DOM so that the HTML layout engine is capable handling it; (b) style rules in a CSS format, which can be included in the same style ...