javascript - Firefox add-on sdk sidebar incompatibility - How do I warn the user? -


i've created add-on add-on sdk. add-on uses ui/sidebar module. if user installs add-on older version of firefox, such firefox esr 24.1.1, browser inform user add-on has been installed. but, add-on produces following error (visible in browser console):

error: module `sdk/ui/sidebar` not found @ resource://gre/modules/commonjs/sdk/ui/sidebar.js resource://gre/modules/commonjs/sdk/loader/cuddlefish.js 133 

this makes sense because have read sidebar module introduced version 26. understanding add-on installs despite because of "compatible default" functionality of browser.

however, find behavior undesirable add-on. without knowing @ console, users have no idea installation failed. best practice informing users add-on incompatibilities? there way enforce minversion? should put try block around sidebar require statement , try throw sort of alert @ users informing them of incompatibility?

is there standard way address this? suggestions great. thanks.

update: minversion had been set 21.0 along.

this page on mdn led me think latest version of sdk corresponded current version of firefox (27 @ time). but, looks new version of sdk hasn't been released in quite time. i'm on version 1.15 (which downloaded this page). since 1.15 released while ago, current version of firefox @ time 21.0, , therefore minversion set 21.0. failed check before posting, under impression add-on being installed on firefox 24 when minversion 27.

when upload add-on amo, 1 of things have tell add-on compatibility firefox (or seamonkey or fenec):

enter image description here

besides that, may edit install.rdf file inside your-addon.xpi (notice it's zip file) following lines:

<!-- firefox --> <em:targetapplication>   <description>     <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>     <em:minversion>21.0</em:minversion>     <em:maxversion>25.0a1</em:maxversion>   </description> </em:targetapplication> 

that lines checked firefox when user try install addon (ie, .xpi file).

what must set min , max versions in order avoid incompatible browsers install add-on.


Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -