Tag Archives: firefox os

Failproof AJAX requests in Firefox OS

Have correct values in the manifest

The app type has to be at least privileged. No, web (hosted) apps won’t work with different domains if CORS is not enabled there.

Add the systemXHR permission too, or your XMLHttpRequests to domains without CORS enabled will instafail.

Example of the syntax for these two things in the manifest:

{
  "type": "privileged",
  "permissions": {
    "systemXHR": {
      "description": "Allows loading remote content"
    }
  }
}

Add the “magic word” when creating XMLHttpRequest objects

The magic word being the mozSystem property:

request = new XMLHttpRequest({ mozSystem: true });

You should now be able to use the request in the usual way. Remember to add an error handler in case it fails!

We are using these superfailproof requests in our privileged app template to load definitions from MDN. Have a look!

For more info

Firefox OS Simulator is now a component in Bugzilla

So you can now file bugs under Product = Firefox OS, Component = Simulator.

Or look for existing bugs!

PS. Aren’t you AMAZE at my mad bugzilla skillzzz? I created direct links for you to file or search Firefox OS Simulator bugs. Ahhh, the power of query strings in URLs…!

“Mozilla’s new technologies” (for Mozilla Power’13)

I was going to “manifest” myself in Cairo via the powers of videoconferencing for Mozilla Power’13, but connectivity issues happened, so I recorded a screencast with my talk:

Slides

Here’s hoping the Mozilla Egypt community is having a great event :-)

Do send me any questions you might have about the topics I discussed, and I’ll do my best to answer them!

aafm + Firefox OS

aafm accessing a Firefox OS SD card

A little jewel of awesome: aafm (the Android ADB File Manager) works with Firefox OS phones.

And I didn’t have to touch a single line of code (I just installed PyGTK for Mac).

See? The beauty of building over something that works already.

So you can now browse your Firefox OS storage area using this tool. Enjoy!

Hacked.io 2013

IndigO2

I had the chance to attend Hacked.io yesterday. The event still goes on today, but I had other matters to deal with, so am sadly unable to go today.

It was held at the IndigO2 inside the O2, quite a venue!
Continue reading