blob: 1584f4c98d52d3033382f6f4ff466069dc5f2553 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
<!DOCTYPE html>
<html>
<head>
<title>Test for window.open() when browser is in fullscreen</title>
</head>
<body>
<script>
window.addEventListener("load", function onLoad() {
window.removeEventListener("load", onLoad, true);
document.getElementById("test").addEventListener("click", onClick, true);
}, true);
function onClick(aEvent) {
aEvent.preventDefault();
var dataStr = aEvent.target.getAttribute("data-test-param");
var data = JSON.parse(dataStr);
window.open(data.uri, data.title, data.option);
}
</script>
<a id="test" href="" data-test-param="">Test</a>
</body>
</html>
|