diff --git a/doc/base_api.md b/doc/base_api.md index 77d455dc..b92abe83 100644 --- a/doc/base_api.md +++ b/doc/base_api.md @@ -100,6 +100,15 @@ this.after('initialize', function() { }); ``` +Example of `handler` having the `ev` and `data` parameters that can be used +to receive data from the component's optional `trigger` parameter `eventPayload`. + +```js +this.on(document, 'dataSent', function (ev, data) { + alert('Message sent: ' + data.msg); +}); +``` + Example of `handler` being an object that maps event targets to callbacks. This is effectively event delegation; selector values are resolved, at event time, by keying into the `attr` property of the component.