2016-09-02 07:41:48 +02:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
|
|
|
|
<head>
|
|
|
|
<script type="text/javascript">
|
2016-09-05 14:34:52 +02:00
|
|
|
var my_window;
|
|
|
|
|
2016-09-02 07:41:48 +02:00
|
|
|
function open_modal() {
|
|
|
|
if (window.showModalDialog) {
|
|
|
|
window.showModalDialog();
|
|
|
|
} else {
|
2016-09-05 14:34:52 +02:00
|
|
|
window.open('about:blank', 'window', 'modal');
|
2016-09-02 07:41:48 +02:00
|
|
|
}
|
|
|
|
}
|
2016-09-05 14:34:52 +02:00
|
|
|
|
|
|
|
function open_normal() {
|
|
|
|
my_window = window.open('about:blank', 'my_window');
|
|
|
|
}
|
|
|
|
|
2016-09-05 14:56:02 +02:00
|
|
|
function open_invalid() {
|
|
|
|
window.open('', 'my_window');
|
|
|
|
}
|
|
|
|
|
2016-09-05 14:34:52 +02:00
|
|
|
function close() {
|
|
|
|
my_window.close();
|
|
|
|
}
|
2016-09-05 14:41:05 +02:00
|
|
|
|
|
|
|
function close_twice() {
|
|
|
|
my_window.close();
|
|
|
|
my_window.close();
|
|
|
|
}
|
2016-09-02 07:41:48 +02:00
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
|
2016-09-05 14:34:52 +02:00
|
|
|
<button onclick="open_normal()" id="open-normal">normal</button>
|
2016-09-02 07:41:48 +02:00
|
|
|
<button onclick="open_modal()" id="open-modal">modal</button>
|
2016-09-05 14:56:02 +02:00
|
|
|
<button onclick="open_invalid()" id="open-invalid">invalid/no URL</button>
|
2016-09-05 14:34:52 +02:00
|
|
|
<button onclick="close()" id="close-normal">close</button>
|
|
|
|
<button onclick="close_twice()" id="close-twice">close twice (issue 906)</button>
|
2016-09-02 07:41:48 +02:00
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|