[Project_owners] First time after installing Extension

Chris Holtz massada42 at gmail.com
Fri Dec 22 06:17:50 PST 2006


Are you saying that if one includes install.js in the xpi, then
install.rdfwill be ignored?


On 12/22/06, Karsten Düsterloh <mnenhy at tprac.de> wrote:
>
> Brian King aber hob zu reden an und schrieb:
> > On 22/12/2006 11:21 (CET), Amin wrote:
> >> any body know how to run a javascript code only one time after
> >> installing extesion ,
>
> You can't.
>
> >> what i must add to install.rdf ?
>
> It's a long-standing annoyance with install.rdf that you can't run code
> on install/uninstall. You could (still) use an install.js to run code on
> installation, but you'd lose all install.rdf benefits like EM
> integration - and you won't get uninstall code.
>
> > Have a default preference, say "extensions.myapp.firstrun", and set it
> > to true.
> >
> > Check it every time at startup. If true, execute the code, and if false
> > do not. Once your code is executed, you can set it to false yourself to
> > ensure the code is not run on subsequent startup.
>
> That's oh so awkward, but it's the only way atm, unfortunately. :(
>
> EM really should have at least four callbacks: before-install,
> after-install, before-uninstall, after-uninstall.
>
>
> Karsten
> --
> Feel free to correct my English. :)
> _______________________________________________
> Project_owners mailing list
> Project_owners at mozdev.org
> http://mozdev.org/mailman/listinfo/project_owners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mozdev.org/pipermail/project_owners/attachments/20061222/830986a0/attachment.html 


More information about the Project_owners mailing list