Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/0.7/Writing adaptor plugins.md.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ An {{{createLink 'Adaptors' 'adaptor'}}} is an object with two methods - `filter
```js
myAdaptor = {
filter: function ( object, keypath, ractive ) {
// Ractive uses the `filter` function to determine whether something
// needs to be wrapped or not.
// return `true` if a particular object is of the type we want to adapt
},
// If an object passes the filter, we wrap it.
wrap: function ( ractive, object, keypath, prefixer ) {
// set up event bindings etc, and return a 'wrapper'
}
Expand Down