Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormattab <matthieu.aubry@gmail.com>2016-07-15 06:59:37 +0300
committermattab <matthieu.aubry@gmail.com>2016-07-15 06:59:37 +0300
commitfc50d2b80810f2c34e2b58ef41ad970e3c5b261d (patch)
treeefd634a9c14e1014845ceaa0b0d231a13c248c7f /tests/javascript/index.php
parent2e6eea55eb54f57386a18e389ae23a5d6bf86b8c (diff)
Fix for IE9: wait for window.onload
Diffstat (limited to 'tests/javascript/index.php')
-rw-r--r--tests/javascript/index.php18
1 files changed, 10 insertions, 8 deletions
diff --git a/tests/javascript/index.php b/tests/javascript/index.php
index afd155c578..eea3ffac96 100644
--- a/tests/javascript/index.php
+++ b/tests/javascript/index.php
@@ -3101,20 +3101,22 @@ function PiwikTest() {
var hostAndPath = $(location).attr('pathname');
var iframe = document.createElement('iframe');
iframe.id = "iframeTesting";
- iframe.style= "display : none";
+ iframe.style = "display : none";
var html = '\
<html><body> \
<scr' + 'ipt src="' + hostAndPath + '../../js/piwik.js?rand=<?php echo $cacheBuster; ?>" type="text/javascript"></sc' + 'ript> \
<scr' + 'ipt src="' + hostAndPath + 'piwiktest.js" type="text/javascript"></sc' + 'ript> \
<scr' + 'ipt src="' + hostAndPath + '../../libs/bower_components/jquery/dist/jquery.min.js" type="text/javascript"></sc' + 'ript> \
<scr' + 'ipt type="text/javascript"> \
- $(document).ready(function() { \
- window.iframeIsLoaded = true; \
- window.isInsideIframe = function () { \
- var tracker = Piwik.getTracker(); \
- return tracker.hook.test._isInsideAnIframe(); \
- }; \
- }); \
+ window.onload = function() { \
+ $(document).ready(function () { \
+ window.iframeIsLoaded = true; \
+ window.isInsideIframe = function () { \
+ var tracker = Piwik.getTracker(); \
+ return tracker.hook.test._isInsideAnIframe(); \
+ }; \
+ });\
+ }; \
window.iframeIsLoaded = false; \
\
</sc' + 'ript> \