26 lines
728 B
HTML
26 lines
728 B
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
</head>
|
|
<body>
|
|
<script type="module" src="./benchmark.js"></script>
|
|
<script type="module">
|
|
import Database from 'emoji-picker-element/database'
|
|
|
|
(async () => {
|
|
const dataSource = '/data.json'
|
|
|
|
// populate IndexedDB so the Picker is just reading from the local store
|
|
const db = new Database({ dataSource })
|
|
await db.ready()
|
|
await db.close()
|
|
|
|
// lazy-load the picker so that its logic to determine emoji support runs during the perf measure
|
|
const { default: Picker } = await import('emoji-picker-element/picker.js')
|
|
|
|
document.body.appendChild(new Picker({ dataSource }))
|
|
})()
|
|
</script>
|
|
</body>
|
|
</html> |