Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /uievents/legacy-domevents-tests/approved/domnodeinserted.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>MutationEvent: DOMNodeInserted Event Type</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id=log></div>
<div id="target" style="display: none"></div>
<script>
var EVENT = "DOMNodeInserted";
var TARGET;
var NODE;
var t = async_test("Test Description: DOMNodeInserted event fires when a node has been added as a child of another node.");
TARGET = document.getElementById("target");
TARGET.addEventListener(EVENT, t.step_func(function(evt)
{
assert_equals(evt.type, EVENT);
t.done();
}), true);
NODE = document.createElement("INPUT");
TARGET.appendChild(NODE);
</script>