Skip to content

Commit

Permalink
Document function-in-attributes behaviour
Browse files Browse the repository at this point in the history
Fix #335
  • Loading branch information
tgvashworth committed Jan 23, 2015
1 parent 66164d9 commit 82a4562
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions doc/base_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,16 @@ However, for backwards compatibility, if you are using `this.defaultAttrs` then
all the old attribute behavior remains in place. [More details on
`this.defaultAttrs`](../../v1.1.3/doc/base_api.md#this.defaultAttrs)*

You may pass a function to `this.attributes` to generate an attribute when the component is initialised.

```js
this.attributes({
attachTime: function () {
return new Date();
}
});
```

<a name="this.select"></a>
## this.select(attr)

Expand Down

0 comments on commit 82a4562

Please sign in to comment.