[Bug?] this.class cannot set class
almonk opened this issue · comments
Alasdair Monk commented
With the following code I cannot set the class of the button:
{
$type: 'button',
$text: 'Send message',
$init: function() {
this.class = "button-primary"
}
}
However, other attributes do work like this, for e.g.:
{
$type: 'button',
$text: 'Send message',
$init: function() {
this.disabled = true
}
}
snek commented
try className
as per spec
Alasdair Monk commented
@devsnek where is this spec?
Alasdair Monk commented
@devsnek this fixed it ! thanks