Category:Example code: Difference between revisions

From MozillaZine Knowledge Base
Jump to navigationJump to search
(removed link to xulplanet)
 
(10 intermediate revisions by 3 users not shown)
Line 2: Line 2:


Articles in this category demonstrate the code to do certain things in Mozilla-based products (at this moment, mostly for use in [[Extension development|extensions]]).
Articles in this category demonstrate the code to do certain things in Mozilla-based products (at this moment, mostly for use in [[Extension development|extensions]]).
Development documentation is in process of being moved to [http://developer.mozilla.org/ Mozilla Development Center] (MDC). You can find more documentation there.


==XUL==
==XUL==
* [http://developer.mozilla.org/en/docs/Creating_toolbar_buttons Creating toolbar buttons] (moved to Devmo)
* [http://developer.mozilla.org/en/docs/Creating_toolbar_buttons Creating toolbar buttons] (moved to Devmo)
* [[Adding items to menus]] using overlays (talks about browser's context menu too)
* [[Adding items to menus]] using overlays (talks about browser's context menu too)
* [http://occidopagus.nl/firefox/emptysidebar/ Creating a Firefox sidebar]
* [http://developer.mozilla.org/en/docs/Creating_a_Firefox_sidebar Creating a Firefox sidebar]
* [[Creating dialogs | Creating dialog windows with XUL]]
* [http://developer.mozilla.org/en/docs/Code_snippets:Dialogs_and_Prompts#Describing_dialog_windows Creating dialog windows with XUL]
* [http://developer.mozilla.org/en/docs/Dynamically_modifying_XUL-based_user_interface Dynamically modifying XUL-based user interface on Devmo]. Talks about using DOM API to add, move, and delete widgets from UI at runtime.
* [http://developer.mozilla.org/en/docs/Dynamically_modifying_XUL-based_user_interface Dynamically modifying XUL-based user interface]. Talks about using DOM API to add, move, and delete widgets from UI at runtime.


==JavaScript==
==JavaScript==
===Commonly used techniques===
===Commonly used techniques===
* [[Dev : Using preferences|Using preferences]]. For the basics, see also the [http://www.xulplanet.com/tutorials/xulqa/q_prefs.html article] on [http://xulplanet.com/ XulPlanet].
* [http://developer.mozilla.org/en/docs/JavaScript_Console How to log debug information to JavaScript Console].
* [http://developer.mozilla.org/en/docs/JavaScript_Console How to log debug information to JavaScript Console].
* [[Dev : Extensions : Example Code : JavaScript Preferences Class | JavaScript Preferences Class]]
* [[Dev : Extensions : Example Code : Calling Java from Javascript | Calling Java from Javascript]]
* [[Dev : Extensions : Example Code : Calling Java from Javascript | Calling Java from Javascript]]


===XPCOM===
===XPCOM===
*[[File IO | Performing file IO]]
*[http://developer.mozilla.org/en/docs/Code_snippets:File_I/O Performing file IO]
*[[Using observers]] for cross-window notifications
*[[Using observers]] for cross-window notifications
*[[Running applications]]
*[http://developer.mozilla.org/en/docs/Code_snippets:Running_applications Running applications]
*[http://developer.mozilla.org/en/docs/nsIFilePicker Using nsIFilePicker]] (Open, Save, Select Directory dialogs)
*[http://developer.mozilla.org/en/docs/nsIFilePicker Using nsIFilePicker]] (Open, Save, Select Directory dialogs)
*[http://developer.mozilla.org/en/docs/nsIWindowMediator nsIWindowMediator] - enumerating existing windows.
*[http://developer.mozilla.org/en/docs/nsIWindowMediator nsIWindowMediator] - enumerating existing windows.
*[[Prompt service]] (priviledged version of alert(), confirm(), prompt() plus their extended versions): [http://ihoss.not-a-blog.com/prompt.php some examples], [http://forums.mozillazine.org/viewtopic.php?t=236678 forum thread].
*[http://developer.mozilla.org/en/docs/nsIPromptService nsIPromptService] (privileged version of alert(), confirm(), prompt() plus their extended versions): [http://ihoss.not-a-blog.com/prompt.php some examples], [http://forums.mozillazine.org/viewtopic.php?t=236678 forum thread].
*Working with protocols:
*Working with protocols:
**[[Dev : Extending the Chrome Protocol]]
**[[Dev : Extending the Chrome Protocol]]
Line 39: Line 39:


===XML Technologies in Mozilla===
===XML Technologies in Mozilla===
*[[How to Create a DOM tree]]
Moved [http://developer.mozilla.org/en/docs/Code_snippets:XML here] (MDC)
*[http://developer.mozilla.org/en/docs/XMLHttpRequest Using XMLHttpRequest]
*[[Parsing and serializing XML]]
*[[XPath|Using XPath]]
*[[XSL Transforms]]
*[[XLink]]
*[[XPointer]]
*[[SVG]]


===Other===
===Other===
Line 59: Line 52:
*[[Dev : Extensions : Example Code : Encoding| Encoding strings]]
*[[Dev : Extensions : Example Code : Encoding| Encoding strings]]
*[[Getting Current URL]]
*[[Getting Current URL]]
*[http://forums.mozillazine.org/viewtopic.php?p=1005555#1005555 Using events to pass messages from content to chrome]
*[http://developer.mozilla.org/en/docs/Code_snippets:Interaction_between_privileged_and_non-privileged_pages Using events to pass messages from content to chrome]
*[[Dev : Extensions : Example Code : Using the scrollwheel | Using the scrollwheel]]


===Techniques===
===Techniques===

Latest revision as of 18:40, 22 April 2015

Up to Development

Articles in this category demonstrate the code to do certain things in Mozilla-based products (at this moment, mostly for use in extensions).

Development documentation is in process of being moved to Mozilla Development Center (MDC). You can find more documentation there.

XUL

JavaScript

Commonly used techniques

XPCOM

<tabbrowser> related

XML Technologies in Mozilla

Moved here (MDC)

Other

Techniques


The alphabetical list of all articles and subcategories in this category follows.