mirror of
https://github.com/Feodor2/Mypal68.git
synced 2025-06-19 07:15:36 -04:00
23 lines
634 B
HTML
23 lines
634 B
HTML
<!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>
|