Use a data: URL, or failing that, define your own protocol handler and
use that to return the XUL DOM you want, when used with openDialog.
Alternatively, create an empty dialog and manipulate the dialog using
DOM based on the arguments you pass using window.open[Dialog](...). This
is 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
On 06/07/2015 15:11, Marcello Stanisci wrote:
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