SVG:Namespace: Difference between revisions

Jump to navigation Jump to search
→‎use namespace-aware methods in javascript: clarification on qualified attributes
m (Added link back to SVG:Home_Page)
(→‎use namespace-aware methods in javascript: clarification on qualified attributes)
Line 33: Line 33:
*...
*...


svg elements are in the svg namespace. svg attributes are in the null namespace.
svg elements are in the svg namespace. Unqualified svg attributes are in the null namespace. Qualified attributes are in whatever namespace their prefix id declared as - so for example xlink:href is in the XLink namespace, http://www.w3.org/1999/xlink.
for example, to dynamically create an <image> element, do it like this:
For example, to dynamically create an <image> element, do it like this:


  const svgns="http://www.w3.org/2000/svg";
  const svgns="http://www.w3.org/2000/svg";

Navigation menu