HTML and CSS Reference
In-Depth Information
case XML or HTML data). When interacting with XML, you must declare a namespace
or the browser won't know you've changed namespaces. Some of the symptoms of incor-
rect namespace usage include incorrectly returned data, new DOM elements inserting into
the wrong location, and instability in general. To prevent namespace issues, make use of
methods ending in NS such as get-AttributeNS(NS,element) . For a complete list
of namespace methods, visit Mozilla's documentation on JavaScript DOM elements at ht-
tps:// .
Major JavaScript libraries such as jQuery and MooTools are ignorant of namespaces in
most situations, meaning they won't mix well with manipulating SVG elements.
Until recently, you had to work with VML (Vector Markup Language), Flash, or another
program to use vector graphics on the web. Because IE8 and below don't support SVG,
in production applications you may want to use a JavaScript vector graphics library that
generates code that can be rendered by both older and newer browsers. Currently, the most
popular of these libraries is RaphaelJS, which was used to create the tiger in figure 7.7 .
Search WWH ::

Custom Search