Crate objc2_web_kit

Source
Expand description

§Bindings to the WebKit framework

See Apple’s docs and the general docs on framework crates for more information.

§Example

#![deny(unsafe_op_in_unsafe_fn)]
#![allow(clippy::incompatible_msrv)]
#![cfg_attr(not(target_os = "macos"), allow(dead_code, unused))]
use core::cell::OnceCell;

use objc2::{
    define_class, msg_send,
    rc::Retained,
    runtime::{AnyObject, ProtocolObject, Sel},
    sel, DefinedClass, MainThreadMarker, MainThreadOnly,
};
#[allow(deprecated)]
#[cfg(target_os = "macos")]
use objc2_app_kit::{
    NSApplication, NSApplicationActivationPolicy, NSApplicationDelegate, NSBackingStoreType,
    NSBezelStyle, NSButton, NSColor, NSControl, NSControlTextEditingDelegate, NSLayoutAttribute,
    NSMenu, NSMenuItem, NSStackView, NSStackViewDistribution, NSTextField, NSTextFieldDelegate,
    NSTextView, NSUserInterfaceLayoutOrientation, NSWindow, NSWindowStyleMask,
};
use objc2_foundation::{
    ns_string, NSNotification, NSObject, NSObjectProtocol, NSPoint, NSRect, NSSize, NSURLRequest,
    NSURL,
};
#[cfg(target_os = "macos")]
use objc2_web_kit::{WKNavigation, WKNavigationDelegate, WKWebView};

macro_rules! idcell {
    ($name:ident => $this:expr) => {
        $this.ivars().$name.set($name).expect(&format!(
            "ivar should not already be initialized: `{}`",
            stringify!($name)
        ));
    };
    ($name:ident <= $this:expr) => {
        #[rustfmt::skip]
        let Some($name) = $this.ivars().$name.get() else {
            unreachable!(
                "ivar should be initialized: `{}`",
                stringify!($name)
            )
        };
    };
}

#[derive(Default)]
struct Ivars {
    #[cfg(target_os = "macos")]
    nav_url: OnceCell<Retained<NSTextField>>,
    #[cfg(target_os = "macos")]
    web_view: OnceCell<Retained<WKWebView>>,
    #[cfg(target_os = "macos")]
    window: OnceCell<Retained<NSWindow>>,
}

define_class!(
    // SAFETY:
    // - The superclass NSObject does not have any subclassing requirements.
    // - `MainThreadOnly` is correct, since this is an application delegate.
    // - `Delegate` does not implement `Drop`.
    #[unsafe(super(NSObject))]
    #[thread_kind = MainThreadOnly]
    #[name = "Delegate"]
    #[ivars = Ivars]
    struct Delegate;

    unsafe impl NSObjectProtocol for Delegate {}

    #[cfg(target_os = "macos")]
    unsafe impl NSApplicationDelegate for Delegate {
        #[unsafe(method(applicationDidFinishLaunching:))]
        #[allow(non_snake_case)]
        unsafe fn applicationDidFinishLaunching(&self, _notification: &NSNotification) {
            let mtm = self.mtm();
            // create the app window
            let window = {
                let content_rect = NSRect::new(NSPoint::new(0., 0.), NSSize::new(1024., 768.));
                let style = NSWindowStyleMask::Closable
                    | NSWindowStyleMask::Resizable
                    | NSWindowStyleMask::Titled;
                let backing_store_type = NSBackingStoreType::Buffered;
                let flag = false;
                unsafe {
                    NSWindow::initWithContentRect_styleMask_backing_defer(
                        NSWindow::alloc(mtm),
                        content_rect,
                        style,
                        backing_store_type,
                        flag,
                    )
                }
            };

            // create the web view
            let web_view = {
                let frame_rect = NSRect::ZERO;
                unsafe { WKWebView::initWithFrame(WKWebView::alloc(mtm), frame_rect) }
            };

            // create the nav bar view
            let nav_bar = {
                let frame_rect = NSRect::ZERO;
                let this =
                    unsafe { NSStackView::initWithFrame(NSStackView::alloc(mtm), frame_rect) };
                unsafe {
                    this.setOrientation(NSUserInterfaceLayoutOrientation::Horizontal);
                    this.setAlignment(NSLayoutAttribute::Height);
                    this.setDistribution(NSStackViewDistribution::Fill);
                    this.setSpacing(0.);
                }
                this
            };

            // create the nav buttons view
            let nav_buttons = {
                let frame_rect = NSRect::ZERO;
                let this =
                    unsafe { NSStackView::initWithFrame(NSStackView::alloc(mtm), frame_rect) };
                unsafe {
                    this.setOrientation(NSUserInterfaceLayoutOrientation::Horizontal);
                    this.setAlignment(NSLayoutAttribute::Height);
                    this.setDistribution(NSStackViewDistribution::FillEqually);
                    this.setSpacing(0.);
                }
                this
            };

            // create the back button
            let back_button = {
                // configure the button to navigate the webview backward
                let title = ns_string!("back");
                let target = Some::<&AnyObject>(&web_view);
                let action = Some(sel!(goBack));
                let this =
                    unsafe { NSButton::buttonWithTitle_target_action(title, target, action, mtm) };
                #[allow(deprecated)]
                unsafe {
                    this.setBezelStyle(NSBezelStyle::ShadowlessSquare)
                };
                this
            };

            // create the forward button
            let forward_button = {
                // configure the button to navigate the web view forward
                let title = ns_string!("forward");
                let target = Some::<&AnyObject>(&web_view);
                let action = Some(sel!(goForward));
                let this =
                    unsafe { NSButton::buttonWithTitle_target_action(title, target, action, mtm) };
                #[allow(deprecated)]
                unsafe {
                    this.setBezelStyle(NSBezelStyle::ShadowlessSquare)
                };
                this
            };

            unsafe {
                nav_buttons.addArrangedSubview(&back_button);
                nav_buttons.addArrangedSubview(&forward_button);
            }

            // create the url text field
            let nav_url = {
                let frame_rect = NSRect::ZERO;
                let this =
                    unsafe { NSTextField::initWithFrame(NSTextField::alloc(mtm), frame_rect) };
                unsafe {
                    this.setDrawsBackground(true);
                    this.setBackgroundColor(Some(&NSColor::lightGrayColor()));
                    this.setTextColor(Some(&NSColor::blackColor()));
                }
                this
            };

            unsafe {
                nav_bar.addArrangedSubview(&nav_buttons);
                nav_bar.addArrangedSubview(&nav_url);
            }

            // create the window content view
            let content_view = {
                let frame_rect = window.frame();
                let this =
                    unsafe { NSStackView::initWithFrame(NSStackView::alloc(mtm), frame_rect) };
                unsafe {
                    this.setOrientation(NSUserInterfaceLayoutOrientation::Vertical);
                    this.setAlignment(NSLayoutAttribute::Width);
                    this.setDistribution(NSStackViewDistribution::Fill);
                    this.setSpacing(0.);
                }
                this
            };

            unsafe {
                content_view.addArrangedSubview(&nav_bar);
                content_view.addArrangedSubview(&web_view);
            }

            unsafe {
                // handle input from text field (on <ENTER>, load URL from text field in web view)
                let object = ProtocolObject::from_ref(self);
                nav_url.setDelegate(Some(object));

                // handle nav events from web view (on finished navigating, update text area with current URL)
                let object = ProtocolObject::from_ref(self);
                web_view.setNavigationDelegate(Some(object));
            }

            // create the menu with a "quit" entry
            unsafe {
                let menu = NSMenu::initWithTitle(NSMenu::alloc(mtm), ns_string!(""));
                let menu_app_item = NSMenuItem::initWithTitle_action_keyEquivalent(
                    NSMenuItem::alloc(mtm),
                    ns_string!(""),
                    None,
                    ns_string!(""),
                );
                let menu_app_menu = NSMenu::initWithTitle(NSMenu::alloc(mtm), ns_string!(""));
                menu_app_menu.addItemWithTitle_action_keyEquivalent(
                    ns_string!("Quit"),
                    Some(sel!(terminate:)),
                    ns_string!("q"),
                );
                menu_app_item.setSubmenu(Some(&menu_app_menu));
                menu.addItem(&menu_app_item);

                let app = NSApplication::sharedApplication(mtm);
                app.setMainMenu(Some(&menu));
            }

            // configure the window
            window.setContentView(Some(&content_view));
            window.center();
            window.setTitle(ns_string!("browser example"));
            window.makeKeyAndOrderFront(None);

            // request the web view navigate to a page
            unsafe {
                let request = {
                    let url_string = ns_string!("https://google.com");
                    let url = NSURL::URLWithString(url_string).expect("URL should parse");
                    NSURLRequest::requestWithURL(&url)
                };
                web_view.loadRequest(&request);
            }

            idcell!(nav_url => self);
            idcell!(web_view => self);
            idcell!(window => self);
        }
    }

    #[cfg(target_os = "macos")]
    unsafe impl NSControlTextEditingDelegate for Delegate {
        #[unsafe(method(control:textView:doCommandBySelector:))]
        #[allow(non_snake_case)]
        unsafe fn control_textView_doCommandBySelector(
            &self,
            _control: &NSControl,
            text_view: &NSTextView,
            command_selector: Sel,
        ) -> bool {
            idcell!(web_view <= self);
            if command_selector == sel!(insertNewline:) {
                if let Some(url) = unsafe { NSURL::URLWithString(&text_view.string()) } {
                    unsafe { web_view.loadRequest(&NSURLRequest::requestWithURL(&url)) };
                    return true.into();
                }
            }
            false
        }
    }

    #[cfg(target_os = "macos")]
    unsafe impl NSTextFieldDelegate for Delegate {}

    #[cfg(target_os = "macos")] // TODO: Enable this on iOS
    unsafe impl WKNavigationDelegate for Delegate {
        #[unsafe(method(webView:didFinishNavigation:))]
        #[allow(non_snake_case)]
        unsafe fn webView_didFinishNavigation(
            &self,
            web_view: &WKWebView,
            _navigation: Option<&WKNavigation>,
        ) {
            idcell!(nav_url <= self);
            unsafe {
                if let Some(url) = web_view.URL().and_then(|url| url.absoluteString()) {
                    nav_url.setStringValue(&url);
                }
            }
        }
    }
);

