window.prompter Redirect 1

Non-standard
This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.

Summary

Returns a reference to an nsIPrompt instance, allowing to show dialogs parented to the current window.

Note: This property is only available to C++ code.

Syntax

window->GetPrompter(getter_AddRefs(prompt));

Example

nsCOMPtr<nsIDOMWindow> window;  // assume assigned
nsCOMPtr<nsIPrompt> prompter;
window->GetPrompter(getter_AddRefs(prompter));
if (prompter) {
  prompter->Alert(
    NS_LITERAL_STRING("Dialog Title").get(),
    NS_LITERAL_STRING("This is the text of a dialog").get());
}

Document Tags and Contributors

Contributors to this page: Sheppy
Last updated by: Sheppy,