fix: export all methods

backup
flop 3 weeks ago
parent a7d0700022
commit 4edc71a611
  1. 10
      ts/src/web.ts

@ -507,6 +507,16 @@ function _updateThemeBtn() {
window.addEventListener('DOMContentLoaded', _updateThemeBtn);
// --- Init ---------------------------------------------------------------------
// Pin all functions referenced from inline HTML onclick/onchange strings so
// Bun's bundler does not tree-shake them as unreachable dead code.
Object.assign(window, {
loadBin, exportBin,
addSection, removeSection, toggleSection, setSectionFlag,
addElement, removeElement, selectElement,
changeElType, setElField, setElFlag,
cycleTheme,
});
render();
if (window.MonoDisplay) { initDemos(); }
else { const iv = setInterval(() => { if (window.MonoDisplay) { clearInterval(iv); initDemos(); } }, 100); }

Loading…
Cancel
Save