intercellular / cell

A self-driving web app framework

Home Page:https://www.celljs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug?] this.class cannot set class

almonk opened this issue · comments

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
    }
}
commented

try className as per spec

@devsnek where is this spec?

@devsnek this fixed it ! thanks