mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
a7ea8a84ac
These tests modify details or summary elements in the 'click' event listener in capturing phase higher up in the DOM tree. MozReview-Commit-ID: Lp5OzXnNgL4 --HG-- extra : rebase_source : 5772a84795b1b8b6b9bb6cbf928bfb612eb07971
30 lines
883 B
HTML
30 lines
883 B
HTML
<!DOCTYPE html>
|
|
<!-- Any copyright is dedicated to the Public Domain.
|
|
- http://creativecommons.org/publicdomain/zero/1.0/ -->
|
|
|
|
<html class="reftest-wait">
|
|
<script>
|
|
function runTest() {
|
|
// Both Chrome and Safari add the 'open' attribute to the details element.
|
|
// Firefox has the same behavior.
|
|
var details = document.getElementById("details");
|
|
var summary = document.getElementById("summary");
|
|
|
|
document.body.addEventListener("click", function () {
|
|
// Change summary to display: none in capturing phase.
|
|
summary.style.display = "none";
|
|
}, true);
|
|
|
|
summary.dispatchEvent(new MouseEvent("click"));
|
|
|
|
document.documentElement.removeAttribute("class");
|
|
}
|
|
</script>
|
|
<body onload="runTest();">
|
|
<details id="details">
|
|
<summary id="summary">Summary</summary>
|
|
<p>This is the details.</p>
|
|
</details>
|
|
</body>
|
|
</html>
|