Skip to content
Newer
Older
100644 43 lines (27 sloc) 935 Bytes
fcc4fff @phiggins42 monster commit from moinconverter, which is always done prior to the …
phiggins42 authored Nov 20, 2011
1 .. _dojo/connectPublisher:
d608cc5 @phiggins42 \r\n -> \n conversion.
phiggins42 authored Nov 20, 2011
2
b0d71a2 @phiggins42 headings
phiggins42 authored Nov 23, 2011
3 =====================
9dd52dc @phiggins42 mondo whitespace change
phiggins42 authored Nov 20, 2011
4 dojo.connectPublisher
5 =====================
d608cc5 @phiggins42 \r\n -> \n conversion.
phiggins42 authored Nov 20, 2011
6
2db6e6b @wkeese Overhaul event documentation.
wkeese authored Mar 12, 2012
7 Deprecated.
d608cc5 @phiggins42 \r\n -> \n conversion.
phiggins42 authored Nov 20, 2011
8
2db6e6b @wkeese Overhaul event documentation.
wkeese authored Mar 12, 2012
9 dojo.connectPublisher() was an automation of this common form:
d608cc5 @phiggins42 \r\n -> \n conversion.
phiggins42 authored Nov 20, 2011
10
c49c87d @phiggins42 normalization
phiggins42 authored Nov 21, 2011
11 .. js ::
d608cc5 @phiggins42 \r\n -> \n conversion.
phiggins42 authored Nov 20, 2011
12
9dd52dc @phiggins42 mondo whitespace change
phiggins42 authored Nov 20, 2011
13 dojo.connect(myObject, "myEvent", function(){
14 dojo.publish("/some/topic/name", arguments);
15 });
d608cc5 @phiggins42 \r\n -> \n conversion.
phiggins42 authored Nov 20, 2011
16
2db6e6b @wkeese Overhaul event documentation.
wkeese authored Mar 12, 2012
17 Which became:
d608cc5 @phiggins42 \r\n -> \n conversion.
phiggins42 authored Nov 20, 2011
18
2db6e6b @wkeese Overhaul event documentation.
wkeese authored Mar 12, 2012
19 .. code-block :: javascript
d608cc5 @phiggins42 \r\n -> \n conversion.
phiggins42 authored Nov 20, 2011
20
9dd52dc @phiggins42 mondo whitespace change
phiggins42 authored Nov 20, 2011
21 dojo.connectPublisher("/some/topic/name", myObject, "myEvent");
d608cc5 @phiggins42 \r\n -> \n conversion.
phiggins42 authored Nov 20, 2011
22
2db6e6b @wkeese Overhaul event documentation.
wkeese authored Mar 12, 2012
23 But going forward users should use the following for connecting to DOM events:
d608cc5 @phiggins42 \r\n -> \n conversion.
phiggins42 authored Nov 20, 2011
24
c49c87d @phiggins42 normalization
phiggins42 authored Nov 21, 2011
25 .. js ::
2db6e6b @wkeese Overhaul event documentation.
wkeese authored Mar 12, 2012
26
27 require(["dojo/on", "dojo/topic"], function(on, topic){
28 on(myNode, "click", function(){
29 topic.publish("/some/topic/name", arg1, arg2, arg3);
30 });
31 });
32
33 Or this for after-advice on arbitrary methods of arbitrary objects:
f57344b @wkeese More cleanup around .. js, .. css, and unneeded <script>/<style> tags
wkeese authored Dec 20, 2011
34
35 .. js ::
2db6e6b @wkeese Overhaul event documentation.
wkeese authored Mar 12, 2012
36
37 require(["dojo/aspect", "dojo/topic"], function(aspect, topic){
38 aspect.after(myObj, "myFunc", function(){
39 topic.publish("/some/topic/name", arg1, arg2, arg3);
40 });
41 });
42
Something went wrong with that request. Please try again.