summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/editing/activation/click.html
blob: edbc477db6750947c612fa59bbd3e1fcd4bf3a9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<!doctype html>
<meta charset=utf-8>
<title>HTMLElement#click</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<div id=log></div>
<script>
test(function() {
  var element = document.createElement("div");
  var received = false;
  element.addEventListener("click", this.step_func(function(e) {
    received = true;
    assert_false(e.isTrusted, "Event should not be trusted")
  }));
  element.click();
  assert_true(received, "click event should have been dispatched synchronously");
})
</script>