summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/dom/shadow/shadow-dom-event-dispatching-details-summary.html
blob: 7f30f644f3d33334ed669655c9ea9a50a9957716 (plain)
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
<!DOCTYPE html>
<html>
<head>
    <script src="../../../resources/js-test.js"></script>
    <script src="resources/shadow-dom.js"></script>
    <script src="resources/event-dispatching.js"></script>
</head>
<body>
    <p id="description"></p>
    <div id="sandbox"></div>
    <pre id="console"></pre>
    <script>
        var sandbox = document.getElementById('sandbox');

        sandbox.appendChild(
            createDOM('div', {'id': 'top'},
                      // 'details/summary' elements use Shadow DOM in its implementation.
                      createDOM('details', {'id': 'details', 'open': true},
                                createDOM('summary', {'id': 'summary'}))));

        addEventListeners(['top', 'details', 'summary']);
        showSandboxTree();

        moveMouse('details', 'summary');
        moveMouse('summary', 'details');
    </script>
</body>
</html>