1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
<!DOCTYPE html>
<html>
<head>
<script src="../../js/resources/js-test-pre.js"></script>
<script src="resources/shadow-dom.js"></script>
</head>
<body>
<p id="description"></p>
<div id="sandbox"></div>
<pre id="console"></pre>
<div id='a'>
<div id='b'>
<div id='c'>
</div>
</div>
</div>
<script>
var b = document.getElementById('b');
b.addEventListener('click', function(event) {
var path = event.path;
debug(dumpNodeList(path));
debug('Makes sure that event.path returns static NodeList.');
path[1] = '';
debug(dumpNodeList(event.path));
});
var clickEvent = document.createEvent("MouseEvents");
clickEvent.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
b.dispatchEvent(clickEvent);
</script>
</body>
</html>
|