3 <meta http-equiv='Content-Type' content='text/html; charset=utf-
8'
>
6 <p>Test that a programmatically created empty iframe inherits charset from the parent.
8 <script type=
"text/javascript">
10 testRunner
.dumpAsText();
12 function createEmptyIframe() {
13 if (!document
.getElementById('containerName')) {
14 var iframe
= document
.createElement('IFRAME');
15 iframe
.setAttribute("id", 'containerName');
16 iframe
.setAttribute("name", 'containerName');
17 iframe
.setAttribute("src", "");
18 iframe
.style
.width
= '500px';
19 iframe
.style
.height
= '100px';
20 document
.body
.appendChild( iframe
);
26 var iframeCharset
= document
.getElementById('containerName').contentDocument
.characterSet
;
27 document
.getElementById("result").innerHTML
=
28 iframeCharset
== "UTF-8" ? "<p>SUCCESS</p>" : "<p>FAILURE: " + iframeCharset
+ "</p>";