Howto:Extend the Canvas SVG module: Difference between revisions

Jump to navigation Jump to search
Line 177: Line 177:
<syntaxhighlight lang="nasal">
<syntaxhighlight lang="nasal">
var ref = attr["xlink:href"];
var ref = attr["xlink:href"];
       if( ref == nil or size(ref) < 2 or ref[0] != `#` )
       if( ref == nil )
         return printlog("warn", "Invalid or missing href in image tag: '" ~ ref ~ '"');
         return printlog("warn", "Invalid or missing href in image tag: '" ~ ref ~ '"');
pushElement('image',  attr['id']);
pushElement('image',  attr['id']);

Navigation menu