Added document.activeElement attribute.

This commit is contained in:
Maciej Skrzypkowski 2015-03-19 23:00:13 +01:00
parent 82f70c5d50
commit 7da356cd05
6 changed files with 43 additions and 9 deletions

View file

@ -0,0 +1,19 @@
<!doctype html>
<html>
<head >
<title></title>
<script src="harness.js"></script>
</head>
<body>
<input id="foo" type="text"></input>
<script>
is_not(document.activeElement, null, "test_1.1, document.activeElement");
is(document.activeElement, document.body, "test_1.2, document.activeElement");
//TODO: uncomment following lines when focus() method will be available
//document.getElementById('foo').focus();
is_not(document.activeElement, null, "test_2.1, document.activeElement");
//is(document.activeElement, document.getElementById("foo"), "test_2.2, document.activeElement");
</script>
</body>
</html>

View file

@ -30,9 +30,6 @@
[Document interface: operation writeln(DOMString)]
expected: FAIL
[Document interface: attribute activeElement]
expected: FAIL
[Document interface: operation hasFocus()]
expected: FAIL
@ -1125,9 +1122,6 @@
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "defaultView" with the proper type (59)]
expected: FAIL
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "activeElement" with the proper type (60)]
expected: FAIL
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "hasFocus" with the proper type (61)]
expected: FAIL

View file

@ -1,8 +1,5 @@
[disabledElement.html]
type: testharness
[The body element must be the active element if no element is focused]
expected: FAIL
[A disabled <button> should not be focusable]
expected: FAIL