Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /html/webappapis/user-prompts/cannot-show-simple-dialogs/prompt-different-origin-frame.sub.html - WPT Dashboard Interop Dashboard
<html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
setup({ single_test: true });
function handleEvent(e) {
assert_equals(e.data, 'pass');
done();
}
function on_iframe_load() {
var frameWin = document.getElementById('promptFrame').contentWindow;
frameWin.postMessage('Prompt', '*');
}
window.addEventListener('message', handleEvent);
</script>
<body>
<iframe id='promptFrame'
onload='on_iframe_load()'></iframe>
</body>
</html>