Revision 105aa9b5f1a2cd3ab4f2d4cbf9db2cd9a0c7bd39 authored by jgraham on 28 March 2018, 19:03:58 UTC, committed by GitHub on 28 March 2018, 19:03:58 UTC
1 parent 167a1d6
Event-dispatch-detached-click.html
<!DOCTYPE html>
<title>Click event on an element not in the document</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id=log></div>
<script>
test(function() {
var EVENT = "click";
var TARGET = document.createElement("somerandomelement");
var t = async_test("Click event can be dispatched to an element that is not in the document.")
TARGET.addEventListener(EVENT, t.step_func(function(evt) {
assert_equals(evt.target, TARGET);
t.done();
}), true);
var e = document.createEvent("Event");
e.initEvent(EVENT, true, true);
TARGET.dispatchEvent(e);
});
</script>
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...