dojo.connectPublisher
<script src="../../js/dojo.js"></script>
defined in dojo/_base/connect.js
Ensure that everytime obj.event() is called, a message is published on the topic. Returns a handle which can be passed to dojo.disconnect() to disable subsequent automatic publication on the topic.
parameter | type | description |
---|---|---|
topic | String | The name of the topic to publish. |
obj | Object | The source object for the event function. Defaults to dojo.global if null. |
event | String | The name of the event function in obj. I.e. identifies a property obj[event]. |
Examples
Example 1
dojo.connectPublisher("/ajax/start", dojo, "xhrGet"};