j1m_app 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.md +21 -0
  3. data/README.md +41 -0
  4. data/_data/modules/default/j1_app-0.0.1/j1_iframe_resizer.yml +270 -0
  5. data/_data/resources/default/j1_app-0.0.1/resource.yml +22 -0
  6. data/assets/themes/j1/iframe_resizer/.npmignore +9 -0
  7. data/assets/themes/j1/iframe_resizer/.travis.yml +6 -0
  8. data/assets/themes/j1/iframe_resizer/CONTRIBUTING.md +86 -0
  9. data/assets/themes/j1/iframe_resizer/Iframe-resizer by davidjbradshaw.url +2 -0
  10. data/assets/themes/j1/iframe_resizer/LICENSE +21 -0
  11. data/assets/themes/j1/iframe_resizer/README.md +608 -0
  12. data/assets/themes/j1/iframe_resizer/bower.json +45 -0
  13. data/assets/themes/j1/iframe_resizer/example/frame.absolute.html +88 -0
  14. data/assets/themes/j1/iframe_resizer/example/frame.content.html +58 -0
  15. data/assets/themes/j1/iframe_resizer/example/frame.hover.html +51 -0
  16. data/assets/themes/j1/iframe_resizer/example/frame.nested.html +72 -0
  17. data/assets/themes/j1/iframe_resizer/example/frame.textarea.html +46 -0
  18. data/assets/themes/j1/iframe_resizer/example/frame.tolerance.html +79 -0
  19. data/assets/themes/j1/iframe_resizer/example/index.html +70 -0
  20. data/assets/themes/j1/iframe_resizer/example/two.html +71 -0
  21. data/assets/themes/j1/iframe_resizer/gruntfile.js +215 -0
  22. data/assets/themes/j1/iframe_resizer/iframeResizer.jquery.json +41 -0
  23. data/assets/themes/j1/iframe_resizer/index.js +4 -0
  24. data/assets/themes/j1/iframe_resizer/js/_client.js +1131 -0
  25. data/assets/themes/j1/iframe_resizer/js/_server.js +1126 -0
  26. data/assets/themes/j1/iframe_resizer/js/ie8.polyfils.js +85 -0
  27. data/assets/themes/j1/iframe_resizer/js/ie8.polyfils.map +1 -0
  28. data/assets/themes/j1/iframe_resizer/js/ie8.polyfils.min.js +4 -0
  29. data/assets/themes/j1/iframe_resizer/js/iframeResizer.contentWindow.js +1104 -0
  30. data/assets/themes/j1/iframe_resizer/js/iframeResizer.contentWindow.map +1 -0
  31. data/assets/themes/j1/iframe_resizer/js/iframeResizer.contentWindow.min.js +10 -0
  32. data/assets/themes/j1/iframe_resizer/js/iframeResizer.js +1007 -0
  33. data/assets/themes/j1/iframe_resizer/js/iframeResizer.js.modified +1004 -0
  34. data/assets/themes/j1/iframe_resizer/js/iframeResizer.map +1 -0
  35. data/assets/themes/j1/iframe_resizer/js/iframeResizer.min.js +9 -0
  36. data/assets/themes/j1/iframe_resizer/js/index.js +2 -0
  37. data/assets/themes/j1/iframe_resizer/karma.conf.js +92 -0
  38. data/assets/themes/j1/iframe_resizer/package.json +111 -0
  39. data/assets/themes/j1/iframe_resizer/spec/_initSpec.js +63 -0
  40. data/assets/themes/j1/iframe_resizer/spec/anchorSpec.js +62 -0
  41. data/assets/themes/j1/iframe_resizer/spec/childSpec.js +403 -0
  42. data/assets/themes/j1/iframe_resizer/spec/closeSpecSpec.js +44 -0
  43. data/assets/themes/j1/iframe_resizer/spec/getPageInfoSpec.js +32 -0
  44. data/assets/themes/j1/iframe_resizer/spec/initCssSpec.js +28 -0
  45. data/assets/themes/j1/iframe_resizer/spec/initDomSpec.js +27 -0
  46. data/assets/themes/j1/iframe_resizer/spec/initDoubleCallSpec.js +33 -0
  47. data/assets/themes/j1/iframe_resizer/spec/initErrorSpec.js +57 -0
  48. data/assets/themes/j1/iframe_resizer/spec/initJQuerySpec.js +29 -0
  49. data/assets/themes/j1/iframe_resizer/spec/initUndefinedDomSpec.js +25 -0
  50. data/assets/themes/j1/iframe_resizer/spec/javascripts/fixtures/iframe.html +2 -0
  51. data/assets/themes/j1/iframe_resizer/spec/javascripts/fixtures/iframe600.html +4 -0
  52. data/assets/themes/j1/iframe_resizer/spec/javascripts/fixtures/iframe600WithId.html +4 -0
  53. data/assets/themes/j1/iframe_resizer/spec/lib/common.js +59 -0
  54. data/assets/themes/j1/iframe_resizer/spec/parentSpec.js +88 -0
  55. data/assets/themes/j1/iframe_resizer/spec/resources/djb.jpg +0 -0
  56. data/assets/themes/j1/iframe_resizer/spec/resources/frame.content.html +176 -0
  57. data/assets/themes/j1/iframe_resizer/spec/resources/frame.lateload.html +33 -0
  58. data/assets/themes/j1/iframe_resizer/spec/resources/frame.nested.html +40 -0
  59. data/assets/themes/j1/iframe_resizer/spec/scrollSpec.js +53 -0
  60. data/assets/themes/j1/iframe_resizer/spec/sendMessageSpec.js +58 -0
  61. data/assets/themes/j1/iframe_resizer/spec/support/jasmine.json +9 -0
  62. data/assets/themes/j1/iframe_resizer/src/ie8.polyfils.js +64 -0
  63. data/assets/themes/j1/iframe_resizer/src/iframeResizer.contentWindow.js +1123 -0
  64. data/assets/themes/j1/iframe_resizer/src/iframeResizer.js +1002 -0
  65. data/assets/themes/j1/iframe_resizer/test-main.js +33 -0
  66. data/assets/themes/j1/iframe_resizer/test/_init.html +44 -0
  67. data/assets/themes/j1/iframe_resizer/test/_init_once.html +45 -0
  68. data/assets/themes/j1/iframe_resizer/test/_init_once_async.html +72 -0
  69. data/assets/themes/j1/iframe_resizer/test/background.html +47 -0
  70. data/assets/themes/j1/iframe_resizer/test/changePage.html +50 -0
  71. data/assets/themes/j1/iframe_resizer/test/close.html +44 -0
  72. data/assets/themes/j1/iframe_resizer/test/getId.html +44 -0
  73. data/assets/themes/j1/iframe_resizer/test/interval.html +56 -0
  74. data/assets/themes/j1/iframe_resizer/test/jqueryNoConflict.html +47 -0
  75. data/assets/themes/j1/iframe_resizer/test/lateImageLoad.html +90 -0
  76. data/assets/themes/j1/iframe_resizer/test/margin.html +73 -0
  77. data/assets/themes/j1/iframe_resizer/test/mutationObserver.html +63 -0
  78. data/assets/themes/j1/iframe_resizer/test/nested.html +46 -0
  79. data/assets/themes/j1/iframe_resizer/test/resize.contentWidth.html +51 -0
  80. data/assets/themes/j1/iframe_resizer/test/resize.width.html +63 -0
  81. data/assets/themes/j1/iframe_resizer/test/resources/djb.jpg +0 -0
  82. data/assets/themes/j1/iframe_resizer/test/resources/frame.content.html +191 -0
  83. data/assets/themes/j1/iframe_resizer/test/resources/frame.lateload.html +33 -0
  84. data/assets/themes/j1/iframe_resizer/test/resources/frame.nested.html +40 -0
  85. data/assets/themes/j1/iframe_resizer/test/resources/jquery.js +6 -0
  86. data/assets/themes/j1/iframe_resizer/test/resources/qunit.css +244 -0
  87. data/assets/themes/j1/iframe_resizer/test/resources/qunit.js +2212 -0
  88. data/assets/themes/j1/iframe_resizer/test/resources/require.js +2103 -0
  89. data/assets/themes/j1/iframe_resizer/test/resources/testLib.js +9 -0
  90. data/assets/themes/j1/iframe_resizer/test/scrolling.html +65 -0
  91. data/assets/themes/j1/iframe_resizer/test/sendMessage.html +61 -0
  92. data/assets/themes/j1/iframe_resizer/test/setHeightCalculationMethod.html +51 -0
  93. data/assets/themes/j1/iframe_resizer/test/size.html +64 -0
  94. data/assets/themes/j1/iframe_resizer/test/v1.html +189 -0
  95. data/exe/console +14 -0
  96. data/exe/setup +8 -0
  97. data/lib/j1m_app.rb +5 -0
  98. data/lib/j1m_app/version.rb +3 -0
  99. metadata +187 -0
