< Previous PageNext Page > Hide TOC

Deprecated WebUIDelegate Methods

A method identified as deprecated has been superseded and may become unsupported in the future.

Deprecated in Mac OS X v10.4.11

webView:runJavaScriptAlertPanelWithMessage:

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

Parameters
sender

The web view that sent the message.

message

The message to display in the alert panel.

Discussion

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.

Availability
See Also
Declared In
WebUIDelegate.h

webView:runJavaScriptConfirmPanelWithMessage:

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

Parameters
sender

The web view that sent the message.

message

The message to display in the confirmation panel.

Discussion

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.

Availability
See Also
Declared In
WebUIDelegate.h

webView:runJavaScriptTextInputPanelWithPrompt:defaultText:

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

Parameters
sender

The web view that sent the message.

prompt

The message to display in the text input panel.

defaultText

Default placeholder text to display in the text field.

Discussion

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.

Availability
See Also
Declared In
WebUIDelegate.h

webView:setContentRect:

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

Parameters
sender

The web view that sent the message.

contentRect

The location and size of the window’s content area.

Discussion

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.

Availability
See Also
Declared In
WebUIDelegate.h

webViewContentRect:

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

Parameters
sender

The web view that sent the message.

Return Value

The content rectangle of the window that contains the web view.

Discussion

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.

Availability
See Also
Declared In
WebUIDelegate.h

< Previous PageNext Page > Hide TOC


© 2009 Apple Inc. All Rights Reserved. (Last updated: 2009-03-04)


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.