Async JS in Snap!

As for how I could put it in my own custom block:

In my case, I directly edited the XML, but this is far easier to do. Just create the block spec using that format and you should be able to import the XML it gives you.