| <!DOCTYPE html> |
| <meta charset="utf-8"> |
| <link rel="author" href="mailto:[email protected]"> |
| <link rel=help href="https://github.com/whatwg/html/pull/10705"> |
| <script src="/resources/testharness.js"></script> |
| <script src="/resources/testharnessreport.js"></script> |
| |
| <script> |
| test(() => { |
| const doc = document.implementation.createHTMLDocument(); |
| const popover = doc.createElement('div'); |
| popover.setAttribute('popover',''); |
| doc.body.appendChild(popover); |
| assert_throws_dom('InvalidStateError',() => popover.showPopover()); |
| assert_false(popover.matches(':popover-open')); |
| },'showPopover should throw when the document isn\'t active'); |
| </script> |