backbone.cord.svg
v1.0.0
Published
Plugin for backbone.cord that enables creating svg elements in hyperscript.
Downloads
1
Maintainers
Readme
backbone.cord.svg
Plugin for backbone.cord providing support for creation of svg elements
The _svg method is added to Cord and the Cord.View prototype. It is not passed into the el() method but below is an easy way to create a bound shortcut inside the el() method.
var svg = this._svg.bind(this);
svg('rect', args...);
Backbone.Cord.View.prototype._icon = Backbone.Cord._icon = function() { // TODO return this._svg('svg', this._svg('use')); };