I am making an addon for both firefox and fennec and I want to know if it is running on fennec or not.
A:
You could use document.getElementById("browsers")
. In firefox, it's null but in fennec it returns a HTMLDivElement object
tmim
2010-02-17 05:16:33
It's null now, but that could easily change in the future. It's better to use a more stable API.
sdwilsh
2010-02-17 05:49:49
+1
A:
The global Application object (provided by FUEL) will give you various properties such as name or id that you can use to determine this.
sdwilsh
2010-02-17 05:50:11
+1
A:
What sdwilsh said or using nsIXULAppInfo.
If Fennec does support FUEL (I haven't checked), it's a matter of personal preference which one to use. FUEL is supposed to be a simpler-to-use wrapper around the nsI* components.
Nickolay
2010-02-17 09:19:03