Open romancow opened 8 years ago
Maybe use nested objects?
new DimDom.SVG('image', { xlink: { href: "example.jpg" } });
Or split name on :
?
DimDom.NS({XLink: "http://www.w3.org/1999/xlink"}, function(ns) {
new ns.SVG("image", {"xlink:href": "example.jpg"});
});
Support some method for setting attribute's wit namespaces - for example the
xlink:href
for svg.Not sure what the syntax for this should be. Maybe pass a two item array as the attribute value?
I'd prefer the namespace to be more associated with the attribute name than the value, though.