Leaflet/debug/tests/text-selection.html
Jon Koops 7ac98758d4
Drop UMD and make ESM the default entrypoint (#8826)
Signed-off-by: Jon Koops <jonkoops@gmail.com>
Co-authored-by: Florian Bischof <design.falke@gmail.com>
2025-03-17 15:59:00 +01:00

32 lines
998 B
HTML

<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>Leaflet debug page - Text Selection</title>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0" />
<link rel="stylesheet" href="../../dist/leaflet.css" />
<link rel="stylesheet" href="../css/screen.css" />
<script type="importmap">
{
"imports": {
"leaflet": "../../dist/leaflet-src.js"
}
}
</script>
</head>
<body>
<button id="disable" type="button">Disable text selection</button>
<button id="enable" type="button">Enable text selection</button>
<p>The quick brown fox jumps over the lazy dog.</p>
<script type="module">
import {DomUtil} from 'leaflet';
const disableBtn = document.getElementById('disable');
const enableBtn = document.getElementById('enable');
disableBtn.addEventListener('click', () => DomUtil.disableTextSelection());
enableBtn.addEventListener('click', () => DomUtil.enableTextSelection());
</script>
</body>
</html>