impl Delegate {
    fn new(mtm: MainThreadMarker) -> Retained<Self> {
        let this = Self::alloc(mtm);
        let this = this.set_ivars(Ivars::default());
        unsafe { msg_send![super(this), init] }
    }
}

#[cfg(target_os = "macos")]
fn main() {
    let mtm = MainThreadMarker::new().unwrap();
    let app = NSApplication::sharedApplication(mtm);
    app.setActivationPolicy(NSApplicationActivationPolicy::Regular);

    // configure the application delegate
    let delegate = Delegate::new(mtm);
    let object = ProtocolObject::from_ref(&*delegate);
    app.setDelegate(Some(object));

    // run the app
    app.run();
}

#[cfg(not(target_os = "macos"))]
fn main() {
    panic!("This example is currently only supported on macOS");
}

Structs§

DOMAbstractViewDeprecatedDOMAbstractView and DOMObject and WebScriptObject
Apple’s documentation
DOMAttrDeprecatedDOMAttr and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMBlobDeprecatedDOMBlob and DOMObject and WebScriptObject
Apple’s documentation
DOMCDATASectionDeprecatedDOMCDATASection and DOMCharacterData and DOMNode and DOMObject and DOMText and WebScriptObject
Apple’s documentation
DOMCSSCharsetRuleDeprecatedDOMCSSCharsetRule and DOMCSSRule and DOMObject and WebScriptObject
Apple’s documentation
DOMCSSFontFaceRuleDeprecatedDOMCSSFontFaceRule and DOMCSSRule and DOMObject and WebScriptObject
Apple’s documentation
DOMCSSImportRuleDeprecatedDOMCSSImportRule and DOMCSSRule and DOMObject and WebScriptObject
Apple’s documentation
DOMCSSMediaRuleDeprecatedDOMCSSMediaRule and DOMCSSRule and DOMObject and WebScriptObject
Apple’s documentation
DOMCSSPageRuleDeprecatedDOMCSSPageRule and DOMCSSRule and DOMObject and WebScriptObject
Apple’s documentation
DOMCSSPrimitiveValueDeprecatedDOMCSSPrimitiveValue and DOMCSSValue and DOMObject and WebScriptObject
Apple’s documentation
DOMCSSRuleDeprecatedDOMCSSRule and DOMObject and WebScriptObject
Apple’s documentation
DOMCSSRuleListDeprecatedDOMCSSRuleList and DOMObject and WebScriptObject
Apple’s documentation
DOMCSSStyleDeclarationDeprecatedDOMCSSStyleDeclaration and DOMObject and WebScriptObject
Apple’s documentation
DOMCSSStyleRuleDeprecatedDOMCSSRule and DOMCSSStyleRule and DOMObject and WebScriptObject
Apple’s documentation
DOMCSSStyleSheetDeprecatedDOMCSSStyleSheet and DOMObject and DOMStyleSheet and WebScriptObject
Apple’s documentation
DOMCSSUnknownRuleDeprecatedDOMCSSRule and DOMCSSUnknownRule and DOMObject and WebScriptObject
Apple’s documentation
DOMCSSValueDeprecatedDOMCSSValue and DOMObject and WebScriptObject
Apple’s documentation
DOMCSSValueListDeprecatedDOMCSSValue and DOMCSSValueList and DOMObject and WebScriptObject
Apple’s documentation
DOMCharacterDataDeprecatedDOMCharacterData and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMCommentDeprecatedDOMCharacterData and DOMComment and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMCounterDeprecatedDOMCounter and DOMObject and WebScriptObject
Apple’s documentation
DOMDocumentDeprecatedDOMDocument and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMDocumentFragmentDeprecatedDOMDocumentFragment and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMDocumentTypeDeprecatedDOMDocumentType and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMElementDeprecatedDOMElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMEntityDeprecatedDOMEntity and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMEntityReferenceDeprecatedDOMEntityReference and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMEventDeprecatedDOMEvent and DOMObject and WebScriptObject
Apple’s documentation
DOMEventExceptionCodeDeprecatedDOMEventException
Apple’s documentation
DOMExceptionCodeDeprecatedDOMException
Apple’s documentation
DOMFileDeprecatedDOMBlob and DOMFile and DOMObject and WebScriptObject
Apple’s documentation
DOMFileListDeprecatedDOMFileList and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLAnchorElementDeprecatedDOMElement and DOMHTMLAnchorElement and DOMHTMLElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLAppletElementDeprecatedDOMElement and DOMHTMLAppletElement and DOMHTMLElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLAreaElementDeprecatedDOMElement and DOMHTMLAreaElement and DOMHTMLElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLBRElementDeprecatedDOMElement and DOMHTMLBRElement and DOMHTMLElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLBaseElementDeprecatedDOMElement and DOMHTMLBaseElement and DOMHTMLElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLBaseFontElementDeprecatedDOMElement and DOMHTMLBaseFontElement and DOMHTMLElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLBodyElementDeprecatedDOMElement and DOMHTMLBodyElement and DOMHTMLElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLButtonElementDeprecatedDOMElement and DOMHTMLButtonElement and DOMHTMLElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLCollectionDeprecatedDOMHTMLCollection and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLDListElementDeprecatedDOMElement and DOMHTMLDListElement and DOMHTMLElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLDirectoryElementDeprecatedDOMElement and DOMHTMLDirectoryElement and DOMHTMLElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLDivElementDeprecatedDOMElement and DOMHTMLDivElement and DOMHTMLElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLDocumentDeprecatedDOMDocument and DOMHTMLDocument and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLElementDeprecatedDOMElement and DOMHTMLElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLEmbedElementDeprecatedDOMElement and DOMHTMLElement and DOMHTMLEmbedElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLFieldSetElementDeprecatedDOMElement and DOMHTMLElement and DOMHTMLFieldSetElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLFontElementDeprecatedDOMElement and DOMHTMLElement and DOMHTMLFontElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLFormElementDeprecatedDOMElement and DOMHTMLElement and DOMHTMLFormElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLFrameElementDeprecatedDOMElement and DOMHTMLElement and DOMHTMLFrameElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLFrameSetElementDeprecatedDOMElement and DOMHTMLElement and DOMHTMLFrameSetElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLHRElementDeprecatedDOMElement and DOMHTMLElement and DOMHTMLHRElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLHeadElementDeprecatedDOMElement and DOMHTMLElement and DOMHTMLHeadElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLHeadingElementDeprecatedDOMElement and DOMHTMLElement and DOMHTMLHeadingElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLHtmlElementDeprecatedDOMElement and DOMHTMLElement and DOMHTMLHtmlElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLIFrameElementDeprecatedDOMElement and DOMHTMLElement and DOMHTMLIFrameElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLImageElementDeprecatedDOMElement and DOMHTMLElement and DOMHTMLImageElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLInputElementDeprecatedDOMElement and DOMHTMLElement and DOMHTMLInputElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLLIElementDeprecatedDOMElement and DOMHTMLElement and DOMHTMLLIElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLLabelElementDeprecatedDOMElement and DOMHTMLElement and DOMHTMLLabelElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLLegendElementDeprecatedDOMElement and DOMHTMLElement and DOMHTMLLegendElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLLinkElementDeprecatedDOMElement and DOMHTMLElement and DOMHTMLLinkElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLMapElementDeprecatedDOMElement and DOMHTMLElement and DOMHTMLMapElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLMarqueeElementDeprecatedDOMElement and DOMHTMLElement and DOMHTMLMarqueeElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLMenuElementDeprecatedDOMElement and DOMHTMLElement and DOMHTMLMenuElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLMetaElementDeprecatedDOMElement and DOMHTMLElement and DOMHTMLMetaElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLModElementDeprecatedDOMElement and DOMHTMLElement and DOMHTMLModElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLOListElementDeprecatedDOMElement and DOMHTMLElement and DOMHTMLOListElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLObjectElementDeprecatedDOMElement and DOMHTMLElement and DOMHTMLObjectElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLOptGroupElementDeprecatedDOMElement and DOMHTMLElement and DOMHTMLOptGroupElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLOptionElementDeprecatedDOMElement and DOMHTMLElement and DOMHTMLOptionElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLOptionsCollectionDeprecatedDOMHTMLOptionsCollection and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLParagraphElementDeprecatedDOMElement and DOMHTMLElement and DOMHTMLParagraphElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLParamElementDeprecatedDOMElement and DOMHTMLElement and DOMHTMLParamElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLPreElementDeprecatedDOMElement and DOMHTMLElement and DOMHTMLPreElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLQuoteElementDeprecatedDOMElement and DOMHTMLElement and DOMHTMLQuoteElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLScriptElementDeprecatedDOMElement and DOMHTMLElement and DOMHTMLScriptElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLSelectElementDeprecatedDOMElement and DOMHTMLElement and DOMHTMLSelectElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLStyleElementDeprecatedDOMElement and DOMHTMLElement and DOMHTMLStyleElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLTableCaptionElementDeprecatedDOMElement and DOMHTMLElement and DOMHTMLTableCaptionElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLTableCellElementDeprecatedDOMElement and DOMHTMLElement and DOMHTMLTableCellElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLTableColElementDeprecatedDOMElement and DOMHTMLElement and DOMHTMLTableColElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLTableElementDeprecatedDOMElement and DOMHTMLElement and DOMHTMLTableElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLTableRowElementDeprecatedDOMElement and DOMHTMLElement and DOMHTMLTableRowElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLTableSectionElementDeprecatedDOMElement and DOMHTMLElement and DOMHTMLTableSectionElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLTextAreaElementDeprecatedDOMElement and DOMHTMLElement and DOMHTMLTextAreaElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLTitleElementDeprecatedDOMElement and DOMHTMLElement and DOMHTMLTitleElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMHTMLUListElementDeprecatedDOMElement and DOMHTMLElement and DOMHTMLUListElement and DOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMImplementationDeprecatedDOMImplementation and DOMObject and WebScriptObject
Apple’s documentation
DOMKeyboardEventDeprecatedDOMEvent and DOMKeyboardEvent and DOMObject and DOMUIEvent and WebScriptObject
Apple’s documentation
DOMMediaListDeprecatedDOMMediaList and DOMObject and WebScriptObject
Apple’s documentation
DOMMouseEventDeprecatedDOMEvent and DOMMouseEvent and DOMObject and DOMUIEvent and WebScriptObject
Apple’s documentation
DOMMutationEventDeprecatedDOMEvent and DOMMutationEvent and DOMObject and WebScriptObject
Apple’s documentation
DOMNamedNodeMapDeprecatedDOMNamedNodeMap and DOMObject and WebScriptObject
Apple’s documentation
DOMNodeDeprecatedDOMNode and DOMObject and WebScriptObject
Apple’s documentation
DOMNodeIteratorDeprecatedDOMNodeIterator and DOMObject and WebScriptObject
Apple’s documentation
DOMNodeListDeprecatedDOMNodeList and DOMObject and WebScriptObject
Apple’s documentation
DOMObjectDeprecatedDOMObject and WebScriptObject
Apple’s documentation
DOMOverflowEventDeprecatedDOMEvent and DOMObject and DOMOverflowEvent and WebScriptObject
Apple’s documentation
DOMProcessingInstructionDeprecatedDOMCharacterData and DOMNode and DOMObject and DOMProcessingInstruction and WebScriptObject
Apple’s documentation
DOMProgressEventDeprecatedDOMEvent and DOMObject and DOMProgressEvent and WebScriptObject
Apple’s documentation
DOMRGBColorDeprecatedDOMObject and DOMRGBColor and WebScriptObject
Apple’s documentation
DOMRangeDeprecatedDOMObject and DOMRange and WebScriptObject
Apple’s documentation
DOMRangeExceptionCodeDeprecatedDOMRangeException
Apple’s documentation
DOMRectDeprecatedDOMObject and DOMRect and WebScriptObject
Apple’s documentation
DOMStyleSheetDeprecatedDOMObject and DOMStyleSheet and WebScriptObject
Apple’s documentation
DOMStyleSheetListDeprecatedDOMObject and DOMStyleSheetList and WebScriptObject
Apple’s documentation
DOMTextDeprecatedDOMCharacterData and DOMNode and DOMObject and DOMText and WebScriptObject
Apple’s documentation
DOMTreeWalkerDeprecatedDOMObject and DOMTreeWalker and WebScriptObject
Apple’s documentation
DOMUIEventDeprecatedDOMEvent and DOMObject and DOMUIEvent and WebScriptObject
Apple’s documentation
DOMWheelEventDeprecatedDOMEvent and DOMMouseEvent and DOMObject and DOMUIEvent and DOMWheelEvent and WebScriptObject
Apple’s documentation
DOMXPathExceptionCodeDeprecatedDOMXPathException
Apple’s documentation
DOMXPathExpressionDeprecatedDOMObject and DOMXPathExpression and WebScriptObject
Apple’s documentation
DOMXPathResultDeprecatedDOMObject and DOMXPathResult and WebScriptObject
Apple’s documentation
WKAudiovisualMediaTypesWKWebViewConfiguration
The types of audiovisual media which will require a user gesture to begin playing.
WKBackForwardListWKBackForwardList
A WKBackForwardList object is a list of webpages previously visited in a web view that can be reached by going back or forward.
WKBackForwardListItemWKBackForwardListItem
A WKBackForwardListItem object represents a webpage in the back-forward list of a web view.
WKContentModeWKWebpagePreferences
A content mode represents the type of content to load, as well as additional layout and rendering adaptations that are applied as a result of loading the content
WKContentRuleListWKContentRuleList
Apple’s documentation
WKContentRuleListStoreWKContentRuleListStore
Apple’s documentation
WKContentWorldWKContentWorld
A WKContentWorld object allows you to separate your application’s interaction with content displayed in a WKWebView into different roles that cannot interfere with one another.
WKCookiePolicyWKHTTPCookieStore
Apple’s documentation
WKDialogResultWKUIDelegate
Constants returned by showLockdownModeFirstUseMessage to indicate how WebKit should treat first use.
WKDownloadWKDownload
Apple’s documentation
WKDownloadPlaceholderPolicyWKDownloadDelegate
Apple’s documentation
WKDownloadRedirectPolicyWKDownloadDelegate
Apple’s documentation
WKErrorCodeWKError
Constants used by NSError to indicate errors in the WebKit domain.
WKFindConfigurationWKFindConfiguration
Apple’s documentation
WKFindResultWKFindResult
Apple’s documentation
WKFrameInfoWKFrameInfo
A WKFrameInfo object contains information about a frame on a webpage.
WKFullscreenStateWKWebView
Apple’s documentation
WKHTTPCookieStoreWKHTTPCookieStore
A WKHTTPCookieStore object allows managing the HTTP cookies associated with a particular WKWebsiteDataStore.
WKInactiveSchedulingPolicyWKPreferences
Apple’s documentation
WKMediaCaptureStateWKWebView
Apple’s documentation
WKMediaCaptureTypeWKUIDelegate
Apple’s documentation
WKMediaPlaybackStateWKWebView
Apple’s documentation
WKNavigationWKNavigation
A WKNavigation object can be used for tracking the loading progress of a webpage.
WKNavigationActionWKNavigationAction
A WKNavigationAction object contains information about an action that may cause a navigation, used for making policy decisions.
WKNavigationActionPolicyWKNavigationDelegate
The policy to pass back to the decision handler from the webView:decidePolicyForNavigationAction:decisionHandler: method.
WKNavigationResponseWKNavigationResponse
Contains information about a navigation response, used for making policy decisions.
WKNavigationResponsePolicyWKNavigationDelegate
The policy to pass back to the decision handler from the webView:decidePolicyForNavigationResponse:decisionHandler: method.
WKNavigationTypeWKNavigationAction
The type of action triggering a navigation.
WKOpenPanelParametersWKOpenPanelParameters
WKOpenPanelParameters contains parameters that a file upload control has specified.
WKPDFConfigurationWKPDFConfiguration
Apple’s documentation
WKPermissionDecisionWKUIDelegate
Apple’s documentation
WKPreferencesWKPreferences
A WKPreferences object encapsulates the preference settings for a web view. The preferences object associated with a web view is specified by its web view configuration.
WKProcessPoolWKProcessPool
A WKProcessPool object represents a pool of web content processes. The process pool associated with a web view is specified by its web view configuration. Each web view is given its own web content process until an implementation-defined process limit is reached; after that, web views with the same process pool end up sharing web content processes.
WKScriptMessageWKScriptMessage
A WKScriptMessage object contains information about a message sent from a webpage.
WKSecurityOriginWKSecurityOrigin
A WKSecurityOrigin object contains information about a security origin.
WKSnapshotConfigurationWKSnapshotConfiguration
Apple’s documentation
WKUserContentControllerWKUserContentController
A WKUserContentController object provides a way for JavaScript to post messages to a web view. The user content controller associated with a web view is specified by its web view configuration.
WKUserInterfaceDirectionPolicyWKWebViewConfiguration
The policy used to determine the directionality of user interface elements inside a web view.
WKUserScriptWKUserScript
A
WKUserScriptInjectionTimeWKUserScript
when a user script should be injected into a webpage.
WKWebViewConfigurationWKWebViewConfiguration
A WKWebViewConfiguration object is a collection of properties with which to initialize a web view.
WKWebpagePreferencesWKWebpagePreferences
A WKWebpagePreferences object is a collection of properties that determine the preferences to use when loading and rendering a page.
WKWebpagePreferencesUpgradeToHTTPSPolicyWKWebpagePreferences
A secure navigation policy represents whether or not there is a preference for loading a webpage with https, and how failures should be handled.
WKWebsiteDataRecordWKWebsiteDataRecord
A WKWebsiteDataRecord represents website data, grouped by domain name using the public suffix list.
WKWebsiteDataStoreWKWebsiteDataStore
A WKWebsiteDataStore represents various types of data that a website might make use of. This includes cookies, disk and memory caches, and persistent data such as WebSQL, IndexedDB databases, and local storage.
WKWindowFeaturesWKWindowFeatures
WKWindowFeatures specifies optional attributes for the containing window when a new WKWebView is requested.
WebArchiveDeprecatedWebArchive
WebArchive represents a main resource as well as all the subresources and subframes associated with the main resource. The main resource can be an entire web page, a portion of a web page, or some other kind of data such as an image. This class can be used for saving standalone web pages, representing portions of a web page on the pasteboard, or any other application where one class is needed to represent rich web content.
WebBackForwardListDeprecatedWebBackForwardList
WebBackForwardList holds an ordered list of WebHistoryItems that comprises the back and forward lists.
WebCacheModelDeprecatedWebPreferences
Specifies a usage model for a WebView, which WebKit will use to determine its caching behavior.
WebDataSourceDeprecatedWebDataSource
A WebDataSource represents the data associated with a web page. A datasource has a WebDocumentRepresentation which holds an appropriate representation of the data. WebDataSources manage a hierarchy of WebFrames. WebDataSources are typically related to a view by their containing WebFrame.
WebDownloadDeprecatedWebDownload
A WebDownload works just like an NSURLDownload, with one extra feature: if you do not implement the authentication-related delegate methods, it will automatically prompt for authentication using the standard WebKit authentication panel, as either a sheet or window. It provides no extra methods, but does have one additional delegate method.
WebDragDestinationActionDeprecatedWebUIDelegate
Actions that the destination of a drag can perform.
WebDragSourceActionDeprecatedWebUIDelegate
Actions that the source of a drag can perform.
WebFrameDeprecatedWebFrame
Every web page is represented by at least one WebFrame. A WebFrame has a WebFrameView and a WebDataSource.
WebHistoryDeprecatedWebHistory
WebHistory is used to track pages that have been loaded by WebKit.
WebHistoryItemDeprecatedWebHistoryItem
WebHistoryItems are created by WebKit to represent pages visited. The WebBackForwardList and WebHistory classes both use WebHistoryItems to represent pages visited. With the exception of the displayTitle, the properties of WebHistoryItems are set by WebKit. WebHistoryItems are normally never created directly.
WebNavigationTypeDeprecatedWebPolicyDelegate
The type of action that triggered a possible navigation.
WebPreferencesDeprecatedWebPreferences
Apple’s documentation
WebResourceWebResource
A WebResource represents a fully downloaded URL. It includes the data of the resource as well as the metadata associated with the resource.
WebScriptObjectDeprecatedWebScriptObject
WebScriptObjects are used to wrap script objects passed from script environments to Objective-C. WebScriptObjects cannot be created directly. In normal uses of WebKit, you gain access to the script environment using the “windowScriptObject” method on WebView.
WebUndefinedDeprecatedWebScriptObject
Apple’s documentation
WebViewInsertActionDeprecatedWebEditingDelegate
Apple’s documentation

