# Async extensions

**URL:** <https://forum.snap.berkeley.edu/t/async-extensions/22848>\
**Category:** Advanced Help with Snap!\
**Created:** [November 26, 2026, 5:36pm UTC](https://forum.snap.berkeley.edu/t/async-extensions/22848 "2026-11-26T17:36:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pppdud](https://forum.snap.berkeley.edu/user_avatar/forum.snap.berkeley.edu/pppdud/32/46177_2.png) [@pppdud](https://forum.snap.berkeley.edu/u/pppdud)\
**Post date:** [November 26, 2026, 5:36pm UTC](https://forum.snap.berkeley.edu/t/async-extensions/22848/1 "2026-11-26T17:36:12Z")

</div>

Hello! Lately, I’ve been trying to add asynchronous (as in the JS async keyword) extensions to my Snap! fork in src/extensions.js, but I can’t seem to figure out the proper way to accomplish it.

Normally, I would just use synchronous functions, but here I need to invoke asynchronous WebCrypto APIs.

Does anyone know what the proper method is here?

---

<div class="post-metadata">

**Author:** ![ego-lay\_atman-bay](https://forum.snap.berkeley.edu/user_avatar/forum.snap.berkeley.edu/ego-lay_atman-bay/32/1395_2.png) [@ego-lay\_atman-bay](https://forum.snap.berkeley.edu/u/ego-lay_atman-bay)\
**Post date:** [November 26, 2026, 6:20pm UTC](https://forum.snap.berkeley.edu/t/async-extensions/22848/2 "2026-11-26T18:20:33Z")

</div>

I would look at the `cst_load(url)` extension as that fetches the costume asynchronously while still being in one snap block call (the actual function is called repeatedly though)

---

<div class="post-metadata">

**Author:** ![dardoro](https://forum.snap.berkeley.edu/user_avatar/forum.snap.berkeley.edu/dardoro/32/14708_2.png) [@dardoro](https://forum.snap.berkeley.edu/u/dardoro)\
**Post date:** [November 26, 2026, 6:28pm UTC](https://forum.snap.berkeley.edu/t/async-extensions/22848/3 "2026-11-26T18:28:07Z")

</div>

There are two ways.  
Implicit way - you may look at `Web service access (https)`  
cst\_load(url) @ extension.js.  
Or explicit way i.e., return the closure that returns the computation result (placeholder).  
And call those function in script until completion flag/result is returned.  
Search the forum for js promise.
