Changes

Jump to: navigation, search

Mobile/Fennec/Extensions/BestPractices

450 bytes added, 03:07, 6 August 2009
no edit summary
== Blend In ==
Whenever possible, please use the CSS styles shipped with Fennec to allow your extension to blend into the rest of the application.
* Don't play with font sizes. Fennec defaults the font-size to something suitable for the device. Best to stick with that.* Fennec uses border-image to create nice looking buttons that can grow in either direction. We have overridden some widget styling, so you need to do nothing extra. Some widgets use special class names to achieve the desired look.* (TODO: Add blanks for buttonsList of built-in styles)
* (TODO: Add sample and tutorial)
== Conflicts ==
Since there is only one window in Fennec, all extensions that need to add content will likely overlay browser.xul. To avoid conflicts between different extensions and the main browser, extension authors must use unique names for their element's IDs and classe names. For instance, using the chrome shortcut as a prefix for IDs and class names will prevent such issues : don't use
<button id="update-button"/>
but
<button id="myext-update-button"/>.
 
Of course, you should also namespace all JavaScript code used in extensions.
== Assume Nothing is Safe ==
Canmove, confirm, emeritus
2,798
edits

Navigation menu