Building an Extension

  • Revision slug: Talk:Building_an_Extension
  • Revision title: Building an Extension
  • Revision id: 82349
  • Created:
  • Creator: Jrjbertram
  • Is current revision? No
  • Comment

Revision Content

Is there a downloadable extension template available? That would really help would-be extension authors... --Maian 03:07, 9 October 2005 (PDT)

There's one from another similar article: http://mozilla.doslash.org/stuff/helloworld.zip --Nickolay 12:15, 9 October 2005 (PDT)

I am not a programmer and was wondering if I could rally some support to have an extension written so users can operate digital finger print readers within Firefox? This last convenience is the only thing still keeping me tethered to Explorer. vehlewa1 7:45, 3 December 2005 (EST)

Could someone elaborate a little more on what this means? "window is the localName value of the root element of the XUL document..." Where else, for example, does the corresponding word window also appear? I don't see how it is chosen. --Randomandy 06:00, 2005 October 11 (PDT)

It means the part of the tagname excluding the namespace prefix (if it exists) of the document's root element. So if you have some document that looks like <?xml version="1.0"?><xul:dialog xmlns:xul="(xul namespace)">...</xul:dialog>, dialog would be the localName of the root element. If it were just <dialog>...</dialog>, the localName would still be dialog. At least, that's what I think it's saying. I'm not familiar with XUL. --Maian 06:43, 11 October 2005 (PDT)


It's good that this article encourages the use of a locale file, but it doesn't really tell you where to put your locale file or how to write an entry for it in your manifest. Perhaps a snippet like the following under Create a Chrome Manifest?

locale    sample    en-US    chrome/chromeFiles/locale/en-US/

--Ox336699 13:54, 5 November 2005 (PST)

I tried this article out with a freshly downloaded 1.5 Firefox, but it didn't work. I don't get any errors in the javascript console window. I poked around on the DOM inspector in chrome://browser/content/browser.xul and found the statusbar element that was supposed to be overridden, but I don't see my sample item in there. If I visit my element (which I named fetch rather than sample) at chrome://fetch/content/fetch.xul, I see the 'hello world' content displayed in the inspector's window. It's almost as if the file I created in my profile's extension directory isn't being slurped up. Is there a way to tell if this happened or not?

{{mediawiki.external('Edit:')}} Ah.. missed one of the 'sample' search & replaces in the chrome.manifest file. I needed to open fetch.xul, but was attempting to open sample.xul instead. Didn't see any warnings or anything, so that's what got me. I'm up and running, now, though.

--jrjbertram, 2:30 pm 4 December 2005

Revision Source

<p>Is there a downloadable extension template available? That would really help would-be extension authors... --<a href="User:Maian">Maian</a> 03:07, 9 October 2005 (PDT)
</p>
<dl><dd>There's one <a class="external" href="http://kb.mozillazine.org/Getting_started_with_extension_development#Resources">from another similar article</a>: http://mozilla.doslash.org/stuff/helloworld.zip --<a href="User:Nickolay">Nickolay</a> 12:15, 9 October 2005 (PDT)
</dd></dl>
<p>I am not a programmer and was wondering if I could rally some support to have an extension written so users can operate digital finger print readers within Firefox?  This last convenience is the only thing still keeping me tethered to Explorer.
<a href="User:Vehlewa1">vehlewa1</a> 7:45, 3 December 2005 (EST)
</p><p>Could someone elaborate a little more on what this means? <i>"window is the localName value of the root element of the XUL document..."</i> Where else, for example, does the corresponding word <i>window</i> also appear? I don't see how it is chosen.
--<a href="User:Randomandy">Randomandy</a> 06:00, 2005 October 11 (PDT)
</p>
<dl><dd> It means the part of the tagname excluding the namespace prefix (if it exists) of the document's root element. So if you have some document that looks like &lt;?xml version="1.0"?&gt;&lt;xul:dialog xmlns:xul="(xul namespace)"&gt;...&lt;/xul:dialog&gt;, dialog would be the localName of the root element. If it were just &lt;dialog&gt;...&lt;/dialog&gt;, the localName would still be dialog. At least, that's what I think it's saying. I'm not familiar with XUL. --<a href="User:Maian">Maian</a> 06:43, 11 October 2005 (PDT)
</dd></dl>
<p><br>
</p><p>It's good that this article encourages the use of a locale file, but it doesn't really tell you where to put your locale file or how to write an entry for it in your manifest.  Perhaps a snippet like the following under <i>Create a Chrome Manifest</i>?
</p>
<pre class="eval">locale    sample    en-US    chrome/chromeFiles/locale/en-US/
</pre>
<p>--<a href="User:Ox336699">Ox336699</a> 13:54, 5 November 2005 (PST)
</p><p>I tried this article out with a freshly downloaded 1.5 Firefox, but it didn't work.  I don't get any errors in the javascript console window.  I poked around on the DOM inspector in chrome://browser/content/browser.xul and found the statusbar element that was supposed to be overridden, but I don't see my sample item in there.  If I visit my element (which I named fetch rather than sample) at chrome://fetch/content/fetch.xul, I see the 'hello world' content displayed in the inspector's window.  It's almost as if the file I created in my profile's extension directory isn't being slurped up.  Is there a way to tell if this happened or not?
</p><p>{{mediawiki.external('Edit:')}} Ah.. missed one of the 'sample' search &amp; replaces in the chrome.manifest file.  I needed to open fetch.xul, but was attempting to open sample.xul instead.  Didn't see any warnings or anything, so that's what got me.  I'm up and running, now, though.
</p><p>--jrjbertram, 2:30 pm 4 December 2005
</p>
Revert to this revision