mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Added document.activeElement attribute.
This commit is contained in:
parent
82f70c5d50
commit
7da356cd05
6 changed files with 43 additions and 9 deletions
19
tests/content/test_document_activeElement.html
Normal file
19
tests/content/test_document_activeElement.html
Normal 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>
|
Loading…
Add table
Add a link
Reference in a new issue