@@ -0,0 +1,45 @@
1
+ {
2
+ "name": "iframe-resizer",
3
+ "version": "3.5.5",
4
+ "homepage": "https://github.com/davidjbradshaw/iframe-resizer",
5
+ "authors": [
6
+ "David J. Bradshaw <dave@bradshaw.net>"
7
+ ],
8
+ "description": "Responsively keep same and cross domain iFrames sized to their content with support for window/content resizing, multiple and nested iFrames. (Dependacy free and works with IE8+)",
9
+ "main": [
10
+ "js/iframeResizer.js",
11
+ "js/iframeResizer.contentWindow.js"
12
+ ],
13
+ "keywords": [
14
+ "CrossDomain",
15
+ "Cross-Domain",
16
+ "iFrame",
17
+ "Resizing",
18
+ "Resizer",
19
+ "postMessage",
20
+ "content",
21
+ "resize",
22
+ "height",
23
+ "autoheight",
24
+ "auto-height",
25
+ "iframe-auto-height",
26
+ "height-iframe",
27
+ "heightiframe",
28
+ "width",
29
+ "mutationObserver",
30
+ "RWD",
31
+ "responsive",
32
+ "responsiveiframes",
33
+ "responsive-iframes"
34
+ ],
35
+ "license": "MIT",
36
+ "ignore": [
37
+ "example",
38
+ "test",
39
+ "gruntfile.js",
40
+ "*.md",
41
+ "*.json"
42
+ ],
43
+ "dependencies": {},
44
+ "devDependencies": {}
45
+ }
@@ -0,0 +1,88 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>iFrame message passing test</title>
6
+ <meta name="description" content="iFrame message passing test">
7
+ <meta name="viewport" content="width=device-width">
8
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
9
+ <style>
10
+ a.back { float:right; margin-left:8px;}
11
+ body {border:solid 1px red;}
12
+ p{padding:5px 212px 5px 5px;margin:0 0 5px;}
13
+ #abs{
14
+ position: absolute;
15
+ top:0;
16
+ right:0;
17
+ width: 200px;
18
+ height: 600px;
19
+ background-color: wheat;
20
+ }
21
+ a.top{
22
+ position: absolute;
23
+ bottom:0;
24
+ right:0;
25
+ margin:5px;
26
+ }
27
+ </style>
28
+ </head>
29
+ <body>
30
+
31
+ <p>
32
+ <b>iFrame</b>
33
+
34
+ <a href="frame.content.html" class="back">Back to page 1</a>
35
+ &nbsp;
36
+ <a href="#"" class="back" onclick="if ('parentIFrame' in window) window.parentIFrame.scrollTo(0,99999);return false;">Bottom</a>
37
+ &nbsp;
38
+ <a href="#"" class="back" onclick="if ('parentIFrame' in window) window.parentIFrame.scrollToOffset(0,0);return false;">Scroll to iFrame</a>
39
+ &nbsp;
40
+ <a href="#test" class="back" >Jump to iFrame anchor</a>
41
+ <a href="#anchorParentTest" class="back" >Jump to parent anchor</a>
42
+ </p>
43
+ <p>
44
+ This page has an absolute position elemnt that take it out side the normal document body, which is marked with a red border on this page. This prevents the normal height calculation, which is based on the body tag from returning the correct height. To work around this you can set the <b>heightCalculationMethod</b> option to use one of the other page height propeties.
45
+ </p>
46
+ <p>
47
+ Use the dropdown to change the sizing method of the page, select the different sizing options to see how the effect the page. Note that they can have different effects in different browsers, so you are normally best off selecting <b>max</b> if you need to change away from the default <b>bodyOffset</b> option.
48
+ </p>
49
+ <p data-iframe-height>
50
+ <b>Height Calculation Method</b>
51
+ <select name="heightCalculationMethod">
52
+ <option>bodyOffset</option>
53
+ <option>bodyScroll</option>
54
+ <option>documentElementOffset</option>
55
+ <option>documentElementScroll</option>
56
+ <option>max</option>
57
+ <option>min</option>
58
+ <option>grow</option>
59
+ <option>lowestElement</option>
60
+ <option>taggedElement</option>
61
+ </select>
62
+ </p>
63
+ <p>
64
+ <i>This option should be used sparingly, as the alternate methods can be less acurate at working out the correct page size, can cause screen flicker and can sometimes fail to reduce in size when the frame content changes in browsers that do not support mutationObservers (See <a href="http://caniuse.com/mutationobserver">caniuse.com</a> for details).</i>
65
+ </p>
66
+ <a name="test">Test in page anchor</a>
67
+
68
+ <div id="abs">
69
+ Absolute positioned element
70
+ <a href='#' class="top" onclick="if ('parentIFrame' in window) window.parentIFrame.scrollTo(0,0);return false;">Top</a>
71
+ </div>
72
+
73
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
74
+ <script type="text/javascript" src="../js/ie8.polyfils.min.js"></script>
75
+ <script type="text/javascript" src="../js/iframeResizer.contentWindow.min.js"></script>
76
+ <script>
77
+
78
+ $('select').on('change',function(){
79
+ if ('parentIFrame' in window){
80
+ parentIFrame.setHeightCalculationMethod($(this).val());
81
+ parentIFrame.size();
82
+ }
83
+ });
84
+
85
+ </script>
86
+
87
+ </body>
88
+ </html>
@@ -0,0 +1,58 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>iFrame message passing test</title>
6
+ <meta name="description" content="iFrame message passing test">
7
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
8
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
9
+ <style>
10
+ *, *:before, *:after {box-model: border-box;}
11
+ a { float:right; margin-left:10px;}
12
+ </style>
13
+ </head>
14
+ <body>
15
+
16
+ <b>iFrame</b>
17
+ <a href='#' onclick="$('p:eq(0)').toggle();return false;">Toggle content</a>
18
+ &nbsp;
19
+ <a href='#' onclick="if ('parentIFrame' in window) window.parentIFrame.size(250);return false;">Size(250)</a>
20
+ &nbsp;
21
+ <a id="nested" href="frame.nested.html">Nested</a>
22
+ &nbsp;
23
+ <a href="frame.hover.html">:Hover</a>
24
+ &nbsp;
25
+ <a href="frame.textarea.html">TextArea</a>
26
+ &nbsp;
27
+ <a href="frame.absolute.html">Absolute Position</a>
28
+ &nbsp;
29
+ <a href='#' onclick="if ('parentIFrame' in window) window.parentIFrame.sendMessage('Hello from the iFrame');return false;">Send Message</a>
30
+ &nbsp;
31
+ <a href='#' onclick="if ('parentIFrame' in window) window.parentIFrame.close();return false;">Close</a>
32
+
33
+ <p>
34
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
35
+ </p>
36
+ <p>
37
+ But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain some advantage from it? But who has any right to find fault with a man who chooses to enjoy a pleasure that has no annoying consequences, or one who avoids a pain that produces no resultant pleasure?
38
+ </p>
39
+ <p>
40
+ On the other hand, we denounce with righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain. These cases are perfectly simple and easy to distinguish. In a free hour, when our power of choice is untrammelled and when nothing prevents our being able to do what we like best, every pleasure is to be welcomed and every pain avoided. But in certain circumstances and owing to the claims of duty or the obligations of business it will frequently occur that pleasures have to be repudiated and annoyances accepted. The wise man therefore always holds in these matters to this principle of selection: he rejects pleasures to secure other greater pleasures, or else he endures pains to avoid worse pains.
41
+ </p>
42
+
43
+ <script>
44
+ var level = document.location.search.replace(/\?/,'') || 0;
45
+ $('#nested').attr('href','frame.nested.html?'+(++level));
46
+ </script>
47
+
48
+ <script>
49
+ var iFrameResizer = {
50
+ messageCallback: function(message){
51
+ alert(message,parentIFrame.getId());
52
+ }
53
+ }
54
+ </script>
55
+
56
+ <script type="text/javascript" src="../js/iframeResizer.contentWindow.min.js" defer></script>
57
+ </body>
58
+ </html>
@@ -0,0 +1,51 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>iFrame message passing test</title>
6
+ <meta name="description" content="iFrame message passing test">
7
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
8
+ <style>
9
+ a { float:right; margin-left:10px;}
10
+ </style>
11
+ </head>
12
+ <body>
13
+
14
+ <b>iFrame :Hover Example</b>
15
+ <a href="frame.content.html">Back to page 1</a>
16
+
17
+ <p>
18
+ Mouse over the code example below.
19
+ </p>
20
+
21
+ <xmp><!-- #code --></xmp>
22
+
23
+ <script>
24
+ var iFrameResizer = {
25
+ heightCalculationMethod:'lowestElement'
26
+ }
27
+ </script>
28
+
29
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
30
+ <script type="text/javascript" src="../js/iframeResizer.contentWindow.min.js"></script>
31
+
32
+ <div id="code">
33
+ <style>
34
+ xmp{background-color: #eee;padding: 20px;display:block;}
35
+ xmp:hover{border:#c33 solid 40px;}
36
+ </style>
37
+ <script>
38
+ (function(){
39
+ $('xmp').hover(function(){
40
+ if ('parentIFrame' in window) {
41
+ // Fix race condition in FireFox with setTimeout
42
+ setTimeout(parentIFrame.size.bind(parentIFrame),0);
43
+ }
44
+ });
45
+ })();
46
+ </script>
47
+ </div>
48
+
49
+ <script>$('xmp').text('<xmp>'+$('#code').html()+'<xmp>');</script>
50
+ </body>
51
+ </html>
@@ -0,0 +1,72 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>iFrame message passing test</title>
6
+ <meta name="description" content="iFrame message passing test">
7
+ <meta name="viewport" content="width=device-width">
8
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
9
+ <style>
10
+ *, *:before, *:after {box-model: border-box;}
11
+ a { float:right; margin-left:10px;}
12
+
13
+ h2 {margin-top: 0;}
14
+ body{margin:8px !important}
15
+ </style>
16
+ </head>
17
+ <body>
18
+ <a href="frame.content.html">Back to page 1</a>
19
+ <h2>Nested iFrame</h2>
20
+ <p>Resize window or click one of the links in the nested iFrame to watch it resize.</p>
21
+ <div style="margin:20px;">
22
+ <iframe id="nestedIFrame" src="frame.content.html" width="100%" scrolling="no"></iframe>
23
+ </div>
24
+ <p id="callback">
25
+ </p>
26
+
27
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
28
+ <script type="text/javascript" src="../js/ie8.polyfils.min.js"></script>
29
+ <script type="text/javascript" src="../js/iframeResizer.min.js"></script>
30
+ <script type="text/javascript">
31
+
32
+ var level = document.location.search.replace(/\?/,'') || 0;
33
+
34
+ $('iframe').attr('id','nestedIFrame'+level).attr('src','frame.content.html?'+level);
35
+
36
+ /*
37
+ * If you do not understand what the code below does, then please just use the
38
+ * following call in your own code.
39
+ *
40
+ * iFrameResize({log:true});
41
+ *
42
+ * Once you have it working, set the log option to false.
43
+ */
44
+
45
+ iFrameResize({
46
+ log : true, // Enable console logging
47
+ inPageLinks : true,
48
+ resizedCallback : function(messageData){ // Callback fn when message is received
49
+ $('p#callback').html(
50
+ '<b>Frame ID:</b> ' + messageData.iframe.id +
51
+ ' <b>Height:</b> ' + messageData.height +
52
+ ' <b>Width:</b> ' + messageData.width +
53
+ ' <b>Event type:</b> ' + messageData.type
54
+ );
55
+ },
56
+ messageCallback : function(messageData){ // Callback fn when message is received
57
+ parentIFrame.sendMessage(messageData.message + ' (via ' + $('iframe').attr('id') + ')');
58
+ },
59
+ closedCallback : function(id){ /// Callback fn when iFrame is closed
60
+ $('p#callback').html(
61
+ '<b>IFrame (</b>' + id +
62
+ '<b>) removed from page.</b>'
63
+ );
64
+ }
65
+ });
66
+
67
+
68
+ </script>
69
+ <script type="text/javascript" src="../js/iframeResizer.contentWindow.min.js"></script>
70
+
71
+ </body>
72
+ </html>
@@ -0,0 +1,46 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>iFrame message passing test</title>
6
+ <meta name="description" content="iFrame message passing test">
7
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
8
+ <style>
9
+ a { float:right; margin-left:10px;}
10
+ </style>
11
+ </head>
12
+ <body>
13
+
14
+ <b>iFrame TextArea Example</b>
15
+ <a href="frame.content.html">Back to page 1</a>
16
+ </a>
17
+
18
+ <p>
19
+ Resize the textarea below.
20
+ </p>
21
+
22
+ <textarea id="textArea">Resize me</textarea>
23
+
24
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
25
+ <script src="../js/iframeResizer.contentWindow.min.js"></script>
26
+
27
+ <script>
28
+
29
+
30
+ function store(){
31
+ this.x = this.offsetWidth;
32
+ this.y = this.offsetHeight;
33
+ }
34
+
35
+ $('textarea').each(store).on('mouseover mouseout',function(){
36
+ if (this.offsetWidth !== this.x || this.offsetHeight !== this.y){
37
+ if ('parentIFrame' in window) parentIFrame.size();
38
+ store.call(this);
39
+ }
40
+ });
41
+
42
+
43
+ </script>
44
+
45
+ </body>
46
+ </html>
@@ -0,0 +1,79 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>iFrame message passing test</title>
6
+ <meta name="description" content="iFrame message passing test">
7
+ <style>
8
+ a.back { float:right; margin-left:8px;}
9
+ body {border:solid 1px red;}
10
+ p{padding:5px 212px 5px 5px;margin:0 0 5px;}
11
+ #abs{
12
+ position: absolute;
13
+ top:0;
14
+ bottom:-10;px
15
+ right:0;
16
+ width: 200px;
17
+ height: 101%;
18
+ background-color: wheat;
19
+ }
20
+ a.top{
21
+ position: absolute;
22
+ bottom:-10px;
23
+ right:0;
24
+ margin:5px;
25
+ }
26
+ </style>
27
+ </head>
28
+ <body>
29
+
30
+ <p>
31
+ <b>iFrame</b>
32
+
33
+ <a href="frame.content.html" class="back">Back to page 1</a>
34
+ &nbsp;
35
+ <a href='#' class="back" onclick="if ('parentIFrame' in window) window.parentIFrame.scrollTo(0,99999999);return false;">Bottom</a>
36
+ </p>
37
+ <p>
38
+ This page has an absolute position elemnt that take it out side the normal document body, which is marked with a red border on this page. This prevents the normal height calculation, which is based on the body tag from returning the correct height. To work around this you can set the <b>heightCalculationMethod</b> option to use one of the other page height propeties.
39
+ </p>
40
+ <p>
41
+ Use the dropdown to change the sizing method of the page, select the different sizing options to see how the effect the page. Note that they can have different effects in different browsers, so you are normally best off selecting <b>max</b> if you need to change away from the default <b>bodyOffset</b> option.
42
+ </p>
43
+ <p>
44
+ <b>Height Calculation Method</b>
45
+ <select name="heightCalculationMethod">
46
+ <option>bodyOffset</option>
47
+ <option>bodyScroll</option>
48
+ <option>documentElementOffset</option>
49
+ <option>documentElementScroll</option>
50
+ <option>max</option>
51
+ <option>min</option>
52
+ <option>grow</option>
53
+ <option>lowestElement</option>
54
+ </select>
55
+ </p>
56
+ <p>
57
+ <i>This option should be used sparingly, as the alternate methods can be less acurate at working out the correct page size, can cause screen flicker and can sometimes fail to reduce in size when the frame content changes in browsers that do not support mutationObservers (See <a href="http://caniuse.com/mutationobserver">caniuse.com</a> for details).</i>
58
+ </p>
59
+
60
+ <div id="abs">
61
+ Absolute positioned element
62
+ <a href='#' class="top" onclick="if ('parentIFrame' in window) window.parentIFrame.scrollTo(0,0);return false;">Top</a>
63
+ </div>
64
+
65
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
66
+ <script type="text/javascript" src="../js/iframeResizer.contentWindow.min.js"></script>
67
+ <script>
68
+
69
+ $('select').on('change',function(){
70
+ if ('parentIFrame' in window){
71
+ parentIFrame.setHeightCalculationMethod($(this).val());
72
+ parentIFrame.size();
73
+ }
74
+ });
75
+
76
+ </script>
77
+
78
+ </body>
79
+ </html>