views:

110

answers:

1

I'm writing a Firefox extension, and would like to display a password prompt. I don't just want to use the JavaScript prompt function, since it doesn't hide what's being typed. Instead, I'd like to have a prompt where the characters typed are replaced with asterisks or dots. Is there some way I can use a built in Firefox password dialog in my extension, or do I have to write my own?

+1  A: 

https://developer.mozilla.org/en/nsIPromptService#promptPassword_example, but note that this creates a modal dialog, which are generally annoying.

Nickolay