Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 1 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /html/semantics/interactive-elements/the-details-element/details-toggle-source-commandfor.tentative.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<link rel=author href="mailto:jarhar@chromium.org">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="../../popovers/resources/toggle-event-source-test.js"></script>
<button id=commandsource commandfor=details command=toggle>command source</button>
<details id=details>
<summary>summary</summary>
details
</details>
<script>
const details = document.getElementById('details');
const commandsource = document.getElementById('commandsource');
createToggleEventSourceTest({
description: 'ToggleEvent.source on <details> elements: command invokers.',
target: details,
openFunc: async () => commandsource.click(),
closeFunc: async () => commandsource.click(),
openSource: commandsource,
closeSource: commandsource,
skipBeforetoggle: true
});
</script>