Emulating WebExtensions
Hi list, Would it be possible to emulate what the 'backgroud' page does in the context of a "normal" Firefox extension by using Web workers? In detail, WebExtensions dictates that each extension has a background thread which runs independently of its foreground counterpart, and that they notify each other by sending messages. Web workers are quite the same thing: independent threads which can send/receive messages to/from their creators. So it seems "natural" to have a Web worker active for the extension's lifetime which behaves the same way a WebExtension's background script does. Which kind of problems may arise in implementing the WebExtension's semantics in a traditional Firefox extension? Is there any exmple to look at which already does that? Thanks Marcello ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: openDialog(DOM, ..)
> Alternatively, create an empty dialog and manipulate the dialog using DOM > based on the arguments you pass using window.open[Dialog](...). This is What do you mean by 'empty dialog'? Is it a a. xul "skeleton" file or something like b. openDialog("about:blank"); ? I might have missed that, but the main goal is avoiding adding a further file to the extension bundle. In case b., openDialog("about:blank") returns an HTML document that doesn't have anymore the structure of a 'dialog' xul element. So, in this case, how to get a handle to the 'dialog' element associated with "about:blank" ? > probably more similar to what you describe than the data: url option, but it > would also mean that you initially open the dialog with different content > than what you ultimately want, and that might have side-effects. > > ~ Gijs Thanks MS ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
openDialog(DOM, ..)
Hello, Consider the method: window.openDialog(URL.xul, ...). Its final result is to opens a dialog from the content read in file URL.xul. After some web surfing, it seems not possible to programmatically define a dialog, and then open that dialog (somehow) from the main window. So, in the context of a firefox extension, is there a way to define the DOM of some dialog and to 'append' that dialog to the window (making it appear?) For example, the goal would be: let dialog = window.document.createElement("dialog"); // put things in this dialog // .. // finally window.openDialogFromDOM(dialog, ...); Thanks in advance MS ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: clear cache
Tried on latest FF too, no luck. If someone got that working, please give us some advice! Marcello > > Additionally, launching FF with '-clearcaches' or by setting the > > environmental 'MOZ_CLEAR_CACHES' does not seems to give the desired > > effect. > > The switch you want is -purgecaches > > Phil ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
clear cache
Hi All, I have followed various guides on how to clear the 'cache' in order to get changes in the JavaScript accepted withouth restarting the browser. In this case, I talk about the JavaScript of an extension. So: how to clear the 'cache' in order to get a fresh changed JavaScript recognized, when developing an extension ? Among the documents available on the Web on this subject, I read the following: https://developer.mozilla.org/en-US/Add-ons/Setting_up_extension_development_environment Unfortunately, in Iceweasel 31.7.0 there are no 'nglayout.debug.disable_xul_fastload' or 'nglayout.debug.disable_xul_cache' entries. Additionally, launching FF with '-clearcaches' or by setting the environmental 'MOZ_CLEAR_CACHES' does not seems to give the desired effect. So: is there some alternate way of achieving that? Thanks Marcello ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform