JSAPI.info

dojo.connectPublisher

Dojo (1.6.1) - see full source
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
                                    /*String*/ event){
    //    summary:
    //         Ensure that every time 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.
    //    topic:
    //         The name of the topic to publish.
    //    obj:
    //         The source object for the event function. Defaults to dojo.global
    //         if null.
    //    event:
    //         The name of the event function in obj.
    //         I.e. identifies a property obj[event].
    //    example:
    //    |    dojo.connectPublisher("/ajax/start", dojo, "xhrGet");
    var pf = function(){ dojo.publish(topic, arguments); }
    return event ? dojo.connect(obj, event, pf) : dojo.connect(obj, pf); //Handle
};