kd-core
Version:
core module for kd
25 lines (14 loc) • 523 B
text/coffeescript
KDView = require './View'
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