A method identified as deprecated has been superseded and may become unsupported in the future.
Displays a JavaScript alert panel. (Deprecated in Mac OS X v10.4.11. Use webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:
instead.)
- (void)webView:(WebView *)sender runJavaScriptAlertPanelWithMessage:(NSString *)message
The web view that sent the message.
The message to display in the alert panel.
This method is used to display a panel when JavaScript code calls alert
. Delegates should visually indicate that this panel comes from JavaScript. The panel should have, for example, a single OK button. No action is taken if you do not implement this method.
– webView:runJavaScriptConfirmPanelWithMessage:
– webView:runJavaScriptTextInputPanelWithPrompt:defaultText:
WebUIDelegate.h
Displays a JavaScript confirm panel. (Deprecated in Mac OS X v10.4.11. Use webView:runJavaScriptConfirmPanelWithMessage:initiatedByFrame:
instead.)
- (BOOL)webView:(WebView *)sender runJavaScriptConfirmPanelWithMessage:(NSString *)message
The web view that sent the message.
The message to display in the confirmation panel.
This method is used to display a confirmation panel when JavaScript code calls confirm
. It returns YES
if confirmed, NO
otherwise. Delegates should visually indicate that this panel comes from JavaScript. The panel should have, for example, an OK and Cancel button. No action is taken if you do not implement this method.
– webView:runJavaScriptAlertPanelWithMessage:
– webView:runJavaScriptTextInputPanelWithPrompt:defaultText:
WebUIDelegate.h
Displays a JavaScript text input panel and returns the entered text. (Deprecated in Mac OS X v10.4.11. Use webView:runJavaScriptTextInputPanelWithPrompt:defaultText:initiatedByFrame:
instead.)
- (NSString *)webView:(WebView *)sender runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(NSString *)defaultText
The web view that sent the message.
The message to display in the text input panel.
Default placeholder text to display in the text field.
This method is used to provide an alternative prompt panel when JavaScript code calls prompt
. Delegates should visually indicate that this panel comes from JavaScript. The panel should have an OK and Cancel button, and an editable text field. If you do not implement this method, a JavaScript text input panel is displayed.
WebUIDelegate.h
Sets the window’s content view frame to the specified content rectangle. (Deprecated in Mac OS X v10.4.11. Content rectangle calculations are automatic.)
- (void)webView:(WebView *)sender setContentRect:(NSRect)contentRect
The web view that sent the message.
The location and size of the window’s content area.
The content view is the highest accessible NSView
object in the view hierarchy displayed in the window. A web view invokes this method instead of setting the content view’s frame directly, allowing delegates to augment the behavior by, for example, avoiding auto-saving of the size.
If this method is not implemented by the delegate, then webView:setFrame:
is invoked with the rectangle returned by sending the NSWindow
method frameRectForContentRect:styleMask:
to the window.
WebUIDelegate.h
Returns a web view window's content rectangle. (Deprecated in Mac OS X v10.4.11. Content rectangle calculations are automatic.)
- (NSRect)webViewContentRect:(WebView *)sender
The web view that sent the message.
The content rectangle of the window that contains the web view.
The content view is the highest accessible NSView
object in the view hierarchy displayed in the window. A web view invokes this method instead of setting the content view’s frame directly, allowing delegates to alter the size that is returned.
WebUIDelegate.h
© 2009 Apple Inc. All Rights Reserved. (Last updated: 2009-03-04)