kdf
Version:
24 lines (14 loc) • 529 B
text/coffeescript
KDView = require './view.coffee'
module.exports = class KDCustomHTMLView extends KDView
constructor:(options = {}, data)->
= options if typeof options is 'string'
?= options.tagName ? 'div'
if is 'a' and not options.attributes?.href?
options.attributes or= {}
options.attributes.href = '#'
super options, data
setDomElement:(cssClass)->
super
'kdview'
el =
el.removeAttribute 'class' unless el.classList.length