Will this Javascript / Typescript work in Anvil?

I haven’t run all that code, but I did add this script tag to Native Libraries in an Anvil app, imported window from anvil.js to print what it had (dir(window)) and saw MuseClient and a couple other Muse references in the output:

<script src="https://unpkg.com/muse-js@3.3.0/dist/muse.js"></script>

Based on this, it should be possible unless there’s some specific implementation detail that I am unaware of – but you definitely can at least start prototyping with it!

Update: While on the topic of JS imports, here’s the doc to all the ways to access JS code and objects in Anvil: Anvil Docs | Accessing Javascript

3 Likes