Mac Developer Library

Developer

WebKit Framework Reference WebKit Constants Reference

Options
Deployment Target:

On This Page
Language:

WebKit Constants Reference

Constants

  • The WebKit error domain.

    Declaration

    Swift

    let WKErrorDomain: String

    Objective-C

    NSString * const WKErrorDomain;

    Constants

    • WKErrorDomain

      WKErrorDomain

      String that identifies the WebKit error domain.

      Available in OS X v10.10 and later.

  • Possible error values that can be returned from WebKit APIs.

    Declaration

    Swift

    enum WKErrorCode : Int { case Unknown case WebContentProcessTerminated case WebViewInvalidated case JavaScriptExceptionOccurred case JavaScriptResultTypeIsUnsupported }

    Objective-C

    typedef enum NSInteger : WKErrorCode { WKErrorUnknown = 1, WKErrorWebContentProcessTerminated, WKErrorWebViewInvalidated, WKErrorJavaScriptExceptionOccurred, WKErrorJavaScriptResultTypeIsUnsupported, }

    Constants

    • Unknown

      WKErrorUnknown

      An unknown error occurred.

      Available in OS X v10.10 and later.

    • WebContentProcessTerminated

      WKErrorWebContentProcessTerminated

      The web content process was terminated.

      Available in OS X v10.10 and later.

    • WebViewInvalidated

      WKErrorWebViewInvalidated

      The web view was invalidated.

      Available in OS X v10.10 and later.

    • JavaScriptExceptionOccurred

      WKErrorJavaScriptExceptionOccurred

      A JavaScript exception occurred.

      Available in OS X v10.10 and later.

    • JavaScriptResultTypeIsUnsupported

      WKErrorJavaScriptResultTypeIsUnsupported

      The result of JavaScript execution could not be returned.

      Available in OS X v10.11 and later.

    Import Statement

    Objective-C

    @import WebKit;

    Swift

    import WebKit

    Availability

    Available in OS X v10.10 and later.