Skip to content

0.2.1 theory attributes

Ivan S Glazunov edited this page Feb 20, 2015 · 2 revisions

theory about attributes

With attributes are working double and single tags.

  • When you inherit the attributes overlap.
    • Exception: classes, they are added at inheritance.
  • You can use a .
  • In processing is converted into IAttributes
Attributes can be passed to constructor
div('[attr1="value1" attr2=value2, "attr3"]',"[attr4=value4]['attr5' attr6]")()
.render(console.log);
<div attr1="value1" attr2="value2" "attr3" attr4="value4" 'attr5' attr6></div>
  • The separator can be put spaces or commas.
div({ attr1: 'value1', attr2: 'value2', '"attr3"': null }, { attr4: 'value4', "'attr5'": null, attr6: null })()
.render(console.log)
<div attr1="value1" attr2="value2" "attr3" attr4="value4" 'attr5' attr6></div>
Clone this wiki locally