Skip to content

Commit da5c9c0

Browse files
Fixed compatibility issues and added a workaround for Flash bug
1 parent a8f754a commit da5c9c0

File tree

3 files changed

+27
-11
lines changed

3 files changed

+27
-11
lines changed

FlashHTTPRequest.swf

21 Bytes
Binary file not shown.

flashhttprequest.js

Lines changed: 22 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.html

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@
44
<meta charset="utf-8"/>
55
<script src="flashhttprequest.js"></script>
66
<script>
7-
// Ensure all FlashHTTPRequests are done via window.onload as we need to hook the Flash object
8-
window.onload = function() {
9-
FlashHTTPRequest.open('GET', 'http://example.com/', '', 'alert' );
10-
FlashHTTPRequest.open('POST', 'http://example2.com/POST/', 'test=test&var2=test', 'alert' );
11-
}
7+
// This function will be called when the Flash bridge has been loaded
8+
function onhook() {
9+
FlashHTTPRequest.open('GET', 'http://www.example.com/', '', 'alert' );
10+
}
1211
</script>
1312
</head>
1413
<body>
1514
<div id="flashBridge"></div>
1615
</body>
17-
</html>
16+
</html>

0 commit comments

Comments
 (0)