(Here is repeat of what I sent to Ian yesterday, for historical benefit of the group. Don't know why the email headers are set up so that replies go to the individual author instead of the group by default).
So many great functions in the library and it's hard to know what to search for on the API page. el's a great function. Thanks!
Works just as you said. For consistency, and for the same convenience I get from setting say rectangle attributes via instantiation parameters, I did put it into my plugin.
Paper.prototype.a = function(href, target) {
const attrs = {href: href};
if (target !== undefined) attrs.target = target;
return this.el("a").attr(attrs);
};
I don't need the legacy "xlink:" prefix. I have the luxury of not needing to support legacy browsers.