source: Dev/trunk/src/client/dojox/wire/tests/markup/Invocation.html

Last change on this file was 483, checked in by hendrikvanantwerpen, 11 years ago

Added Dojo 1.9.3 release.

File size: 1.6 KB
Line 
1<html>
2<head>
3<title>Test Invocation</title>
4<script type="text/javascript" src="../../../../dojo/dojo.js" data-dojo-config="isDebug: true, parseOnLoad:true "></script>
5<script type="text/javascript">
6dojo.provide("dojox.wire.ml.tests.markup.Invocation");
7
8dojo.require("dojo.parser");
9dojo.require("doh.runner");
10dojo.require("dojox.wire.ml.Invocation");
11
12dojox.wire.ml.tests.markup.Invocation = {
13        invoke: function(p1, p2){return p1 + p2;},
14        invokeError: function(p){throw new Error(p);},
15        parameters: {a: "A", b: "B", c: "C"}
16};
17
18dojo.addOnLoad(function(){
19        doh.register("dojox.wire.ml.tests.markup.Invocation", [
20
21                function test_Invocation_method(t){
22                        dojo.publish("invokeMethod");
23                        t.assertEqual("AB", dojox.wire.ml.tests.markup.Invocation.result);
24                },
25
26                function test_Invocation_topic(t){
27                        dojo.publish("invokeTopic");
28                        t.assertEqual("C", dojox.wire.ml.tests.markup.Invocation.error);
29                }
30
31        ]);
32        doh.run();
33});
34</script>
35</head>
36<body>
37<div dojoType="dojox.wire.ml.Invocation"
38        triggerTopic="invokeMethod"
39        object="dojox.wire.ml.tests.markup.Invocation"
40        method="invoke"
41        parameters="dojox.wire.ml.tests.markup.Invocation.parameters.a,dojox.wire.ml.tests.markup.Invocation.parameters.b"
42        result="dojox.wire.ml.tests.markup.Invocation.result"></div>
43<div dojoType="dojox.wire.ml.Invocation"
44        triggerTopic="invokeTopic"
45        topic="invokeError"
46        parameters="dojox.wire.ml.tests.markup.Invocation.parameters.c"></div>
47<div dojoType="dojox.wire.ml.Invocation"
48        triggerTopic="invokeError"
49        object="dojox.wire.ml.tests.markup.Invocation"
50        method="invokeError"
51        error="dojox.wire.ml.tests.markup.Invocation.error"></div>
52</body>
53</html>
Note: See TracBrowser for help on using the repository browser.