Improve window open and close handling
Use pagehide event instead of beforeunload, seems to be more reliable Add a timeout and info message when opening the window fails
This commit is contained in:
@@ -13,10 +13,6 @@
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript">
|
||||
if ((window.performance.navigation && window.performance.navigation.type === 1) || window.performance.getEntriesByType('navigation').map((nav) => nav.type).includes('reload'))
|
||||
window.close();
|
||||
</script>
|
||||
<div id="map" class="map" tabindex="0"></div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user