Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

< Previous PageNext Page > Hide TOC

Deprecated WebUIDelegate Methods

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

Deprecated for Mac OS X v.10.4.11

webView:setContentRect:

Sets the window’s content view frame to contentRect. (Deprecated for Mac OS X v.10.4.11.)

- (void)webView:(WebView *)sender setContentRect:(NSRect)contentRect

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, such as 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 frameRectForContentRect:styleMask: to NSWindow.

Availability
See Also
Declared In
WebUIDelegate.h

webViewContentRect:

Returns a web view window's content rectangle. (Deprecated for Mac OS X v.10.4.11.)

- (NSRect)webViewContentRect:(WebView *)sender

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 returned.

Availability
See Also
Declared In
WebUIDelegate.h

Deprecated in Mac OS X v10.4.11

webView:runJavaScriptAlertPanelWithMessage:

Displays a JavaScript alert panel. (Use the webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame: method instead.) (Deprecated in Mac OS X v10.4.11.)

- (void)webView:(WebView *)sender runJavaScriptAlertPanelWithMessage:(NSString *)message

Discussion

This method is used to display a panel whenJavaScript 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. (Use the webView:runJavaScriptConfirmPanelWithMessage:initiatedByFrame: method instead.) (Deprecated in Mac OS X v10.4.11.)

- (BOOL)webView:(WebView *)sender runJavaScriptConfirmPanelWithMessage:(NSString *)message

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. (Use the webView:runJavaScriptTextInputPanelWithPrompt:defaultText:initiatedByFrame: method instead.) (Deprecated in Mac OS X v10.4.11.)

- (NSString *)webView:(WebView *)sender runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(NSString *)defaultText

Discussion

This method is used to provide an alternate 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

< Previous PageNext Page > Hide TOC


Last updated: 2008-06-19




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.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice