The promptBox
object represents the tab-modal prompts (or alerts) on a given tab. It's returned by the tabbrowser
method getTabModalPromptBox
method.
A tab may have multiple prompts on it; the tabmodalPromptShowing
attribute on the tabbrowser
will tell you how many prompts a given tab has.
Note: This is largely an implementation detail; if you're developing an add-on, you shouldn't need to tinker with this. You should use the
window.alert()
method or the nsIPrompt
interface instead. See Using tab-modal prompts for details.Method overview
|
void removePrompt( |
|
Methods
appendPrompt()
Creates a new prompt, adding it to the tab.
nsIDOMElement appendPrompt( args, onCloseCallback );
Parameters
args
- Arguments for the prompt.
onCloseCallback
- The callback routine to be called when the prompt is closed.
Return value
An nsIDOMElement
object representing the new prompt.
removePrompt()
Removes an existing prompt.
void removePrompt( nsIDOMElement aPrompt );
Parameters
aPrompt
- The prompt to dispose of.
listPrompts()
Returns a list of all the prompts on the tabbrowser
.
NodeList listPrompts( nsIDOMElement aPrompt );
Parameters
aPrompt
- This parameter isn't used; I don't know why it's even there.
Return value
A NodeList
containing all of the prompt elements on the tabbrowser
.