Skip to content

Latest commit

 

History

History
107 lines (71 loc) · 2.62 KB

connectPublisher.rst

File metadata and controls

107 lines (71 loc) · 2.62 KB

dojo.connectPublisher

Project owner

Alex Russell

Available

since V0.9

Ensure that everytime an event is called, a message is published on the topic.

Introduction

dojo.connectPublisher is an automation of this common form:

[ Dojo 1.7 AMD ]

Which becomes:

[ Dojo < 1.7 ]

Which becomes:

Usage

Returns a handle which can be passed to dojo.disconnect() <dojo/disconnect> to disable subsequent automatic publication on the topic.

Parameter Type Description
topic String The name of the topic to publish.
obj Object|null 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

Programmatic example

See also

  • Event QuickStart <quickstart/events>
  • dojo.connect <dojo/connect>
  • dojo.publish <dojo/publish>
  • dojo.disconnect <dojo/disconnect>