Discourse is a SPA. You can’t just slap a script that now on the onLoad as that won’t work. You will need to hook into our API endpoints. Check Developer’s guide to Discourse Themes
Falco
(Falco)
9
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Issues on loading a js asset from a Theme Component | 19 | 901 | September 28, 2023 | |
| Defer loading JavaScript in Themes and Components | 4 | 1984 | April 7, 2022 | |
| Question about web app loading | 2 | 95 | April 25, 2025 | |
| Need help with theme component Github | 7 | 174 | September 17, 2024 | |
| When to switch themes/plugins to `.gjs`? | 27 | 553 | January 5, 2026 |