Constants§

DOM_ADDITIONDeprecatedDOMMutationEvent
Apple’s documentation
DOM_ALLOW_KEYBOARD_INPUTDeprecatedDOMElement
Apple’s documentation
DOM_ANY_TYPEDeprecatedDOMXPathResult
Apple’s documentation
DOM_ANY_UNORDERED_NODE_TYPEDeprecatedDOMXPathResult
Apple’s documentation
DOM_ATTRIBUTE_NODEDeprecatedDOMNode
Apple’s documentation
DOM_AT_TARGETDeprecatedDOMEvent
Apple’s documentation
DOM_BOOLEAN_TYPEDeprecatedDOMXPathResult
Apple’s documentation
DOM_BOTHDeprecatedDOMOverflowEvent
Apple’s documentation
DOM_BUBBLING_PHASEDeprecatedDOMEvent
Apple’s documentation
DOM_CAPTURING_PHASEDeprecatedDOMEvent
Apple’s documentation
DOM_CDATA_SECTION_NODEDeprecatedDOMNode
Apple’s documentation
DOM_CHARSET_RULEDeprecatedDOMCSSRule
Apple’s documentation
DOM_COMMENT_NODEDeprecatedDOMNode
Apple’s documentation
DOM_CSS_ATTRDeprecatedDOMCSSPrimitiveValue
Apple’s documentation
DOM_CSS_CMDeprecatedDOMCSSPrimitiveValue
Apple’s documentation
DOM_CSS_COUNTERDeprecatedDOMCSSPrimitiveValue
Apple’s documentation
DOM_CSS_CUSTOMDeprecatedDOMCSSValue
Apple’s documentation
DOM_CSS_DEGDeprecatedDOMCSSPrimitiveValue
Apple’s documentation
DOM_CSS_DIMENSIONDeprecatedDOMCSSPrimitiveValue
Apple’s documentation
DOM_CSS_EMSDeprecatedDOMCSSPrimitiveValue
Apple’s documentation
DOM_CSS_EXSDeprecatedDOMCSSPrimitiveValue
Apple’s documentation
DOM_CSS_GRADDeprecatedDOMCSSPrimitiveValue
Apple’s documentation
DOM_CSS_HZDeprecatedDOMCSSPrimitiveValue
Apple’s documentation
DOM_CSS_IDENTDeprecatedDOMCSSPrimitiveValue
Apple’s documentation
DOM_CSS_INDeprecatedDOMCSSPrimitiveValue
Apple’s documentation
DOM_CSS_INHERITDeprecatedDOMCSSValue
Apple’s documentation
DOM_CSS_KHZDeprecatedDOMCSSPrimitiveValue
Apple’s documentation
DOM_CSS_MMDeprecatedDOMCSSPrimitiveValue
Apple’s documentation
DOM_CSS_MSDeprecatedDOMCSSPrimitiveValue
Apple’s documentation
DOM_CSS_NUMBERDeprecatedDOMCSSPrimitiveValue
Apple’s documentation
DOM_CSS_PCDeprecatedDOMCSSPrimitiveValue
Apple’s documentation
DOM_CSS_PERCENTAGEDeprecatedDOMCSSPrimitiveValue
Apple’s documentation
DOM_CSS_PRIMITIVE_VALUEDeprecatedDOMCSSValue
Apple’s documentation
DOM_CSS_PTDeprecatedDOMCSSPrimitiveValue
Apple’s documentation
DOM_CSS_PXDeprecatedDOMCSSPrimitiveValue
Apple’s documentation
DOM_CSS_RADDeprecatedDOMCSSPrimitiveValue
Apple’s documentation
DOM_CSS_RECTDeprecatedDOMCSSPrimitiveValue
Apple’s documentation
DOM_CSS_RGBCOLORDeprecatedDOMCSSPrimitiveValue
Apple’s documentation
DOM_CSS_SDeprecatedDOMCSSPrimitiveValue
Apple’s documentation
DOM_CSS_STRINGDeprecatedDOMCSSPrimitiveValue
Apple’s documentation
DOM_CSS_UNKNOWNDeprecatedDOMCSSPrimitiveValue
Apple’s documentation
DOM_CSS_URIDeprecatedDOMCSSPrimitiveValue
Apple’s documentation
DOM_CSS_VALUE_LISTDeprecatedDOMCSSValue
Apple’s documentation
DOM_CSS_VHDeprecatedDOMCSSPrimitiveValue
Apple’s documentation
DOM_CSS_VMAXDeprecatedDOMCSSPrimitiveValue
Apple’s documentation
DOM_CSS_VMINDeprecatedDOMCSSPrimitiveValue
Apple’s documentation
DOM_CSS_VWDeprecatedDOMCSSPrimitiveValue
Apple’s documentation
DOM_DOCUMENT_FRAGMENT_NODEDeprecatedDOMNode
Apple’s documentation
DOM_DOCUMENT_NODEDeprecatedDOMNode
Apple’s documentation
DOM_DOCUMENT_POSITION_CONTAINED_BYDeprecatedDOMNode
Apple’s documentation
DOM_DOCUMENT_POSITION_CONTAINSDeprecatedDOMNode
Apple’s documentation
DOM_DOCUMENT_POSITION_DISCONNECTEDDeprecatedDOMNode
Apple’s documentation
DOM_DOCUMENT_POSITION_FOLLOWINGDeprecatedDOMNode
Apple’s documentation
DOM_DOCUMENT_POSITION_IMPLEMENTATION_SPECIFICDeprecatedDOMNode
Apple’s documentation
DOM_DOCUMENT_POSITION_PRECEDINGDeprecatedDOMNode
Apple’s documentation
DOM_DOCUMENT_TYPE_NODEDeprecatedDOMNode
Apple’s documentation
DOM_DOM_DELTA_LINEDeprecatedDOMWheelEvent
Apple’s documentation
DOM_DOM_DELTA_PAGEDeprecatedDOMWheelEvent
Apple’s documentation
DOM_DOM_DELTA_PIXELDeprecatedDOMWheelEvent
Apple’s documentation
DOM_ELEMENT_NODEDeprecatedDOMNode
Apple’s documentation
DOM_END_TO_ENDDeprecatedDOMRange
Apple’s documentation
DOM_END_TO_STARTDeprecatedDOMRange
Apple’s documentation
DOM_ENTITY_NODEDeprecatedDOMNode
Apple’s documentation
DOM_ENTITY_REFERENCE_NODEDeprecatedDOMNode
Apple’s documentation
DOM_FILTER_ACCEPTDeprecatedDOMNodeFilter
Apple’s documentation
DOM_FILTER_REJECTDeprecatedDOMNodeFilter
Apple’s documentation
DOM_FILTER_SKIPDeprecatedDOMNodeFilter
Apple’s documentation
DOM_FIRST_ORDERED_NODE_TYPEDeprecatedDOMXPathResult
Apple’s documentation
DOM_FONT_FACE_RULEDeprecatedDOMCSSRule
Apple’s documentation
DOM_HORIZONTALDeprecatedDOMOverflowEvent
Apple’s documentation
DOM_IMPORT_RULEDeprecatedDOMCSSRule
Apple’s documentation
DOM_KEYFRAMES_RULEDeprecatedDOMCSSRule
Apple’s documentation
DOM_KEYFRAME_RULEDeprecatedDOMCSSRule
Apple’s documentation
DOM_KEY_LOCATION_LEFTDeprecatedDOMKeyboardEvent
Apple’s documentation
DOM_KEY_LOCATION_NUMPADDeprecatedDOMKeyboardEvent
Apple’s documentation
DOM_KEY_LOCATION_RIGHTDeprecatedDOMKeyboardEvent
Apple’s documentation
DOM_KEY_LOCATION_STANDARDDeprecatedDOMKeyboardEvent
Apple’s documentation
DOM_MEDIA_RULEDeprecatedDOMCSSRule
Apple’s documentation
DOM_MODIFICATIONDeprecatedDOMMutationEvent
Apple’s documentation
DOM_NAMESPACE_RULEDeprecatedDOMCSSRule
Apple’s documentation
DOM_NODE_AFTERDeprecatedDOMRange
Apple’s documentation
DOM_NODE_BEFOREDeprecatedDOMRange
Apple’s documentation
DOM_NODE_BEFORE_AND_AFTERDeprecatedDOMRange
Apple’s documentation
DOM_NODE_INSIDEDeprecatedDOMRange
Apple’s documentation
DOM_NONEDeprecatedDOMEvent
Apple’s documentation
DOM_NOTATION_NODEDeprecatedDOMNode
Apple’s documentation
DOM_NUMBER_TYPEDeprecatedDOMXPathResult
Apple’s documentation
DOM_ORDERED_NODE_ITERATOR_TYPEDeprecatedDOMXPathResult
Apple’s documentation
DOM_ORDERED_NODE_SNAPSHOT_TYPEDeprecatedDOMXPathResult
Apple’s documentation
DOM_PAGE_RULEDeprecatedDOMCSSRule
Apple’s documentation
DOM_PROCESSING_INSTRUCTION_NODEDeprecatedDOMNode
Apple’s documentation
DOM_REMOVALDeprecatedDOMMutationEvent
Apple’s documentation
DOM_SHOW_ALLDeprecatedDOMNodeFilter
Apple’s documentation
DOM_SHOW_ATTRIBUTEDeprecatedDOMNodeFilter
Apple’s documentation
DOM_SHOW_CDATA_SECTIONDeprecatedDOMNodeFilter
Apple’s documentation
DOM_SHOW_COMMENTDeprecatedDOMNodeFilter
Apple’s documentation
DOM_SHOW_DOCUMENTDeprecatedDOMNodeFilter
Apple’s documentation
DOM_SHOW_DOCUMENT_FRAGMENTDeprecatedDOMNodeFilter
Apple’s documentation
DOM_SHOW_DOCUMENT_TYPEDeprecatedDOMNodeFilter
Apple’s documentation
DOM_SHOW_ELEMENTDeprecatedDOMNodeFilter
Apple’s documentation
DOM_SHOW_ENTITYDeprecatedDOMNodeFilter
Apple’s documentation
DOM_SHOW_ENTITY_REFERENCEDeprecatedDOMNodeFilter
Apple’s documentation
DOM_SHOW_NOTATIONDeprecatedDOMNodeFilter
Apple’s documentation
DOM_SHOW_PROCESSING_INSTRUCTIONDeprecatedDOMNodeFilter
Apple’s documentation
DOM_SHOW_TEXTDeprecatedDOMNodeFilter
Apple’s documentation
DOM_START_TO_ENDDeprecatedDOMRange
Apple’s documentation
DOM_START_TO_STARTDeprecatedDOMRange
Apple’s documentation
DOM_STRING_TYPEDeprecatedDOMXPathResult
Apple’s documentation
DOM_STYLE_RULEDeprecatedDOMCSSRule
Apple’s documentation
DOM_SUPPORTS_RULEDeprecatedDOMCSSRule
Apple’s documentation
DOM_TEXT_NODEDeprecatedDOMNode
Apple’s documentation
DOM_UNKNOWN_RULEDeprecatedDOMCSSRule
Apple’s documentation
DOM_UNORDERED_NODE_ITERATOR_TYPEDeprecatedDOMXPathResult
Apple’s documentation
DOM_UNORDERED_NODE_SNAPSHOT_TYPEDeprecatedDOMXPathResult
Apple’s documentation
DOM_VERTICALDeprecatedDOMOverflowEvent
Apple’s documentation
DOM_WEBKIT_KEYFRAMES_RULEDeprecatedDOMCSSRule
Apple’s documentation
DOM_WEBKIT_KEYFRAME_RULEDeprecatedDOMCSSRule
Apple’s documentation
DOM_WEBKIT_REGION_RULEDeprecatedDOMCSSRule
Apple’s documentation
WebKitErrorBlockedPlugInVersionDeprecatedWebKitErrors
Apple’s documentation
WebKitErrorCannotFindPlugInDeprecatedWebKitErrors
Apple’s documentation
WebKitErrorCannotLoadPlugInDeprecatedWebKitErrors
Apple’s documentation
WebKitErrorCannotShowMIMETypeDeprecatedWebKitErrors
Apple’s documentation
WebKitErrorCannotShowURLDeprecatedWebKitErrors
Apple’s documentation
WebKitErrorFrameLoadInterruptedByPolicyChangeDeprecatedWebKitErrors
Apple’s documentation
WebKitErrorJavaUnavailableDeprecatedWebKitErrors
Apple’s documentation
WebMenuItemPDFActualSizeDeprecatedWebUIDelegate
Apple’s documentation
WebMenuItemPDFAutoSizeDeprecatedWebUIDelegate
Apple’s documentation
WebMenuItemPDFContinuousDeprecatedWebUIDelegate
Apple’s documentation
WebMenuItemPDFFacingPagesDeprecatedWebUIDelegate
Apple’s documentation
WebMenuItemPDFNextPageDeprecatedWebUIDelegate
Apple’s documentation
WebMenuItemPDFPreviousPageDeprecatedWebUIDelegate
Apple’s documentation
WebMenuItemPDFSinglePageDeprecatedWebUIDelegate
Apple’s documentation
WebMenuItemPDFZoomInDeprecatedWebUIDelegate
Apple’s documentation
WebMenuItemPDFZoomOutDeprecatedWebUIDelegate
Apple’s documentation
WebMenuItemTagCopyDeprecatedWebUIDelegate
Apple’s documentation
WebMenuItemTagCopyImageToClipboardDeprecatedWebUIDelegate
Apple’s documentation
WebMenuItemTagCopyLinkToClipboardDeprecatedWebUIDelegate
Apple’s documentation
WebMenuItemTagCutDeprecatedWebUIDelegate
Apple’s documentation
WebMenuItemTagDownloadImageToDiskDeprecatedWebUIDelegate
Apple’s documentation
WebMenuItemTagDownloadLinkToDiskDeprecatedWebUIDelegate
Apple’s documentation
WebMenuItemTagGoBackDeprecatedWebUIDelegate
Apple’s documentation
WebMenuItemTagGoForwardDeprecatedWebUIDelegate
Apple’s documentation
WebMenuItemTagIgnoreSpellingDeprecatedWebUIDelegate
Apple’s documentation
WebMenuItemTagLearnSpellingDeprecatedWebUIDelegate
Apple’s documentation
WebMenuItemTagLookUpInDictionaryDeprecatedWebUIDelegate
Apple’s documentation
WebMenuItemTagNoGuessesFoundDeprecatedWebUIDelegate
Apple’s documentation
WebMenuItemTagOpenFrameInNewWindowDeprecatedWebUIDelegate
Apple’s documentation
WebMenuItemTagOpenImageInNewWindowDeprecatedWebUIDelegate
Apple’s documentation
WebMenuItemTagOpenLinkInNewWindowDeprecatedWebUIDelegate
Apple’s documentation
WebMenuItemTagOpenWithDefaultApplicationDeprecatedWebUIDelegate
Apple’s documentation
WebMenuItemTagOtherDeprecatedWebUIDelegate
Apple’s documentation
WebMenuItemTagPasteDeprecatedWebUIDelegate
Apple’s documentation
WebMenuItemTagReloadDeprecatedWebUIDelegate
Apple’s documentation
WebMenuItemTagSearchInSpotlightDeprecatedWebUIDelegate
Apple’s documentation
WebMenuItemTagSearchWebDeprecatedWebUIDelegate
Apple’s documentation
WebMenuItemTagSpellingGuessDeprecatedWebUIDelegate
Apple’s documentation
WebMenuItemTagStopDeprecatedWebUIDelegate
Apple’s documentation

