1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22

content / test / data / accessibility / html / modal-dialog-in-iframe-closed.html [blame]

<!--
-->
<html>
<body>
Test for modal dialog closed in an iframe.
<iframe scrolling="no"></iframe>
<script>
var frameCode =
    '<dialog>Text in the dialog.</dialog>\n' +
    '<button>I am a non-inert button!</button>\n';

var iframeDoc = document.querySelector('iframe').contentDocument;
iframeDoc.open();
iframeDoc.write(frameCode);
iframeDoc.close();

var dialog = iframeDoc.querySelector('dialog');
dialog.showModal();
dialog.close();
</script>
</body>
</html>