blob: 11670be4a4063e12c2789efb7a1f10a716d0d937 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
<!DOCTYPE html>
<html>
<head>
<script src="../../../resources/js-test.js"></script>
<script>
function runTest() {
var target = document.getElementById('target');
debug('Calling target.focus()');
target.addEventListener('focus', function(e) {
debug('focus received by ' + target);
});
target.focus();
shouldBe('document.activeElement', 'target');
}
</script>
</head>
<body onload="runTest()">
<label id="target" contenteditable>I'm editable.</label>
<button id="button">Just a button</button>
</body>
</html>
|