Use pagehide event instead of beforeunload, seems to be more reliable Add a timeout and info message when opening the window fails
12 lines
439 B
HTML
12 lines
439 B
HTML
---
|
|
layout: example.html
|
|
title: External map
|
|
shortdesc: Move a map to a seperate window.
|
|
docs: >
|
|
Move a map to a seperate window.
|
|
tags: "external, window"
|
|
---
|
|
<div id="map" class="map"></div>
|
|
<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>
|