fix(playground): work around lack of module support in mdbook
This commit is contained in:
parent
79244b5815
commit
3e72969ce4
3 changed files with 12 additions and 12 deletions
|
|
@ -1,5 +1,3 @@
|
|||
import { Parser, Language } from './tree-sitter.js';
|
||||
|
||||
function initializeLocalTheme() {
|
||||
const themeToggle = document.getElementById('theme-toggle');
|
||||
if (!themeToggle) return;
|
||||
|
|
@ -62,7 +60,9 @@ function initializeCustomSelect({ initialValue = null, addListeners = false }) {
|
|||
}
|
||||
}
|
||||
|
||||
export async function initializePlayground(opts) {
|
||||
window.initializePlayground = async (opts) => {
|
||||
const { Parser, Language } = window.TreeSitter;
|
||||
|
||||
const { local } = opts;
|
||||
if (local) {
|
||||
initializeLocalTheme();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue