canmove, Confirmed users
1,584
edits
No edit summary |
|||
Line 16: | Line 16: | ||
</pre> | </pre> | ||
In addition to the install manifest changes, you may want to expose your extension into the Fennec UI. Fennec does have a few familiar UI elements, such as a URL toolbar, a side toolbar with navigation controls and a browser content area. But Fennec doesn't have a main menu | In addition to the install manifest changes, you may want to expose your extension into the Fennec UI. Fennec does have a few familiar UI elements, such as a URL toolbar, a side toolbar with navigation controls, and a browser content area. But Fennec doesn't have a main menu or a statusbar. There are some new UI areas too: another side toolbar holding the open tab thumbnails, and a large offscreen panel for more complex UI features. | ||
See the Fennec main window XUL file for the actual structure: [http://hg.mozilla.org/mobile-browser/file/tip/chrome/content/ browser.xul] | See the Fennec main window XUL file for the actual structure: [http://hg.mozilla.org/mobile-browser/file/tip/chrome/content/ browser.xul] | ||
Line 42: | Line 42: | ||
==Debug Tools== | ==Debug Tools== | ||
There are not yet the same amount of tools available for developers as there are for desktop Firefox, but some efforts are underway. If running a desktop version of Fennec, you can install DOM Inspector. You can also launch Fennec using the <code>-jsconsole</code> flag to display an Error Console window. | There are not yet the same amount of tools available for developers as there are for desktop Firefox, but some efforts are underway. If running a [http://www.mozilla.com/en-US/mobile/platforms/ desktop version] of Fennec, you can install DOM Inspector. You can also launch Fennec using the <code>-jsconsole</code> flag to display an Error Console window. | ||
The Error Console window is also integrated into Fennec itself. It’s hidden by default – you need to use '''about:config''' to display it. | The Error Console window is also integrated into Fennec itself. It’s hidden by default – you need to use '''about:config''' to display it. | ||
# Navigate to “about:config” | |||
# Search for "console" | |||
# Set the preference “browser.console.showInPanel” to “true” | |||
# Restart Fennec | |||
# Open the tools panel (gear icon on the right toolbar) | |||
# Tap the "bug" icon to display the Error Console | |||
For a simple way to print debugging information, set the preference "browser.dom.window.dump.enabled" to "true", then start Fennec from a terminal window. Any string that you pass to the dump() function in your JavaScript code will be printed to the terminal. | |||
==Installing== | ==Installing== | ||
Extensions can be hosted on websites and installed | Extensions can be hosted on websites and installed using [https://developer.mozilla.org/en/Installing_Extensions_and_Themes_From_Web_Pages installTrigger]. Make sure the webserver is serving the extension XPI with the right MIME type (application/x-xpinstall). The add-on installation UI should appear after clicking the link. Fennec supports a basic Add-on Manager user interface, which allows a user to manage extensions. Using this interface, a user can also find and install extensions from AMO (addons.mozila.org). Extensions can be removed using the same dialog. |