blob: 44ac3196a06bd40371b96b594713ead05e8522a8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
<!DOCTYPE html>
<html>
<head>
<title>Test for window.open() when browser is in fullscreen</title>
</head>
<body>
<script>
window.addEventListener("load", function() {
document.getElementById("test").addEventListener("click", onClick, true);
}, {capture: true, once: 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>
|