FUEL/0.1/Plan
From MozillaWiki
< FUEL/0.1
Due Date: Jan 31, 2007
Deliverable: Complete API
Toolbar Buttons [edit]
- Create a Button
- Insert relative to another button
Example:
var button = new ToolbarButton( "button_elem_id" );
var toolbar = Application.toolbars.get("nav");
toolbar.append( button );
toolbar.insert( button, null );
Event/Observer Handling [edit]
- Reliable events that extension developers understand and can use easily
- An "onload" that works
- Startup complete / shutdown eminent
- Your extension installed, updated, removed
- Handle observers seamlessly
Example:
Application.events.add( "load", function(){
Bookmarks.getAll();
});
Application.events.add( "startup/shutdown", ... );
Extension.events.add( "install/update/remove", ... );
// Ideas for extension presence detection:
Application.extensions.has("extension-id-or-guid");
Preferences [edit]
- Use current code (see bug 315277)
- Handle implicit typing (true -> Boolean)
- Allow QueryInterface support to get nsIPrefService, nsIPrefBranch and nsIPrefBranch2
- When used in certain contexts, like Extension.prefs, a branch will be automatically set
- For Extension, the extension id will be the preset branch
Example:
Application.prefs.get("my.pref",default);
Application.prefs.set("my.pref","foo");
// prefs uses the extension id as a branch
Extension.prefs.set("autosave");
