blob: 4c8cd85cbf5483c552047fe9698576f201a30a5f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
test(() => {
const input = document.body.appendChild(document.createElement('input'));
input.focus();
let blurCalled = false;
input.onblur = e => blurCalled = true;
input.remove();
assert_false(blurCalled, "Blur event was not fired");
}, "<input> element does not fire blur event upon DOM removal");
test(() => {
const button = document.body.appendChild(document.createElement('button'));
button.focus();
let blurCalled = false;
button.onblur = e => blurCalled = true;
button.remove();
assert_false(blurCalled, "Blur event was not fired");
}, "<button> element does not fire blur event upon DOM removal");
|