Functiondojo.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.

Usage

function (/*String*/ topic, /*Object*/ obj, /*String*/ event) (view source)
parametertypedescription
topicStringThe name of the topic to publish.
objObjectThe source object for the event function. Defaults to dojo.global if null.
eventStringThe name of the event function in obj. I.e. identifies a property obj[event].

Examples

Example 1

dojo.connectPublisher("/ajax/start", dojo, "xhrGet"};