Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nginx-push-stream-module
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
nginx-push-stream-module
Commits
1228624a
Commit
1228624a
authored
Nov 19, 2014
by
Wandenberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simplify loadFrame function when using ActiveXObject("htmlfile")
parent
d6447198
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
12 deletions
+11
-12
pushstream.js
misc/js/pushstream.js
+11
-12
No files found.
misc/js/pushstream.js
View file @
1228624a
...
...
@@ -657,20 +657,18 @@ Authors: Wandenberg Peixoto <wandenberg@gmail.com>, Rogério Carvalho Schneider
loadFrame
:
function
(
url
)
{
this
.
_clear_iframe
();
try
{
var
ifr
=
null
;
if
(
"
ActiveXObject
"
in
window
)
{
var
transferDoc
=
new
window
.
ActiveXObject
(
"
htmlfile
"
);
transferDoc
.
open
();
transferDoc
.
write
(
"
<html><script>document.domain=
\"
"
+
(
document
.
domain
)
+
"
\"
;</script
></html>
"
);
transferDoc
.
write
(
"
<html><script>document.domain=
'
"
+
document
.
domain
+
"
';</script><body><iframe id='
"
+
this
.
iframeId
+
"
' src='
"
+
url
+
"
'></iframe></body
></html>
"
);
transferDoc
.
parentWindow
.
PushStream
=
PushStream
;
transferDoc
.
close
();
var
ifrDiv
=
transferDoc
.
createElement
(
"
div
"
);
transferDoc
.
appendChild
(
ifrDiv
);
ifrDiv
.
innerHTML
=
"
<iframe src=
\"
"
+
url
+
"
\"
></iframe>
"
;
this
.
connection
=
ifrDiv
.
getElementsByTagName
(
"
IFRAME
"
)[
0
];
this
.
connection
.
onload
=
linker
(
onerrorCallback
,
this
);
ifr
=
transferDoc
.
getElementById
(
this
.
iframeId
);
this
.
transferDoc
=
transferDoc
;
}
catch
(
e
)
{
var
ifr
=
document
.
createElement
(
"
IFRAME
"
);
}
else
{
ifr
=
document
.
createElement
(
"
IFRAME
"
);
ifr
.
style
.
width
=
"
1px
"
;
ifr
.
style
.
height
=
"
1px
"
;
ifr
.
style
.
border
=
"
none
"
;
...
...
@@ -681,10 +679,11 @@ Authors: Wandenberg Peixoto <wandenberg@gmail.com>, Rogério Carvalho Schneider
ifr
.
PushStream
=
PushStream
;
document
.
body
.
appendChild
(
ifr
);
ifr
.
setAttribute
(
"
src
"
,
url
);
ifr
.
onload
=
linker
(
onerrorCallback
,
this
);
this
.
connection
=
ifr
;
ifr
.
setAttribute
(
"
id
"
,
this
.
iframeId
);
}
this
.
connection
.
setAttribute
(
"
id
"
,
this
.
iframeId
);
ifr
.
onload
=
linker
(
onerrorCallback
,
this
);
this
.
connection
=
ifr
;
this
.
frameloadtimer
=
window
.
setTimeout
(
linker
(
onerrorCallback
,
this
),
this
.
pushstream
.
timeout
);
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment