O'Reilly logo

Special Edition Using XML, Second Edition by - et al. David Gulbransen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Scripting SVG

You have seen how SVG declarative animation can produce visual effects that would require JavaScript if you tried to create the effects using HTML. But JavaScript is still important for use with SVG—for example, when you want to include decision logic about when particular actions are to be carried out. In this section, you will be introduced to some basic JavaScript techniques that you can use with SVG.

The Document Object Model

The W3C Document Object Model, often simply called the DOM, is a specification that describes HTML and XML documents as hierarchies of objects. The DOM is essentially an Application Programming Interface (API) to the elements in an HTML or XML document. JavaScript is one of the scripting languages that ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required