source: Dev/trunk/src/client/dojox/io/tests/scriptFrameRepeat.html @ 483

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

Added Dojo 1.9.3 release.

File size: 1.3 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2        "http://www.w3.org/TR/html4/strict.dtd">
3<html>
4        <head>
5                <title>Testing repeat dojox.io.scriptFrame calls</title>
6                <style type="text/css">
7                        @import "../../../dojo/resources/dojo.css";
8                </style>
9                <script type="text/javascript"
10                        src="../../../dojo/dojo.js" data-dojo-config="isDebug: true"></script>
11                <script type="text/javascript">
12                        require(['dojo/io/script', 'dojox/io/scriptFrame'], function(script, scriptFrame){
13                                function repeatCall(){
14                                        var td = script.get({
15                                                //Note that this URL path is relative to the URL of the iframe document
16                                                //(dojo.moduleUrl("dojo.resources", "blank.html")
17                                                url: "../tests/io/scriptJsonp.js",
18                                                content: { foo: "bar" },
19                                                callbackParamName: "callback",
20                                                frameDoc: "testFrame",
21                                                timeout: 3000
22                                        });
23                                        td.addBoth(function(res){
24                                                if(!(res instanceof Error) && "mammal" == res.animalType){
25                                                        console.log("success");
26                                                }else{
27                                                        console.error(res);
28                                                }
29                                                return res;
30                                        });
31                                };
32
33                                setInterval(repeatCall, 2000);
34                        });
35                </script>
36        </head>
37        <body>
38                <p>This page tests repeat usage of dojo.io.script.get() with the dojox.io.scriptFrame extensions.</p>
39                <p>Inspect the iframe created by dojox.io.scriptFrame to see if it is performing correctly.</p>
40        </body>
41</html>
Note: See TracBrowser for help on using the repository browser.