Statics§

DOMEventExceptionDOMEventException
Apple’s documentation
DOMExceptionDOMException
Apple’s documentation
DOMRangeExceptionDOMRangeException
Apple’s documentation
DOMXPathExceptionDOMXPathException
Apple’s documentation
WKErrorDomainWKError
Apple’s documentation
WKWebsiteDataTypeCookiesWKWebsiteDataRecord
Apple’s documentation
WKWebsiteDataTypeDiskCacheWKWebsiteDataRecord
Apple’s documentation
WKWebsiteDataTypeFetchCacheWKWebsiteDataRecord
Apple’s documentation
WKWebsiteDataTypeFileSystemWKWebsiteDataRecord
Apple’s documentation
WKWebsiteDataTypeHashSaltWKWebsiteDataRecord
Apple’s documentation
WKWebsiteDataTypeIndexedDBDatabasesWKWebsiteDataRecord
Apple’s documentation
WKWebsiteDataTypeLocalStorageWKWebsiteDataRecord
Apple’s documentation
WKWebsiteDataTypeMediaKeysWKWebsiteDataRecord
Apple’s documentation
WKWebsiteDataTypeMemoryCacheWKWebsiteDataRecord
Apple’s documentation
WKWebsiteDataTypeOfflineWebApplicationCacheWKWebsiteDataRecord
Apple’s documentation
WKWebsiteDataTypeSearchFieldRecentSearchesWKWebsiteDataRecord
Apple’s documentation
WKWebsiteDataTypeServiceWorkerRegistrationsWKWebsiteDataRecord
Apple’s documentation
WKWebsiteDataTypeSessionStorageWKWebsiteDataRecord
Apple’s documentation
WKWebsiteDataTypeWebSQLDatabasesWKWebsiteDataRecord
Apple’s documentation
WebActionButtonKeyWebPolicyDelegate
Apple’s documentation
WebActionElementKeyWebPolicyDelegate
Apple’s documentation
WebActionModifierFlagsKeyWebPolicyDelegate
Apple’s documentation
WebActionNavigationTypeKeyWebPolicyDelegate
Apple’s documentation
WebActionOriginalURLKeyWebPolicyDelegate
Apple’s documentation
WebArchivePboardTypeWebArchive
The pasteboard type constant used when adding or accessing a WebArchive on the pasteboard.
WebElementDOMNodeKeyWebView
Apple’s documentation
WebElementFrameKeyWebView
Apple’s documentation
WebElementImageAltStringKeyWebView
Apple’s documentation
WebElementImageKeyWebView
Apple’s documentation
WebElementImageRectKeyWebView
Apple’s documentation
WebElementImageURLKeyWebView
Apple’s documentation
WebElementIsSelectedKeyWebView
Apple’s documentation
WebElementLinkLabelKeyWebView
Apple’s documentation
WebElementLinkTargetFrameKeyWebView
Apple’s documentation
WebElementLinkTitleKeyWebView
Apple’s documentation
WebElementLinkURLKeyWebView
Apple’s documentation
WebHistoryAllItemsRemovedNotificationWebHistory
Apple’s documentation
WebHistoryItemChangedNotificationWebHistoryItem
Apple’s documentation
WebHistoryItemsAddedNotificationWebHistory
Apple’s documentation
WebHistoryItemsKeyWebHistory
Apple’s documentation
WebHistoryItemsRemovedNotificationWebHistory
Apple’s documentation
WebHistoryLoadedNotificationWebHistory
Apple’s documentation
WebHistorySavedNotificationWebHistory
Apple’s documentation
WebKitErrorDomainWebKitErrors
Apple’s documentation
WebKitErrorMIMETypeKeyWebKitErrors
Apple’s documentation
WebKitErrorPlugInNameKeyWebKitErrors
Apple’s documentation
WebKitErrorPlugInPageURLStringKeyWebKitErrors
Apple’s documentation
WebPlugInAttributesKeyWebPluginViewFactory
and values of all attributes of the HTML element associated with the plug-in AND the names and values of all parameters to be passed to the plug-in (e.g. PARAM elements within an APPLET element). In the case of a conflict between names, the attributes of an element take precedence over any PARAMs. All of the keys and values in this NSDictionary must be NSStrings.
WebPlugInBaseURLKeyWebPluginViewFactory
the plug-in’s view.
WebPlugInContainerKeyWebPluginViewFactory
WebPlugInContainer informal protocol. This object is used for callbacks from the plug-in to the app. if this argument is nil, no callbacks will occur.
WebPlugInContainingElementKeyWebPluginViewFactory
the plug-in. May be nil.
WebPlugInShouldLoadMainResourceKeyWebPluginViewFactory
own main resource (the “src” URL, in most cases). If YES, the plug-in should load its own main resource. If NO, the plug-in should use the data provided by WebKit. See -webPlugInMainResourceReceivedData: in WebPluginPrivate.h. For compatibility with older versions of WebKit, the plug-in should assume that the value for WebPlugInShouldLoadMainResourceKey is NO if it is absent from the arguments dictionary.
WebPreferencesChangedNotificationWebPreferences
Apple’s documentation
WebViewDidBeginEditingNotificationWebView
Apple’s documentation
WebViewDidChangeNotificationWebView
Apple’s documentation
WebViewDidChangeSelectionNotificationWebView
Apple’s documentation
WebViewDidChangeTypingStyleNotificationWebView
Apple’s documentation
WebViewDidEndEditingNotificationWebView
Apple’s documentation
WebViewProgressEstimateChangedNotificationWebView
Apple’s documentation
WebViewProgressFinishedNotificationWebView
Apple’s documentation
WebViewProgressStartedNotificationWebView
Apple’s documentation

