The More You Know

A few common questions seem to be asked a lot, especially by developers new to the Mozilla platform. So, I wanted to draw attention to some relevant articles on the Mozilla Developers Center (MDC).

  • How do I get access to the browser? If your writing an extension for Firefox, there is a good chance you want access to the browser. You might want to add tabs, get the selected text in the current tab or whatever. This tabbrowser code snippet article has enough information to get you started.
  • How can I debug problems in my code? It can be really frustrating when you seem to have everything put together right, but nothing appears to be working. This extension FAQ article can help you debug some common problems.
  • How can I be notified when ‘X’ happens? Web developers are familiar with the concept of ‘events’. It is common to use events to be notified when a web page loads or when a keypress occurs on an input. The same is true when developing extensions and other chrome-based code in Mozilla. The UI is made up of XUL, which is very similar to what you know of DHTML. Here is a list of XUL events and a helpful XUL reference with information about the various kinds of elements you’ll come across.