views:

968

answers:

1

Is it possible to call Firefox Save As dialog ( chrome://mozapps/content/downloads/unknownContentType.xul ) with specifying URL?

I found that class for this dialog stored in "nsHelperAppDlg.js" and called "nsUnknownContentTypeDialog", but i don't understand how to use it :(

I want to create extension, that show firefox "save as" dialog on specifying URLl and give a choice which program to save it with.

Help please!

+1  A: 

What you really want is the saveURL method in contentAreaUtils.js. That will give you the exact behavior that Firefox has (since that's what Firefox calls).

sdwilsh
He's actually asking about a different dialog.
Nickolay
I trying, but this invoke's standard dialog "save as". But i need dialog give a choice which program to save it with.
Protocoder
Ah, in that case I think you want to use this method:http://mxr.mozilla.org/mozilla-central/source/uriloader/exthandler/nsIExternalHelperAppService.idl#71
sdwilsh
To sdwilsh - description of that function:"Binds an external helper application to a stream listener"Thank you, but it's different function :(
Protocoder