/[suikacvs]/www/test/html/iframe/remove-create-1.html
Suika

Contents of /www/test/html/iframe/remove-create-1.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download) (as text)
Sun Oct 18 08:14:37 2009 UTC (15 years, 8 months ago) by wakaba
Branch: MAIN
CVS Tags: HEAD
File MIME type: text/html
emphasizes that it is about meter, not progress :)

1 <!DOCTYPE HTML>
2 <title>iframe</title>
3
4 <body>
5
6 <p id=result class=FAIL>FAIL (noscript)</p>
7
8 <p class=note>This test first creates an <code>iframe</code> element,
9 inserts the element into the document, and removes the element. Then,
10 it creates another <code>iframe</code> element, inserts the element
11 into the document. The browsing context of the second
12 <code>iframe</code> element should not be affected by the first
13 element's browsing context.</p>
14
15 <script>
16 var result = document.getElementById ('result');
17 result.firstChild.data = 'FAIL (script)';
18
19 var iframe = document.createElement ('iframe');
20 iframe.onload = function () {
21 document.body.removeChild (iframe);
22 var iframe2 = document.createElement ('iframe');
23 iframe2.onload = function () {
24 var fragment = iframe2.contentWindow.document.getElementById ('fragment');
25 var value = fragment.innerHTML;
26 if (value == '#test2') {
27 result.firstChild.data = 'PASS';
28 result.className = 'PASS';
29 } else if (value == '#test1') {
30 result.firstChild.data = 'FAIL (old fragment identifier)';
31 } else {
32 result.firstChild.data = 'FAIL (' + value + ')';
33 }
34 document.body.removeChild (iframe2);
35 };
36 iframe2.src = 'remove-create-inner-1.html#test2';
37 document.body.appendChild (iframe2);
38 };
39 iframe.src = 'remove-create-inner-1.html#test1';
40 document.body.appendChild (iframe);
41 </script>

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24