Building an Extension

  • Revision slug: Talk:Building_an_Extension
  • Revision title: Building an Extension
  • Revision id: 82353
  • Created:
  • Creator: Callek
  • Is current revision? No
  • Comment /* Callek's change to wording */

Revision Content

Please use the Extensions forum at MozillaZine for general discussion; only put comments about this particular article on this page.

Downloadable template

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)

Digital finger print readers extension

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)

localName

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)

Localizability

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)

Some problems

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

Version

From javascript within the extension, how does one read its version? Using InstallTrigger.getVersion('myExtention@example.com') does not work.

--Kurt, 2005-12-21 23:40:00-05

Callek's change to wording

Callek, this change doesn't make sense to me (you forgot to change some punctuation at least). I like the 'go back' variant more fwiw. --Nickolay 08:41, 11 January 2006 (PST)

Sure, I am by far not the best english writer (even though it is my only language). At the time the way it initially was I liked best, so I changed that back. Now though it appears like the 'go back' variant was more comprehensive. Feel free to revert my change at your whim. --Callek 17:22, 11 January 2006 (PST)

Revision Source

<dl><dd> <i>Please use the <a class="external" href="http://forums.mozillazine.org/viewforum.php?f=19">Extensions forum</a> at MozillaZine for general discussion; only put comments about this particular article on this page.</i>
</dd></dl>
<h3 name="Downloadable_template"> Downloadable template </h3>
<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>
<h3 name="Digital_finger_print_readers_extension"> Digital finger print readers extension </h3>
<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>
<h3 name="localName"> localName </h3>
<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>
<h3 name="Localizability"> Localizability </h3>
<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>
<h3 name="Some_problems"> Some problems </h3>
<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>
<h3 name="Version"> Version </h3>
<p>From javascript within the extension, how does one read its version?
Using InstallTrigger.getVersion('myExtention@example.com') does not work.
</p><p>--<a href="User:Kurtb149">Kurt</a>, 2005-12-21 23:40:00-05
</p>
<h3 name="Callek.27s_change_to_wording"> Callek's change to wording </h3>
<p>Callek, <a class="external" href="http://developer.mozilla.org/en/docs/index.php?title=Building_an_Extension&amp;curid=3657&amp;diff=23564&amp;oldid=23549&amp;rcid=23601">this change</a> doesn't make sense to me (you forgot to change some punctuation at least). I like the 'go back' variant more fwiw. --<a href="User:Nickolay">Nickolay</a> 08:41, 11 January 2006 (PST)
</p>
<dl><dd> Sure, I am by far not the best english writer (even though it is my only language).  At the time the way it initially was I liked best, so I changed that back. Now though it appears like the 'go back' variant was more comprehensive.  Feel free to revert my change at your whim. --<a href="User:Callek">Callek</a> 17:22, 11 January 2006 (PST)
</dd></dl>
Revert to this revision