Traits§

DOMEventListenerDeprecatedDOMEventListener
Apple’s documentation
DOMEventTargetDeprecatedDOMEventTarget
Apple’s documentation
DOMNodeFilterDeprecatedDOMNodeFilter
Apple’s documentation
DOMXPathNSResolverDeprecatedDOMXPathNSResolver
Apple’s documentation
NSAttributedStringWebKitAdditionsNSAttributedString
Category on NSAttributedString. Extension of
NSObjectWebPlugInWebPlugin
Category “WebPlugIn” on NSObject. WebPlugIn is an informal protocol that enables interaction between an application and web related plug-ins it may contain.
NSObjectWebPlugInContainerWebPluginContainer
Category “WebPlugInContainer” on NSObject. This informal protocol enables a plug-in to request that its containing application perform certain operations.
NSObjectWebScriptingWebScriptObject
Category “WebScripting” on NSObject.
WKDownloadDelegateWKDownloadDelegate
Apple’s documentation
WKHTTPCookieStoreObserverWKHTTPCookieStore
Apple’s documentation
WKNavigationDelegateWKNavigationDelegate
A class conforming to the WKNavigationDelegate protocol can provide methods for tracking progress for main frame navigations and for deciding policy for main frame and subframe navigations.
WKScriptMessageHandlerWKScriptMessageHandler
A class conforming to the WKScriptMessageHandler protocol provides a method for receiving messages from JavaScript running in a webpage.
WKScriptMessageHandlerWithReplyWKScriptMessageHandlerWithReply
A class conforming to the WKScriptMessageHandlerWithReply protocol provides a method for receiving messages from JavaScript running in a webpage and replying to them asynchronously.
WKUIDelegateWKUIDelegate
A class conforming to the WKUIDelegate protocol provides methods for presenting native UI on behalf of a webpage.
WKURLSchemeHandlerWKURLSchemeHandler
A class conforming to the WKURLSchemeHandler protocol provides methods for loading resources with URL schemes that WebKit doesn’t know how to handle itself.
WKURLSchemeTaskWKURLSchemeTask
Apple’s documentation
WebDocumentRepresentationDeprecatedWebDocument
Protocol implemented by the document representation of a data source.
WebDocumentSearchingDeprecatedWebDocument
Optional protocol for searching document view of WebFrameView.
WebDocumentTextDeprecatedWebDocument
Optional protocol for supporting text operations.
WebDocumentViewDeprecatedWebDocument
Protocol implemented by the document view of WebFrameView
WebDownloadDelegateDeprecatedWebDownload
The WebDownloadDelegate delegate has one extra method used to choose the right window when automatically prompting with a sheet.
WebEditingDelegateDeprecatedWebEditingDelegate
Apple’s documentation
WebFrameLoadDelegateDeprecatedWebFrameLoadDelegate
A WebView’s WebFrameLoadDelegate tracks the loading progress of its frames. When a data source of a frame starts to load, the data source is considered “provisional”. Once at least one byte is received, the data source is considered “committed”. This is done so the contents of the frame will not be lost if the new data source fails to successfully load.
WebOpenPanelResultListenerDeprecatedWebUIDelegate
This protocol is used to call back with the results of the file open panel requested by runOpenPanelForFileButtonWithResultListener:
WebPlugInViewFactoryDeprecatedWebPluginViewFactory
WebPlugInViewFactory are used to create the NSView for a plug-in. The principal class of the plug-in bundle must implement this protocol.
WebPolicyDecisionListenerDeprecatedWebPolicyDelegate
This protocol is used to call back with the results of a policy decision. This provides the ability to make these decisions asyncrhonously, which means the decision can be made by prompting with a sheet, for example.
WebPolicyDelegateDeprecatedWebPolicyDelegate
While loading a URL, WebKit asks the WebPolicyDelegate for policies that determine the action of what to do with the URL or the data that the URL represents. Typically, the policy handler methods are called in this order:
WebResourceLoadDelegateDeprecatedWebResourceLoadDelegate
Implementors of this protocol will receive messages indicating that a resource is about to be loaded, data has been received for a resource, an error has been received for a resource, and completion of a resource load. Implementors are also given the opportunity to mutate requests before they are sent. The various progress methods of this protocol all receive an identifier as the parameter. This identifier can be used to track messages associated with a single resource. For example, a single resource may generate multiple resource:willSendRequest:redirectResponse:fromDataSource: messages as it’s URL is redirected.
WebUIDelegateDeprecatedWebUIDelegate
A class that implements WebUIDelegate provides window-related methods that may be used by Javascript, plugins and other aspects of web pages. These methods are used to open new windows and control aspects of existing windows.

Type Aliases§

DOMTimeStampDOMObject
Apple’s documentation