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:
@@ -1,11 +1,11 @@
|
||||
---
|
||||
layout: example.html
|
||||
title: External map
|
||||
shortdesc: Show a map in a separate window.
|
||||
shortdesc: Move a map to a seperate window.
|
||||
docs: >
|
||||
|
||||
Move a map to a seperate window.
|
||||
tags: "external, window"
|
||||
resources:
|
||||
---
|
||||
<div id="map" class="map"></div>
|
||||
<input id="extMap" type="button" value="Open external map"></input>
|
||||
<input id="external-map-button" type="button" value="Open external map"></input>
|
||||
<span id="blocker-notice" hidden>Could not open map in external window. If you are using an popup or ad blocker you may need to disable it for this example.</span>
|
||||
|
||||
Reference in New Issue
Block a user