Page Menu
Home
Code
Search
Configure Global Search
Log In
Files
F886850
iframe.html
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Subscribers
None
iframe.html
View Options
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<
html
>
<
head
>
<
title
>
Testing dojo.io.iframe
</
title
>
<
style
type
=
"text/css"
>
@
import
"../../resources/dojo.css"
;
</
style
>
<
script
type
=
"text/javascript"
src
=
"../../dojo.js"
djConfig
=
"isDebug: true"
></
script
>
<
script
type
=
"text/javascript"
>
dojo
.
require
(
"doh.runner"
);
dojo
.
require
(
"dojo.io.iframe"
);
dojo
.
addOnLoad
(
function
(){
doh
.
register
(
"t"
,
[
function
ioIframeGetText
(
t
){
var
d
=
new
doh
.
Deferred
();
var
td
=
dojo
.
io
.
iframe
.
send
({
url
:
"iframeResponse.text.html"
,
method
:
"GET"
,
timeoutSeconds
:
5
,
preventCache
:
true
,
handle
:
function
(
res
,
ioArgs
){
if
(
!
(
res
instanceof
Error
)
&&
t
.
is
(
"iframe succeeded"
,
res
)){
d
.
callback
(
true
);
}
else
{
d
.
errback
(
false
);
}
}
});
return
d
;
},
function
ioIframeGetJson
(
t
){
var
d
=
new
doh
.
Deferred
();
var
td
=
dojo
.
io
.
iframe
.
send
({
url
:
"iframeResponse.json.html"
,
method
:
"GET"
,
timeoutSeconds
:
5
,
preventCache
:
true
,
handleAs
:
"json"
,
handle
:
function
(
res
,
ioArgs
){
if
(
!
(
res
instanceof
Error
)
&&
t
.
is
(
"blue"
,
res
.
color
)){
d
.
callback
(
true
);
}
else
{
d
.
errback
(
false
);
}
}
});
return
d
;
},
function
ioIframeGetJavascript
(
t
){
var
d
=
new
doh
.
Deferred
();
var
td
=
dojo
.
io
.
iframe
.
send
({
url
:
"iframeResponse.js.html"
,
method
:
"GET"
,
timeoutSeconds
:
5
,
preventCache
:
true
,
handleAs
:
"javascript"
,
handle
:
function
(
res
,
ioArgs
){
console
.
log
(
"RES: "
,
res
);
if
(
!
(
res
instanceof
Error
)
&&
t
.
is
(
42
,
window
.
iframeTestingFunction
())){
d
.
callback
(
true
);
}
else
{
d
.
errback
(
false
);
}
}
});
return
d
;
},
function
ioIframeGetHtml
(
t
){
var
d
=
new
doh
.
Deferred
();
var
td
=
dojo
.
io
.
iframe
.
send
({
url
:
"iframeResponse.html"
,
method
:
"GET"
,
timeoutSeconds
:
5
,
preventCache
:
true
,
handleAs
:
"html"
,
handle
:
function
(
res
,
ioArgs
){
if
(
!
(
res
instanceof
Error
)
&&
t
.
is
(
"SUCCESSFUL HTML response"
,
res
.
getElementsByTagName
(
"h1"
)[
0
].
innerHTML
)){
d
.
callback
(
true
);
}
else
{
d
.
errback
(
false
);
}
}
});
return
d
;
}
]
);
doh
.
run
();
});
/*
dojo.addOnLoad(function(){
var td = dojo.io.iframe.get({
url: "iframeResponse.text.html",
timeoutSeconds: 5,
preventCache: true,
handle: function(res, ioArgs){
if(!(res instanceof Error) &&
"iframe succeeded" == res){
console.debug("OK");
}else{
console.debug("Error", res);
}
}
});
});
*/
</
script
>
</
head
>
<
body
>
</
body
>
</
html
>
File Metadata
Details
Attached
Mime Type
text/html
Expires
Mon, Apr 7, 05:36 (3 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
23490
Default Alt Text
iframe.html (2 KB)
Attached To
rZEDHG ZedLegacy
Event Timeline
Log In to Comment