# Make extension Electrolysis compatible

**URL:** <https://discourse.mozilla.org/t/make-extension-electrolysis-compatible/4819>\
**Category:** Development\
**Created:** [October 21, 2015, 10:52pm UTC](https://discourse.mozilla.org/t/make-extension-electrolysis-compatible/4819 "2015-10-21T22:52:44Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![noitidart](https://avatars.discourse-cdn.com/v4/letter/n/9f8e36/32.png) [@noitidart](https://discourse.mozilla.org/u/noitidart)\
**Post date:** [October 22, 2015, 6:53pm UTC](https://discourse.mozilla.org/t/make-extension-electrolysis-compatible/4819/3 "2015-10-22T18:53:18Z")

</div>

I found what made framescript, and chromeworker, messaging super easy for me, is creating functions on both sides which can call “functions” in the other side. Then setup a callback to run. And the other side can return a promise if they aren’t doing sync stuff.

Its not so intuitive how i did things but once you figure it out its super easy, you can make your own version too. This is my framescript communication “api”: [https://gist.github.com/Noitidart/03c84a4fc1e566bd0fe5](https://gist.github.com/Noitidart/03c84a4fc1e566bd0fe5)

You can see me using it here: [https://addons.mozilla.org/en-US/firefox/addon/tweeeeeeeeeeeeeeeeeeter/](https://addons.mozilla.org/en-US/firefox/addon/tweeeeeeeeeeeeeeeeeeter/) and i can give you more examples if you want to see this for inspiration or using it yourself.

---

_[View the full topic](https://discourse.mozilla.org/t/make-extension-electrolysis-compatible/4819)._
