madrobby/zepto — pull request #972 by jakeboxer (2014-06-15 19:59:55+00:00)
Title: Add function argument support for `.text()`

Currently, `.html()` supports function arguments (like jQuery) but `.text()` doesn't (while jQuery's does):

```javascript
$("#some-element").html(function(idx, html) { return 'sup' })
$("#some-element").html()
// "sup"

$("#some-element").text(function(idx, text) { return 'sup' })
$("#some-element").text()
// "function(idx, text) { return 'sup' }"
```

This branch adds function argument support to `.text()` and adds a couple tests. If this gets merged, I'll also update the docs after.