Windows 10 reached EOS (end of support) on October 14, 2025. If you are on Windows 10, see this article.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Gecko to Gaia

  • 5 replies
  • 1 has this problem
  • 54 views
  • Last reply by Kevin
  • Archived

Dear All,

How I can invoke Gaia API from gecko.

I have some API in Gaia in my webapp. How I can invoke it from Gecko?

Dear All, How I can invoke Gaia API from gecko. I have some API in Gaia in my webapp. How I can invoke it from Gecko?

All Replies (5)

Hello,

You can read more about webAPIs here and here.

Some APIs are not supported yet on many platforms, and some APIs are only targeted at mobile platforms. Gaia is the Firefox OS User Interface, and is not included in Gecko.

Hope this helps :)

Modified by Joshua Smith

Hi,

Thanks for your reply, but here my question is How I can communicate Gecko to Gaia?

For example:

in Gaia my APP contains one API.

EX: Hello.js ----> function GetName() {

           var name = "Laxman";
          // Implementation of logic here

}

I want to call this API from Gecko Javascript/XPCOM C++. How I can invoke this API from Gecko?

You have to add a reference to the window, and then you can invoke it by using the same method that you would use to call it from a webpage.

Example Code: http://mxr.mozilla.org/mozilla-central/source/dom/browser-element/BrowserElementChildPreload.js#476

Hi,

I am getting doubt, are you telling answers for b2g Mobile platform. Because I am asking for b2g [FFOS Mobile platform].

This is an end user support forum you will get better answers at https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Apps#Community