23 lines
795 B
HTML
23 lines
795 B
HTML
<html>
|
|
<head>
|
|
<script>
|
|
function test()
|
|
{
|
|
if (window.testRunner)
|
|
testRunner.dumpAsText();
|
|
document.getElementById("putElementHere").innerHTML = "<input type='text' name='testElement' value='test element contents'>";
|
|
document.testForm.testElement.focus();
|
|
document.getElementById("result").innerText = "Form element was found.";
|
|
}
|
|
</script>
|
|
</head>
|
|
<body onload="test()">
|
|
<p>This is a regression test for <a href="https://bugs.webkit.org/show_bug.cgi?id=3481">bug 3481</a>.
|
|
The problem is that form elements added via innerHTML were not accessible with the form.elementName syntax.</p>
|
|
<p>If the test succeeds, there will be a line below that says "form element was found".</p>
|
|
<hr>
|
|
<form name="testForm"><p id="putElementHere"></p></form>
|
|
<hr>
|
|
<p id="result"></p>
|
|
</html>
|