webkit

package
v0.6.19 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2026 License: MIT Imports: 14 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package webkit provides Go bindings for the WebKit framework.

Integrate web content seamlessly into your app, and customize content interactions to meet your app’s needs.

Use the WebKit framework to integrate richly styled web content into your app’s native content. WebKit offers a full browsing experience for your content, offering a platform-native view and supporting classes to:

WebKit APIs

Safari Support

WebDriver

Enumerations

Key Types

Code generated from Apple documentation. DO NOT EDIT.

Index

Constants

This section is empty.

Variables

View Source
var (
	//
	// Deprecated: Deprecated since macOS 10.14.
	//
	// See: https://developer.apple.com/documentation/WebKit/DOMEventException
	DOMEventException string
	//
	// Deprecated: Deprecated since macOS 10.14.
	//
	// See: https://developer.apple.com/documentation/WebKit/DOMException
	DOMException string
	//
	// Deprecated: Deprecated since macOS 10.14.
	//
	// See: https://developer.apple.com/documentation/WebKit/DOMRangeException
	DOMRangeException string
	//
	// Deprecated: Deprecated since macOS 10.14.
	//
	// See: https://developer.apple.com/documentation/WebKit/DOMXPathException
	DOMXPathException string
	// WKErrorDomain is string that identifies the WebKit error domain.
	//
	// See: https://developer.apple.com/documentation/WebKit/WKErrorDomain
	WKErrorDomain string
	// WKWebsiteDataTypeCookies is cookies.
	//
	// See: https://developer.apple.com/documentation/WebKit/WKWebsiteDataTypeCookies
	WKWebsiteDataTypeCookies string
	// WKWebsiteDataTypeDiskCache is on-disk caches.
	//
	// See: https://developer.apple.com/documentation/WebKit/WKWebsiteDataTypeDiskCache
	WKWebsiteDataTypeDiskCache string
	// See: https://developer.apple.com/documentation/WebKit/WKWebsiteDataTypeFetchCache
	WKWebsiteDataTypeFetchCache string
	// See: https://developer.apple.com/documentation/WebKit/WKWebsiteDataTypeFileSystem
	WKWebsiteDataTypeFileSystem string
	// See: https://developer.apple.com/documentation/WebKit/WKWebsiteDataTypeHashSalt
	WKWebsiteDataTypeHashSalt string
	// WKWebsiteDataTypeIndexedDBDatabases is indexedDB databases.
	//
	// See: https://developer.apple.com/documentation/WebKit/WKWebsiteDataTypeIndexedDBDatabases
	WKWebsiteDataTypeIndexedDBDatabases string
	// WKWebsiteDataTypeLocalStorage is hTML local storage.
	//
	// See: https://developer.apple.com/documentation/WebKit/WKWebsiteDataTypeLocalStorage
	WKWebsiteDataTypeLocalStorage string
	// See: https://developer.apple.com/documentation/WebKit/WKWebsiteDataTypeMediaKeys
	WKWebsiteDataTypeMediaKeys string
	// WKWebsiteDataTypeMemoryCache is in-memory caches.
	//
	// See: https://developer.apple.com/documentation/WebKit/WKWebsiteDataTypeMemoryCache
	WKWebsiteDataTypeMemoryCache string
	// WKWebsiteDataTypeOfflineWebApplicationCache is hTML offline web app caches.
	//
	// Deprecated: Deprecated since macOS 26.2. WebApplicationCache is no longer supported
	//
	// See: https://developer.apple.com/documentation/WebKit/WKWebsiteDataTypeOfflineWebApplicationCache
	WKWebsiteDataTypeOfflineWebApplicationCache string
	// See: https://developer.apple.com/documentation/WebKit/WKWebsiteDataTypeScreenTime
	WKWebsiteDataTypeScreenTime string
	// See: https://developer.apple.com/documentation/WebKit/WKWebsiteDataTypeSearchFieldRecentSearches
	WKWebsiteDataTypeSearchFieldRecentSearches string
	// See: https://developer.apple.com/documentation/WebKit/WKWebsiteDataTypeServiceWorkerRegistrations
	WKWebsiteDataTypeServiceWorkerRegistrations string
	// WKWebsiteDataTypeSessionStorage is hTML session storage.
	//
	// See: https://developer.apple.com/documentation/WebKit/WKWebsiteDataTypeSessionStorage
	WKWebsiteDataTypeSessionStorage string
	// WKWebsiteDataTypeWebSQLDatabases is webSQL databases.
	//
	// See: https://developer.apple.com/documentation/WebKit/WKWebsiteDataTypeWebSQLDatabases
	WKWebsiteDataTypeWebSQLDatabases string
	// WebActionButtonKey is an NSNumber object where `0` indicates the left button, `1` indicates the middle button, and `2` indicates the right button.
	//
	// Deprecated: Deprecated since macOS 10.14.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebActionButtonKey
	WebActionButtonKey string
	// WebActionElementKey is a dictionary containing element information. See [WebView] for a description of the key-value pairs in this dictionary.
	//
	// Deprecated: Deprecated since macOS 10.14.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebActionElementKey
	WebActionElementKey string
	// WebActionModifierFlagsKey is an unsigned number that indicates the modifier flag.
	//
	// Deprecated: Deprecated since macOS 10.14.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebActionModifierFlagsKey
	WebActionModifierFlagsKey string
	// WebActionNavigationTypeKey is the navigation type of the action. Can be any of the values defined in [WebNavigationType] below.
	//
	// Deprecated: Deprecated since macOS 10.14.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebActionNavigationTypeKey
	WebActionNavigationTypeKey string
	// WebActionOriginalURLKey is the URL that initiated the action.
	//
	// Deprecated: Deprecated since macOS 10.14.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebActionOriginalURLKey
	WebActionOriginalURLKey string
	// WebArchivePboardType is the pasteboard type constant used when adding or accessing a WebArchive on the pasteboard.
	//
	// Deprecated: Deprecated since macOS 10.14.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebArchivePboardType
	WebArchivePboardType string
	// WebElementDOMNodeKey is the DOMNode for this element.
	//
	// Deprecated: Deprecated since macOS 10.14.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebElementDOMNodeKey
	WebElementDOMNodeKey string
	// WebElementFrameKey is the WebFrame object associated with this element.
	//
	// Deprecated: Deprecated since macOS 10.14.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebElementFrameKey
	WebElementFrameKey string
	// WebElementImageAltStringKey is an NSString of the ALT attribute of an image element.
	//
	// Deprecated: Deprecated since macOS 10.14.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebElementImageAltStringKey
	WebElementImageAltStringKey string
	// WebElementImageKey is an NSImage representing an image element.
	//
	// Deprecated: Deprecated since macOS 10.14.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebElementImageKey
	WebElementImageKey string
	// WebElementImageRectKey is an NSValue containing an NSRect, the size of an image element.
	//
	// Deprecated: Deprecated since macOS 10.14.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebElementImageRectKey
	WebElementImageRectKey string
	// WebElementImageURLKey is an NSURL containing the location of an image element.
	//
	// Deprecated: Deprecated since macOS 10.14.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebElementImageURLKey
	WebElementImageURLKey string
	// WebElementIsSelectedKey is an NSNumber used as a BOOL value to indicate whether a text element is selected or not. Zero value indicates false, true otherwise.
	//
	// Deprecated: Deprecated since macOS 10.14.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebElementIsSelectedKey
	WebElementIsSelectedKey string
	// WebElementLinkLabelKey is an NSString containing the text within an anchor.
	//
	// Deprecated: Deprecated since macOS 10.14.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebElementLinkLabelKey
	WebElementLinkLabelKey string
	// WebElementLinkTargetFrameKey is the WebFrame object associated with the target of the anchor.
	//
	// Deprecated: Deprecated since macOS 10.14.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebElementLinkTargetFrameKey
	WebElementLinkTargetFrameKey string
	// WebElementLinkTitleKey is an NSString containing the title of an anchor.
	//
	// Deprecated: Deprecated since macOS 10.14.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebElementLinkTitleKey
	WebElementLinkTitleKey string
	// WebElementLinkURLKey is an NSURL containing the location of a link if the element is within an anchor.
	//
	// Deprecated: Deprecated since macOS 10.14.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebElementLinkURLKey
	WebElementLinkURLKey string
	// WebHistoryAllItemsRemovedNotification is posted when all history items have been removed from the web history.
	//
	// Deprecated: Deprecated since macOS 10.14.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebHistoryAllItemsRemovedNotification
	WebHistoryAllItemsRemovedNotification string
	// WebHistoryItemChangedNotification is posted by a WebHistoryItem object when the value of the history item’s title, alternate title, URL strings, or last visited interval changes.
	//
	// Deprecated: Deprecated since macOS 10.14.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebHistoryItemChangedNotification
	WebHistoryItemChangedNotification string
	// WebHistoryItemsAddedNotification is posted when history items have been added to a web history.
	//
	// Deprecated: Deprecated since macOS 10.14.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebHistoryItemsAddedNotification
	WebHistoryItemsAddedNotification string
	// WebHistoryItemsKey is the key to access an array containing the added or removed web history items.
	//
	// Deprecated: Deprecated since macOS 10.14.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebHistoryItemsKey
	WebHistoryItemsKey string
	// WebHistoryItemsRemovedNotification is posted when items have been removed from the web history.
	//
	// Deprecated: Deprecated since macOS 10.14.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebHistoryItemsRemovedNotification
	WebHistoryItemsRemovedNotification string
	// WebHistoryLoadedNotification is posted when web history items have been loaded from a URL.
	//
	// Deprecated: Deprecated since macOS 10.14.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebHistoryLoadedNotification
	WebHistoryLoadedNotification string
	// WebHistorySavedNotification is posted when web history items have been saved to a URL.
	//
	// Deprecated: Deprecated since macOS 10.14.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebHistorySavedNotification
	WebHistorySavedNotification string
	//
	// Deprecated: Deprecated since macOS 10.14.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebKitErrorDomain
	WebKitErrorDomain string
	//
	// Deprecated: Deprecated since macOS 10.14.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebKitErrorMIMETypeKey
	WebKitErrorMIMETypeKey string
	//
	// Deprecated: Deprecated since macOS 10.14.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebKitErrorPlugInNameKey
	WebKitErrorPlugInNameKey string
	//
	// Deprecated: Deprecated since macOS 10.14.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebKitErrorPlugInPageURLStringKey
	WebKitErrorPlugInPageURLStringKey string
	// WebPlugInAttributesKey is the [NSDictionary] object containing all names and values of all attributes of the plug-in’s associated HTML element, as well as all names and values of the parameters to be passed to the plug-in. For example, this dictionary will contain all [PARAM] elements within an [APPLET] element. If attribute and parameter names conflict, the attributes of an element take precedence over any of its parameters. All keys and values in this dictionary must be of type [NSString]. Required key.
	//
	// Deprecated: Deprecated since macOS 10.14.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebPlugInAttributesKey
	WebPlugInAttributesKey string
	// WebPlugInBaseURLKey is the base URL of the document containing the plug-in’s view. Required key.
	//
	// Deprecated: Deprecated since macOS 10.14.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebPlugInBaseURLKey
	WebPlugInBaseURLKey string
	// WebPlugInContainerKey is an object that conforms to the [WebPlugInContainer] informal protocol. This object is used for callbacks from the plug-in to the enclosing application. If [WebPlugInContainerKey] is `nil`, no callbacks will occur.
	//
	// Deprecated: Deprecated since macOS 10.14.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebPlugInContainerKey
	WebPlugInContainerKey string
	// WebPlugInContainingElementKey is if an element of the page’s Document Object Model was used to specify the plug-in, this will contain that element. Otherwise, it will be `nil`.
	//
	// Deprecated: Deprecated since macOS 10.14.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebPlugInContainingElementKey
	WebPlugInContainingElementKey string
	// WebPlugInShouldLoadMainResourceKey is a Boolean value indicating whether the plug-in should load its own main resource (the `src` URL, in most cases).
	//
	// Deprecated: Deprecated since macOS 10.14.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebPlugInShouldLoadMainResourceKey
	WebPlugInShouldLoadMainResourceKey string
	// WebPreferencesChangedNotification is posted when the web preference settings are changed.
	//
	// Deprecated: Deprecated since macOS 10.14.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebPreferencesChangedNotification
	WebPreferencesChangedNotification string
	// WebViewDidBeginEditingNotification is posted when a web view begins any operation that changes its contents in response to user editing.
	//
	// Deprecated: Deprecated since macOS 10.14.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebViewDidBeginEditingNotification
	WebViewDidBeginEditingNotification string
	// WebViewDidChangeNotification is posted when a web view performs any operation that changes its contents in response to user editing.
	//
	// Deprecated: Deprecated since macOS 10.14.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebViewDidChangeNotification
	WebViewDidChangeNotification string
	// WebViewDidChangeSelectionNotification is posted when a web view changes its typing selection.
	//
	// Deprecated: Deprecated since macOS 10.14.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebViewDidChangeSelectionNotification
	WebViewDidChangeSelectionNotification string
	// WebViewDidChangeTypingStyleNotification is posted when a web view changes its typing style.
	//
	// Deprecated: Deprecated since macOS 10.14.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebViewDidChangeTypingStyleNotification
	WebViewDidChangeTypingStyleNotification string
	// WebViewDidEndEditingNotification is posted when a web view ends any operation that changes its contents in response to user editing.
	//
	// Deprecated: Deprecated since macOS 10.14.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebViewDidEndEditingNotification
	WebViewDidEndEditingNotification string
	// WebViewProgressEstimateChangedNotification is posted by a WebView object when the estimated progress value of a load changes.
	//
	// Deprecated: Deprecated since macOS 10.14.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebViewProgressEstimateChangedNotification
	WebViewProgressEstimateChangedNotification string
	// WebViewProgressFinishedNotification is posted by a WebView object when the load has finished.
	//
	// Deprecated: Deprecated since macOS 10.14.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebViewProgressFinishedNotification
	WebViewProgressFinishedNotification string
	// WebViewProgressStartedNotification is posted by a WebView object when a load begins, including a load that is initiated in a subframe.
	//
	// Deprecated: Deprecated since macOS 10.14.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebViewProgressStartedNotification
	WebViewProgressStartedNotification string
)
View Source
var (
	// WKWebExtensionContextDeniedPermissionMatchPatternsWereRemovedNotification is a notification the system sends whenever a web extension context has newly removed denied permission match patterns.
	//
	// See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/deniedPermissionMatchPatternsWereRemovedNotification
	WKWebExtensionContextDeniedPermissionMatchPatternsWereRemovedNotification foundation.NSNotificationName
	// WKWebExtensionContextDeniedPermissionsWereRemovedNotification is a notification the system sends whenever a web extension context has newly removed denied permissions.
	//
	// See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/deniedPermissionsWereRemovedNotification
	WKWebExtensionContextDeniedPermissionsWereRemovedNotification foundation.NSNotificationName
	// WKWebExtensionContextErrorsDidUpdateNotification is this notification is sent whenever a web extension context has new errors or errors were cleared.
	//
	// See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/errorsDidUpdateNotification
	WKWebExtensionContextErrorsDidUpdateNotification foundation.NSNotificationName
	// WKWebExtensionContextGrantedPermissionMatchPatternsWereRemovedNotification is this notification is sent whenever a web extension context has newly removed granted permission match patterns.
	//
	// See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/grantedPermissionMatchPatternsWereRemovedNotification
	WKWebExtensionContextGrantedPermissionMatchPatternsWereRemovedNotification foundation.NSNotificationName
	// WKWebExtensionContextGrantedPermissionsWereRemovedNotification is this notification is sent whenever a web extension context has newly removed granted permissions.
	//
	// See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/grantedPermissionsWereRemovedNotification
	WKWebExtensionContextGrantedPermissionsWereRemovedNotification foundation.NSNotificationName
	// WKWebExtensionContextPermissionMatchPatternsWereDeniedNotification is this notification is sent whenever a web extension context has newly denied permission match patterns.
	//
	// See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/permissionMatchPatternsWereDeniedNotification
	WKWebExtensionContextPermissionMatchPatternsWereDeniedNotification foundation.NSNotificationName
	// WKWebExtensionContextPermissionMatchPatternsWereGrantedNotification is this notification is sent whenever a web extension context has newly granted permission match patterns.
	//
	// See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/permissionMatchPatternsWereGrantedNotification
	WKWebExtensionContextPermissionMatchPatternsWereGrantedNotification foundation.NSNotificationName
	// WKWebExtensionContextPermissionsWereDeniedNotification is this notification is sent whenever a web extension context has newly denied permissions.
	//
	// See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/permissionsWereDeniedNotification
	WKWebExtensionContextPermissionsWereDeniedNotification foundation.NSNotificationName
	// WKWebExtensionContextPermissionsWereGrantedNotification is this notification is sent whenever a web extension context has newly granted permissions.
	//
	// See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/permissionsWereGrantedNotification
	WKWebExtensionContextPermissionsWereGrantedNotification foundation.NSNotificationName
)
View Source
var (
	// See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/errorDomain
	WKWebExtensionContextErrorDomain foundation.NSErrorDomain
	// WKWebExtensionDataRecordErrorDomain is indicates a [WKWebExtension.DataRecord] error.
	//
	// See: https://developer.apple.com/documentation/WebKit/WKWebExtension/DataRecord/errorDomain
	WKWebExtensionDataRecordErrorDomain foundation.NSErrorDomain
	// WKWebExtensionErrorDomain is indicates a web extension error.
	//
	// See: https://developer.apple.com/documentation/WebKit/WKWebExtension/errorDomain
	WKWebExtensionErrorDomain foundation.NSErrorDomain
	// WKWebExtensionMatchPatternErrorDomain is a string that identifies the error domain.
	//
	// See: https://developer.apple.com/documentation/WebKit/WKWebExtension/MatchPattern/errorDomain
	WKWebExtensionMatchPatternErrorDomain foundation.NSErrorDomain
	// WKWebExtensionMessagePortErrorDomain is a string that identifies the error domain.
	//
	// See: https://developer.apple.com/documentation/WebKit/WKWebExtension/MessagePort/errorDomain
	WKWebExtensionMessagePortErrorDomain foundation.NSErrorDomain
)
View Source
var WKWebExtensionContextNotificationUserInfoKeys struct {
	// MatchPatterns: The corresponding value represents the affected permission match patterns in [WKWebExtensionContext](<https://developer.apple.com/documentation/WebKit/WKWebExtensionContext>) notifications.
	MatchPatterns WKWebExtensionContextNotificationUserInfoKey
	// Permissions: The corresponding value represents the affected permissions in [WKWebExtensionContext](<https://developer.apple.com/documentation/WebKit/WKWebExtensionContext>) notifications.
	Permissions WKWebExtensionContextNotificationUserInfoKey
}

WKWebExtensionContextNotificationUserInfoKeys provides typed accessors for WKWebExtensionContextNotificationUserInfoKey constants.

View Source
var WKWebExtensionDataTypes struct {
	// Local: Specifies local storage, including `browser.StorageXCUIElementTypeLocal()`.
	Local WKWebExtensionDataType
	// Session: Specifies session storage, including `browser.StorageXCUIElementTypeSession()`.
	Session WKWebExtensionDataType
	// Synchronized: Specifies synchronized storage, including `browser.StorageXCUIElementTypeSync()`.
	Synchronized WKWebExtensionDataType
}

WKWebExtensionDataTypes provides typed accessors for WKWebExtensionDataType constants.

View Source
var WKWebExtensionPermissions struct {
	// ActiveTab: A request indicating that when a person interacts with the extension, the system grants extra permissions for the active tab only.
	ActiveTab WKWebExtensionPermission
	// Alarms: A request for access to the `browser.Alarms()` APIs.
	Alarms WKWebExtensionPermission
	// ClipboardWrite: A request for access to write to the clipboard.
	ClipboardWrite WKWebExtensionPermission
	// ContextMenus: A request for access to the `browser.ContextMenus()` APIs.
	ContextMenus WKWebExtensionPermission
	// Cookies: A request for access to the `browser.Cookies()` APIs.
	Cookies WKWebExtensionPermission
	// DeclarativeNetRequest: A request for access to the `browser.DeclarativeNetRequest()` APIs.
	DeclarativeNetRequest WKWebExtensionPermission
	// DeclarativeNetRequestFeedback: A request for access to the `browser.DeclarativeNetRequest()` APIs with extra information on matched rules.
	DeclarativeNetRequestFeedback WKWebExtensionPermission
	// DeclarativeNetRequestWithHostAccess: A request for access to the `browser.DeclarativeNetRequest()` APIs with the ability to modify or redirect requests.
	DeclarativeNetRequestWithHostAccess WKWebExtensionPermission
	// Menus: A request for access to the `browser.Menus()` APIs.
	Menus WKWebExtensionPermission
	// NativeMessaging: A request for access to send messages to the app extension bundle.
	NativeMessaging WKWebExtensionPermission
	// Scripting: A request for access to the `browser.Scripting()` APIs.
	Scripting WKWebExtensionPermission
	// Storage: A request for access to the `browser.Storage()` APIs.
	Storage WKWebExtensionPermission
	// Tabs: A request for access to extra information on the `browser.Tabs()` APIs.
	Tabs WKWebExtensionPermission
	// UnlimitedStorage: A request for access to an unlimited quota on the `browser.StorageXCUIElementTypeLocal()` APIs.
	UnlimitedStorage WKWebExtensionPermission
	// WebNavigation: A request for access to the `browser.WebNavigation()` APIs.
	WebNavigation WKWebExtensionPermission
	// WebRequest: A request for access to the `browser.WebRequest()` APIs.
	WebRequest WKWebExtensionPermission
}

WKWebExtensionPermissions provides typed accessors for WKWebExtensionPermission constants.

Functions

func BindFunc

func BindFunc(fptr any, name string) (err error)

BindFunc binds the WebKit symbol name into fptr, which must be a pointer to a func variable.

The caller supplies the signature, and nothing checks it. A dylib records no argument count or types for a C symbol, so a wrong signature here is not a type error: it is the wrong number of machine words moved on a live stack, and the failure surfaces somewhere else entirely. Prefer a generated binding, whose signature carries recorded evidence, and reach for this only for a symbol that has none. purego.RegisterFunc panics on a signature it cannot lower; that is recovered and returned, because an escape hatch that takes down the process on a mistyped experiment is not one anybody can experiment with.

func NewBoolBlock

func NewBoolBlock(handler BoolHandler) (objc.ID, func())

NewBoolBlock wraps a Go BoolHandler as an Objective-C block. The caller must defer the returned cleanup function.

Used by:

  • [WKNavigationDelegate.WebViewAuthenticationChallengeShouldAllowDeprecatedTLS]
  • [WKNavigationDelegate.WebViewShouldGoToBackForwardListItemWillUseInstantBackCompletionHandler]
  • [WKUIDelegate.WebViewRunJavaScriptConfirmPanelWithMessageInitiatedByFrameCompletionHandler]

func NewDataBlock

func NewDataBlock(handler DataHandler) (objc.ID, func())

NewDataBlock wraps a Go DataHandler as an Objective-C block. The caller must defer the returned cleanup function.

Used by:

func NewDataErrorBlock

func NewDataErrorBlock(handler DataErrorHandler) (objc.ID, func())

NewDataErrorBlock wraps a Go DataErrorHandler as an Objective-C block. The caller must defer the returned cleanup function.

Used by:

func NewErrorBlock

func NewErrorBlock(handler ErrorHandler) (objc.ID, func())

NewErrorBlock wraps a Go ErrorHandler as an Objective-C block. The caller must defer the returned cleanup function.

Used by:

  • WKContentRuleListStore.RemoveContentRuleListForIdentifierCompletionHandler
  • WKWebExtensionContext.LoadBackgroundContentWithCompletionHandler
  • [WKWebExtensionControllerDelegate.WebExtensionControllerConnectUsingMessagePortForExtensionContextCompletionHandler]
  • [WKWebExtensionControllerDelegate.WebExtensionControllerOpenOptionsPageForExtensionContextCompletionHandler]
  • [WKWebExtensionControllerDelegate.WebExtensionControllerPresentPopupForActionForExtensionContextCompletionHandler]
  • WKWebExtensionMessagePort.SendMessageCompletionHandler
  • [WKWebExtensionTab.ActivateForWebExtensionContextCompletionHandler]
  • [WKWebExtensionTab.CloseForWebExtensionContextCompletionHandler]
  • [WKWebExtensionTab.GoBackForWebExtensionContextCompletionHandler]
  • [WKWebExtensionTab.GoForwardForWebExtensionContextCompletionHandler]
  • [WKWebExtensionTab.LoadURLForWebExtensionContextCompletionHandler]
  • [WKWebExtensionTab.ReloadFromOriginForWebExtensionContextCompletionHandler]
  • [WKWebExtensionTab.SetMutedForWebExtensionContextCompletionHandler]
  • [WKWebExtensionTab.SetParentTabForWebExtensionContextCompletionHandler]
  • [WKWebExtensionTab.SetPinnedForWebExtensionContextCompletionHandler]
  • [WKWebExtensionTab.SetReaderModeActiveForWebExtensionContextCompletionHandler]
  • [WKWebExtensionTab.SetSelectedForWebExtensionContextCompletionHandler]
  • [WKWebExtensionTab.SetZoomFactorForWebExtensionContextCompletionHandler]
  • [WKWebExtensionWindow.CloseForWebExtensionContextCompletionHandler]
  • [WKWebExtensionWindow.FocusForWebExtensionContextCompletionHandler]
  • [WKWebExtensionWindow.SetFrameForWebExtensionContextCompletionHandler]
  • [WKWebExtensionWindow.SetWindowStateForWebExtensionContextCompletionHandler]
  • WKWebView.RestoreDataCompletionHandler
  • [WKWebsiteDataStore.RemoveDataStoreForIdentifierCompletionHandler]
  • WKWebsiteDataStore.RestoreDataCompletionHandler

func NewIObjectStringBlock added in v0.6.16

func NewIObjectStringBlock(handler IObjectStringHandler) (objc.ID, func())

NewIObjectStringBlock wraps a Go IObjectStringHandler as an Objective-C block. The caller must defer the returned cleanup function.

Used by:

func NewImageErrorBlock added in v0.5.3

func NewImageErrorBlock(handler ImageErrorHandler) (objc.ID, func())

NewImageErrorBlock wraps a Go ImageErrorHandler as an Objective-C block. The caller must defer the returned cleanup function.

Used by:

func NewIntURLBlock added in v0.6.10

func NewIntURLBlock(handler IntURLHandler) (objc.ID, func())

NewIntURLBlock wraps a Go IntURLHandler as an Objective-C block. The caller must defer the returned cleanup function.

Used by:

  • [WKDownloadDelegate.DownloadDecidePlaceholderPolicy]

func NewIntURLCredentialBlock added in v0.6.10

func NewIntURLCredentialBlock(handler IntURLCredentialHandler) (objc.ID, func())

NewIntURLCredentialBlock wraps a Go IntURLCredentialHandler as an Objective-C block. The caller must defer the returned cleanup function.

Used by:

  • [WKDownloadDelegate.DownloadDidReceiveAuthenticationChallengeCompletionHandler]
  • [WKNavigationDelegate.WebViewDidReceiveAuthenticationChallengeCompletionHandler]

func NewIntWKWebpagePreferencesBlock added in v0.6.10

func NewIntWKWebpagePreferencesBlock(handler IntWKWebpagePreferencesHandler) (objc.ID, func())

NewIntWKWebpagePreferencesBlock wraps a Go IntWKWebpagePreferencesHandler as an Objective-C block. The caller must defer the returned cleanup function.

Used by:

  • [WKNavigationDelegate.WebViewDecidePolicyForNavigationActionPreferencesDecisionHandler]

func NewLocaleErrorBlock

func NewLocaleErrorBlock(handler LocaleErrorHandler) (objc.ID, func())

NewLocaleErrorBlock wraps a Go LocaleErrorHandler as an Objective-C block. The caller must defer the returned cleanup function.

Used by:

  • [WKWebExtensionTab.DetectWebpageLocaleForWebExtensionContextCompletionHandler]

func NewNSAttributedStringCompletionHandlerBlock added in v0.6.16

func NewNSAttributedStringCompletionHandlerBlock(handler NSAttributedStringCompletionHandler) (objc.ID, func())

NewNSAttributedStringCompletionHandlerBlock wraps a Go NSAttributedStringCompletionHandler as an Objective-C block. The caller must defer the returned cleanup function.

func NewNSHTTPCookieArrayBlock added in v0.6.10

func NewNSHTTPCookieArrayBlock(handler NSHTTPCookieArrayHandler) (objc.ID, func())

NewNSHTTPCookieArrayBlock wraps a Go NSHTTPCookieArrayHandler as an Objective-C block. The caller must defer the returned cleanup function.

Used by:

func NewNSURLArrayBlock added in v0.6.10

func NewNSURLArrayBlock(handler NSURLArrayHandler) (objc.ID, func())

NewNSURLArrayBlock wraps a Go NSURLArrayHandler as an Objective-C block. The caller must defer the returned cleanup function.

Used by:

  • [WKUIDelegate.WebViewRunOpenPanelWithParametersInitiatedByFrameCompletionHandler]

func NewNSUUIDArrayBlock added in v0.6.10

func NewNSUUIDArrayBlock(handler NSUUIDArrayHandler) (objc.ID, func())

NewNSUUIDArrayBlock wraps a Go NSUUIDArrayHandler as an Objective-C block. The caller must defer the returned cleanup function.

Used by:

  • [WKWebsiteDataStore.FetchAllDataStoreIdentifiers]

func NewObjectErrorBlock

func NewObjectErrorBlock(handler ObjectErrorHandler) (objc.ID, func())

NewObjectErrorBlock wraps a Go ObjectErrorHandler as an Objective-C block. The caller must defer the returned cleanup function.

Used by:

func NewStringBlock added in v0.6.16

func NewStringBlock(handler StringHandler) (objc.ID, func())

NewStringBlock wraps a Go StringHandler as an Objective-C block. The caller must defer the returned cleanup function.

Used by:

  • [WKUIDelegate.WebViewRunJavaScriptTextInputPanelWithPromptDefaultTextInitiatedByFrameCompletionHandler]

func NewUIContextMenuConfigurationBlock

func NewUIContextMenuConfigurationBlock(handler UIContextMenuConfigurationHandler) (objc.ID, func())

NewUIContextMenuConfigurationBlock wraps a Go UIContextMenuConfigurationHandler as an Objective-C block. The caller must defer the returned cleanup function.

Used by:

  • [WKUIDelegate.WebViewContextMenuConfigurationForElementCompletionHandler]

func NewURLBlock

func NewURLBlock(handler URLHandler) (objc.ID, func())

NewURLBlock wraps a Go URLHandler as an Objective-C block. The caller must defer the returned cleanup function.

Used by:

func NewWKContentRuleListErrorBlock

func NewWKContentRuleListErrorBlock(handler WKContentRuleListErrorHandler) (objc.ID, func())

NewWKContentRuleListErrorBlock wraps a Go WKContentRuleListErrorHandler as an Objective-C block. The caller must defer the returned cleanup function.

Used by:

func NewWKCookiePolicyBlock

func NewWKCookiePolicyBlock(handler WKCookiePolicyHandler) (objc.ID, func())

NewWKCookiePolicyBlock wraps a Go WKCookiePolicyHandler as an Objective-C block. The caller must defer the returned cleanup function.

Used by:

func NewWKDialogResultBlock

func NewWKDialogResultBlock(handler WKDialogResultHandler) (objc.ID, func())

NewWKDialogResultBlock wraps a Go WKDialogResultHandler as an Objective-C block. The caller must defer the returned cleanup function.

Used by:

  • [WKUIDelegate.WebViewShowLockdownModeFirstUseMessageCompletionHandler]

func NewWKDownloadBlock

func NewWKDownloadBlock(handler WKDownloadHandler) (objc.ID, func())

NewWKDownloadBlock wraps a Go WKDownloadHandler as an Objective-C block. The caller must defer the returned cleanup function.

Used by:

func NewWKDownloadRedirectPolicyBlock

func NewWKDownloadRedirectPolicyBlock(handler WKDownloadRedirectPolicyHandler) (objc.ID, func())

NewWKDownloadRedirectPolicyBlock wraps a Go WKDownloadRedirectPolicyHandler as an Objective-C block. The caller must defer the returned cleanup function.

Used by:

  • [WKDownloadDelegate.DownloadWillPerformHTTPRedirectionNewRequestDecisionHandler]

func NewWKFindResultBlock

func NewWKFindResultBlock(handler WKFindResultHandler) (objc.ID, func())

NewWKFindResultBlock wraps a Go WKFindResultHandler as an Objective-C block. The caller must defer the returned cleanup function.

Used by:

func NewWKMediaPlaybackStateBlock

func NewWKMediaPlaybackStateBlock(handler WKMediaPlaybackStateHandler) (objc.ID, func())

NewWKMediaPlaybackStateBlock wraps a Go WKMediaPlaybackStateHandler as an Objective-C block. The caller must defer the returned cleanup function.

Used by:

func NewWKNavigationActionPolicyBlock

func NewWKNavigationActionPolicyBlock(handler WKNavigationActionPolicyHandler) (objc.ID, func())

NewWKNavigationActionPolicyBlock wraps a Go WKNavigationActionPolicyHandler as an Objective-C block. The caller must defer the returned cleanup function.

Used by:

  • [WKNavigationDelegate.WebViewDecidePolicyForNavigationActionDecisionHandler]

func NewWKNavigationResponsePolicyBlock

func NewWKNavigationResponsePolicyBlock(handler WKNavigationResponsePolicyHandler) (objc.ID, func())

NewWKNavigationResponsePolicyBlock wraps a Go WKNavigationResponsePolicyHandler as an Objective-C block. The caller must defer the returned cleanup function.

Used by:

  • [WKNavigationDelegate.WebViewDecidePolicyForNavigationResponseDecisionHandler]

func NewWKPermissionDecisionBlock

func NewWKPermissionDecisionBlock(handler WKPermissionDecisionHandler) (objc.ID, func())

NewWKPermissionDecisionBlock wraps a Go WKPermissionDecisionHandler as an Objective-C block. The caller must defer the returned cleanup function.

Used by:

  • [WKUIDelegate.WebViewRequestDeviceOrientationAndMotionPermissionForOriginInitiatedByFrameDecisionHandler]
  • [WKUIDelegate.WebViewRequestMediaCapturePermissionForOriginInitiatedByFrameTypeDecisionHandler]

func NewWKWebExtensionDataRecordArrayBlock added in v0.6.10

func NewWKWebExtensionDataRecordArrayBlock(handler WKWebExtensionDataRecordArrayHandler) (objc.ID, func())

NewWKWebExtensionDataRecordArrayBlock wraps a Go WKWebExtensionDataRecordArrayHandler as an Objective-C block. The caller must defer the returned cleanup function.

Used by:

func NewWKWebExtensionDataRecordBlock

func NewWKWebExtensionDataRecordBlock(handler WKWebExtensionDataRecordHandler) (objc.ID, func())

NewWKWebExtensionDataRecordBlock wraps a Go WKWebExtensionDataRecordHandler as an Objective-C block. The caller must defer the returned cleanup function.

Used by:

func NewWKWebExtensionErrorBlock

func NewWKWebExtensionErrorBlock(handler WKWebExtensionErrorHandler) (objc.ID, func())

NewWKWebExtensionErrorBlock wraps a Go WKWebExtensionErrorHandler as an Objective-C block. The caller must defer the returned cleanup function.

Used by:

  • [WKWebExtension.ExtensionWithAppExtensionBundleCompletionHandler]
  • [WKWebExtension.ExtensionWithResourceBaseURLCompletionHandler]

func NewWKWebExtensionTabErrorBlock

func NewWKWebExtensionTabErrorBlock(handler WKWebExtensionTabErrorHandler) (objc.ID, func())

NewWKWebExtensionTabErrorBlock wraps a Go WKWebExtensionTabErrorHandler as an Objective-C block. The caller must defer the returned cleanup function.

Used by:

  • [WKWebExtensionControllerDelegate.WebExtensionControllerOpenNewTabUsingConfigurationForExtensionContextCompletionHandler]
  • [WKWebExtensionTab.DuplicateUsingConfigurationForWebExtensionContextCompletionHandler]

func NewWKWebExtensionWindowErrorBlock

func NewWKWebExtensionWindowErrorBlock(handler WKWebExtensionWindowErrorHandler) (objc.ID, func())

NewWKWebExtensionWindowErrorBlock wraps a Go WKWebExtensionWindowErrorHandler as an Objective-C block. The caller must defer the returned cleanup function.

Used by:

  • [WKWebExtensionControllerDelegate.WebExtensionControllerOpenNewWindowUsingConfigurationForExtensionContextCompletionHandler]

func NewWKWebsiteDataRecordArrayBlock added in v0.6.10

func NewWKWebsiteDataRecordArrayBlock(handler WKWebsiteDataRecordArrayHandler) (objc.ID, func())

NewWKWebsiteDataRecordArrayBlock wraps a Go WKWebsiteDataRecordArrayHandler as an Objective-C block. The caller must defer the returned cleanup function.

Used by:

func NewstringArrayBlock added in v0.6.16

func NewstringArrayBlock(handler stringArrayHandler) (objc.ID, func())

NewstringArrayBlock wraps a Go [stringArrayHandler] as an Objective-C block. The caller must defer the returned cleanup function.

Used by:

func SymbolAddress

func SymbolAddress(name string) (uintptr, error)

SymbolAddress returns the address of name in WebKit, whether or not this package generated a binding for it.

What is generated is bounded by what is documented, and for a private framework that is whatever a manifest happened to enumerate. The dylib usually exports far more. Without this, a symbol nobody wrote down is unreachable from a package that has already loaded the image holding it, and the generated surface becomes a ceiling instead of a floor.

The lookup is scoped to this framework's handle, not RTLD_DEFAULT, so a symbol some other loaded image exports is not reported as this one's.

Types

type BoolHandler

type BoolHandler = func(bool)

BoolHandler handles The completion handler block to execute with the decision.

Used by:

  • [WKNavigationDelegate.WebViewAuthenticationChallengeShouldAllowDeprecatedTLS]
  • [WKNavigationDelegate.WebViewShouldGoToBackForwardListItemWillUseInstantBackCompletionHandler]
  • [WKUIDelegate.WebViewRunJavaScriptConfirmPanelWithMessageInitiatedByFrameCompletionHandler]

type DOMAbstractView

type DOMAbstractView struct {
	DOMObject
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMAbstractView

func DOMAbstractViewFromID

func DOMAbstractViewFromID(id objc.ID) DOMAbstractView

DOMAbstractViewFromID constructs a DOMAbstractView from an objc.ID.

func NewDOMAbstractView

func NewDOMAbstractView() DOMAbstractView

NewDOMAbstractView creates a new DOMAbstractView instance.

func (DOMAbstractView) Autorelease

func (d DOMAbstractView) Autorelease() DOMAbstractView

Autorelease adds the receiver to the current autorelease pool.

func (DOMAbstractView) Init

Init initializes the instance.

type DOMAbstractViewClass

type DOMAbstractViewClass struct {
	// contains filtered or unexported fields
}

func GetDOMAbstractViewClass

func GetDOMAbstractViewClass() DOMAbstractViewClass

GetDOMAbstractViewClass returns the class object for DOMAbstractView.

func (DOMAbstractViewClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMAbstractViewClass) Class

func (dc DOMAbstractViewClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMAttr

type DOMAttr struct {
	DOMNode
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMAttr

func DOMAttrFromID

func DOMAttrFromID(id objc.ID) DOMAttr

DOMAttrFromID constructs a DOMAttr from an objc.ID.

func NewDOMAttr

func NewDOMAttr() DOMAttr

NewDOMAttr creates a new DOMAttr instance.

func (DOMAttr) Autorelease

func (d DOMAttr) Autorelease() DOMAttr

Autorelease adds the receiver to the current autorelease pool.

func (DOMAttr) Init

func (d DOMAttr) Init() DOMAttr

Init initializes the instance.

func (DOMAttr) SetValue

func (d DOMAttr) SetValue(value string)

type DOMAttrClass

type DOMAttrClass struct {
	// contains filtered or unexported fields
}

func GetDOMAttrClass

func GetDOMAttrClass() DOMAttrClass

GetDOMAttrClass returns the class object for DOMAttr.

func (DOMAttrClass) Alloc

func (dc DOMAttrClass) Alloc() DOMAttr

Alloc allocates memory for a new instance of the class.

func (DOMAttrClass) Class

func (dc DOMAttrClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMBlob

type DOMBlob struct {
	DOMObject
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMBlob

func DOMBlobFromID

func DOMBlobFromID(id objc.ID) DOMBlob

DOMBlobFromID constructs a DOMBlob from an objc.ID.

func NewDOMBlob

func NewDOMBlob() DOMBlob

NewDOMBlob creates a new DOMBlob instance.

func (DOMBlob) Autorelease

func (d DOMBlob) Autorelease() DOMBlob

Autorelease adds the receiver to the current autorelease pool.

func (DOMBlob) Init

func (d DOMBlob) Init() DOMBlob

Init initializes the instance.

type DOMBlobClass

type DOMBlobClass struct {
	// contains filtered or unexported fields
}

func GetDOMBlobClass

func GetDOMBlobClass() DOMBlobClass

GetDOMBlobClass returns the class object for DOMBlob.

func (DOMBlobClass) Alloc

func (dc DOMBlobClass) Alloc() DOMBlob

Alloc allocates memory for a new instance of the class.

func (DOMBlobClass) Class

func (dc DOMBlobClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMCDATASection

type DOMCDATASection struct {
	DOMText
}

See: https://developer.apple.com/documentation/WebKit/DOMCDATASection

func DOMCDATASectionFromID

func DOMCDATASectionFromID(id objc.ID) DOMCDATASection

DOMCDATASectionFromID constructs a DOMCDATASection from an objc.ID.

func NewDOMCDATASection

func NewDOMCDATASection() DOMCDATASection

NewDOMCDATASection creates a new DOMCDATASection instance.

func (DOMCDATASection) Autorelease

func (d DOMCDATASection) Autorelease() DOMCDATASection

Autorelease adds the receiver to the current autorelease pool.

func (DOMCDATASection) Init

Init initializes the instance.

type DOMCDATASectionClass

type DOMCDATASectionClass struct {
	// contains filtered or unexported fields
}

func GetDOMCDATASectionClass

func GetDOMCDATASectionClass() DOMCDATASectionClass

GetDOMCDATASectionClass returns the class object for DOMCDATASection.

func (DOMCDATASectionClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMCDATASectionClass) Class

func (dc DOMCDATASectionClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMCSSCharsetRule

type DOMCSSCharsetRule struct {
	DOMCSSRule
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMCSSCharsetRule

func DOMCSSCharsetRuleFromID

func DOMCSSCharsetRuleFromID(id objc.ID) DOMCSSCharsetRule

DOMCSSCharsetRuleFromID constructs a DOMCSSCharsetRule from an objc.ID.

func NewDOMCSSCharsetRule

func NewDOMCSSCharsetRule() DOMCSSCharsetRule

NewDOMCSSCharsetRule creates a new DOMCSSCharsetRule instance.

func (DOMCSSCharsetRule) Autorelease

func (d DOMCSSCharsetRule) Autorelease() DOMCSSCharsetRule

Autorelease adds the receiver to the current autorelease pool.

func (DOMCSSCharsetRule) Init

Init initializes the instance.

type DOMCSSCharsetRuleClass

type DOMCSSCharsetRuleClass struct {
	// contains filtered or unexported fields
}

func GetDOMCSSCharsetRuleClass

func GetDOMCSSCharsetRuleClass() DOMCSSCharsetRuleClass

GetDOMCSSCharsetRuleClass returns the class object for DOMCSSCharsetRule.

func (DOMCSSCharsetRuleClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMCSSCharsetRuleClass) Class

func (dc DOMCSSCharsetRuleClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMCSSFontFaceRule

type DOMCSSFontFaceRule struct {
	DOMCSSRule
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMCSSFontFaceRule

func DOMCSSFontFaceRuleFromID

func DOMCSSFontFaceRuleFromID(id objc.ID) DOMCSSFontFaceRule

DOMCSSFontFaceRuleFromID constructs a DOMCSSFontFaceRule from an objc.ID.

func NewDOMCSSFontFaceRule

func NewDOMCSSFontFaceRule() DOMCSSFontFaceRule

NewDOMCSSFontFaceRule creates a new DOMCSSFontFaceRule instance.

func (DOMCSSFontFaceRule) Autorelease

func (d DOMCSSFontFaceRule) Autorelease() DOMCSSFontFaceRule

Autorelease adds the receiver to the current autorelease pool.

func (DOMCSSFontFaceRule) Init

Init initializes the instance.

type DOMCSSFontFaceRuleClass

type DOMCSSFontFaceRuleClass struct {
	// contains filtered or unexported fields
}

func GetDOMCSSFontFaceRuleClass

func GetDOMCSSFontFaceRuleClass() DOMCSSFontFaceRuleClass

GetDOMCSSFontFaceRuleClass returns the class object for DOMCSSFontFaceRule.

func (DOMCSSFontFaceRuleClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMCSSFontFaceRuleClass) Class

func (dc DOMCSSFontFaceRuleClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMCSSImportRule

type DOMCSSImportRule struct {
	DOMCSSRule
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMCSSImportRule

func DOMCSSImportRuleFromID

func DOMCSSImportRuleFromID(id objc.ID) DOMCSSImportRule

DOMCSSImportRuleFromID constructs a DOMCSSImportRule from an objc.ID.

func NewDOMCSSImportRule

func NewDOMCSSImportRule() DOMCSSImportRule

NewDOMCSSImportRule creates a new DOMCSSImportRule instance.

func (DOMCSSImportRule) Autorelease

func (d DOMCSSImportRule) Autorelease() DOMCSSImportRule

Autorelease adds the receiver to the current autorelease pool.

func (DOMCSSImportRule) Init

Init initializes the instance.

type DOMCSSImportRuleClass

type DOMCSSImportRuleClass struct {
	// contains filtered or unexported fields
}

func GetDOMCSSImportRuleClass

func GetDOMCSSImportRuleClass() DOMCSSImportRuleClass

GetDOMCSSImportRuleClass returns the class object for DOMCSSImportRule.

func (DOMCSSImportRuleClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMCSSImportRuleClass) Class

func (dc DOMCSSImportRuleClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMCSSMediaRule

type DOMCSSMediaRule struct {
	DOMCSSRule
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMCSSMediaRule

func DOMCSSMediaRuleFromID

func DOMCSSMediaRuleFromID(id objc.ID) DOMCSSMediaRule

DOMCSSMediaRuleFromID constructs a DOMCSSMediaRule from an objc.ID.

func NewDOMCSSMediaRule

func NewDOMCSSMediaRule() DOMCSSMediaRule

NewDOMCSSMediaRule creates a new DOMCSSMediaRule instance.

func (DOMCSSMediaRule) Autorelease

func (d DOMCSSMediaRule) Autorelease() DOMCSSMediaRule

Autorelease adds the receiver to the current autorelease pool.

func (DOMCSSMediaRule) Init

Init initializes the instance.

type DOMCSSMediaRuleClass

type DOMCSSMediaRuleClass struct {
	// contains filtered or unexported fields
}

func GetDOMCSSMediaRuleClass

func GetDOMCSSMediaRuleClass() DOMCSSMediaRuleClass

GetDOMCSSMediaRuleClass returns the class object for DOMCSSMediaRule.

func (DOMCSSMediaRuleClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMCSSMediaRuleClass) Class

func (dc DOMCSSMediaRuleClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMCSSPageRule

type DOMCSSPageRule struct {
	DOMCSSRule
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMCSSPageRule

func DOMCSSPageRuleFromID

func DOMCSSPageRuleFromID(id objc.ID) DOMCSSPageRule

DOMCSSPageRuleFromID constructs a DOMCSSPageRule from an objc.ID.

func NewDOMCSSPageRule

func NewDOMCSSPageRule() DOMCSSPageRule

NewDOMCSSPageRule creates a new DOMCSSPageRule instance.

func (DOMCSSPageRule) Autorelease

func (d DOMCSSPageRule) Autorelease() DOMCSSPageRule

Autorelease adds the receiver to the current autorelease pool.

func (DOMCSSPageRule) Init

func (d DOMCSSPageRule) Init() DOMCSSPageRule

Init initializes the instance.

func (DOMCSSPageRule) SetSelectorText

func (d DOMCSSPageRule) SetSelectorText(value string)

type DOMCSSPageRuleClass

type DOMCSSPageRuleClass struct {
	// contains filtered or unexported fields
}

func GetDOMCSSPageRuleClass

func GetDOMCSSPageRuleClass() DOMCSSPageRuleClass

GetDOMCSSPageRuleClass returns the class object for DOMCSSPageRule.

func (DOMCSSPageRuleClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMCSSPageRuleClass) Class

func (dc DOMCSSPageRuleClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMCSSPrimitiveValue

type DOMCSSPrimitiveValue struct {
	DOMCSSValue
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMCSSPrimitiveValue

func DOMCSSPrimitiveValueFromID

func DOMCSSPrimitiveValueFromID(id objc.ID) DOMCSSPrimitiveValue

DOMCSSPrimitiveValueFromID constructs a DOMCSSPrimitiveValue from an objc.ID.

func NewDOMCSSPrimitiveValue

func NewDOMCSSPrimitiveValue() DOMCSSPrimitiveValue

NewDOMCSSPrimitiveValue creates a new DOMCSSPrimitiveValue instance.

func (DOMCSSPrimitiveValue) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (DOMCSSPrimitiveValue) Init

Init initializes the instance.

type DOMCSSPrimitiveValueClass

type DOMCSSPrimitiveValueClass struct {
	// contains filtered or unexported fields
}

func GetDOMCSSPrimitiveValueClass

func GetDOMCSSPrimitiveValueClass() DOMCSSPrimitiveValueClass

GetDOMCSSPrimitiveValueClass returns the class object for DOMCSSPrimitiveValue.

func (DOMCSSPrimitiveValueClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMCSSPrimitiveValueClass) Class

Class returns the underlying Objective-C class pointer.

type DOMCSSRule

type DOMCSSRule struct {
	DOMObject
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMCSSRule

func DOMCSSRuleFromID

func DOMCSSRuleFromID(id objc.ID) DOMCSSRule

DOMCSSRuleFromID constructs a DOMCSSRule from an objc.ID.

func NewDOMCSSRule

func NewDOMCSSRule() DOMCSSRule

NewDOMCSSRule creates a new DOMCSSRule instance.

func (DOMCSSRule) Autorelease

func (d DOMCSSRule) Autorelease() DOMCSSRule

Autorelease adds the receiver to the current autorelease pool.

func (DOMCSSRule) Init

func (d DOMCSSRule) Init() DOMCSSRule

Init initializes the instance.

func (DOMCSSRule) SetCssText

func (d DOMCSSRule) SetCssText(value string)

type DOMCSSRuleClass

type DOMCSSRuleClass struct {
	// contains filtered or unexported fields
}

func GetDOMCSSRuleClass

func GetDOMCSSRuleClass() DOMCSSRuleClass

GetDOMCSSRuleClass returns the class object for DOMCSSRule.

func (DOMCSSRuleClass) Alloc

func (dc DOMCSSRuleClass) Alloc() DOMCSSRule

Alloc allocates memory for a new instance of the class.

func (DOMCSSRuleClass) Class

func (dc DOMCSSRuleClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMCSSRuleList

type DOMCSSRuleList struct {
	DOMObject
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMCSSRuleList

func DOMCSSRuleListFromID

func DOMCSSRuleListFromID(id objc.ID) DOMCSSRuleList

DOMCSSRuleListFromID constructs a DOMCSSRuleList from an objc.ID.

func NewDOMCSSRuleList

func NewDOMCSSRuleList() DOMCSSRuleList

NewDOMCSSRuleList creates a new DOMCSSRuleList instance.

func (DOMCSSRuleList) Autorelease

func (d DOMCSSRuleList) Autorelease() DOMCSSRuleList

Autorelease adds the receiver to the current autorelease pool.

func (DOMCSSRuleList) Init

func (d DOMCSSRuleList) Init() DOMCSSRuleList

Init initializes the instance.

type DOMCSSRuleListClass

type DOMCSSRuleListClass struct {
	// contains filtered or unexported fields
}

func GetDOMCSSRuleListClass

func GetDOMCSSRuleListClass() DOMCSSRuleListClass

GetDOMCSSRuleListClass returns the class object for DOMCSSRuleList.

func (DOMCSSRuleListClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMCSSRuleListClass) Class

func (dc DOMCSSRuleListClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMCSSStyleDeclaration

type DOMCSSStyleDeclaration struct {
	DOMObject
}

Instance Properties

Instance Methods

See: https://developer.apple.com/documentation/WebKit/DOMCSSStyleDeclaration

func DOMCSSStyleDeclarationFromID

func DOMCSSStyleDeclarationFromID(id objc.ID) DOMCSSStyleDeclaration

DOMCSSStyleDeclarationFromID constructs a DOMCSSStyleDeclaration from an objc.ID.

func NewDOMCSSStyleDeclaration

func NewDOMCSSStyleDeclaration() DOMCSSStyleDeclaration

NewDOMCSSStyleDeclaration creates a new DOMCSSStyleDeclaration instance.

func (DOMCSSStyleDeclaration) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (DOMCSSStyleDeclaration) Init

Init initializes the instance.

func (DOMCSSStyleDeclaration) SetCssText

func (d DOMCSSStyleDeclaration) SetCssText(value string)

type DOMCSSStyleDeclarationClass

type DOMCSSStyleDeclarationClass struct {
	// contains filtered or unexported fields
}

func GetDOMCSSStyleDeclarationClass

func GetDOMCSSStyleDeclarationClass() DOMCSSStyleDeclarationClass

GetDOMCSSStyleDeclarationClass returns the class object for DOMCSSStyleDeclaration.

func (DOMCSSStyleDeclarationClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMCSSStyleDeclarationClass) Class

Class returns the underlying Objective-C class pointer.

type DOMCSSStyleRule

type DOMCSSStyleRule struct {
	DOMCSSRule
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMCSSStyleRule

func DOMCSSStyleRuleFromID

func DOMCSSStyleRuleFromID(id objc.ID) DOMCSSStyleRule

DOMCSSStyleRuleFromID constructs a DOMCSSStyleRule from an objc.ID.

func NewDOMCSSStyleRule

func NewDOMCSSStyleRule() DOMCSSStyleRule

NewDOMCSSStyleRule creates a new DOMCSSStyleRule instance.

func (DOMCSSStyleRule) Autorelease

func (d DOMCSSStyleRule) Autorelease() DOMCSSStyleRule

Autorelease adds the receiver to the current autorelease pool.

func (DOMCSSStyleRule) Init

Init initializes the instance.

func (DOMCSSStyleRule) SetSelectorText

func (d DOMCSSStyleRule) SetSelectorText(value string)

type DOMCSSStyleRuleClass

type DOMCSSStyleRuleClass struct {
	// contains filtered or unexported fields
}

func GetDOMCSSStyleRuleClass

func GetDOMCSSStyleRuleClass() DOMCSSStyleRuleClass

GetDOMCSSStyleRuleClass returns the class object for DOMCSSStyleRule.

func (DOMCSSStyleRuleClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMCSSStyleRuleClass) Class

func (dc DOMCSSStyleRuleClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMCSSStyleSheet

type DOMCSSStyleSheet struct {
	DOMStyleSheet
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMCSSStyleSheet

func DOMCSSStyleSheetFromID

func DOMCSSStyleSheetFromID(id objc.ID) DOMCSSStyleSheet

DOMCSSStyleSheetFromID constructs a DOMCSSStyleSheet from an objc.ID.

func NewDOMCSSStyleSheet

func NewDOMCSSStyleSheet() DOMCSSStyleSheet

NewDOMCSSStyleSheet creates a new DOMCSSStyleSheet instance.

func (DOMCSSStyleSheet) Autorelease

func (d DOMCSSStyleSheet) Autorelease() DOMCSSStyleSheet

Autorelease adds the receiver to the current autorelease pool.

func (DOMCSSStyleSheet) Init

Init initializes the instance.

type DOMCSSStyleSheetClass

type DOMCSSStyleSheetClass struct {
	// contains filtered or unexported fields
}

func GetDOMCSSStyleSheetClass

func GetDOMCSSStyleSheetClass() DOMCSSStyleSheetClass

GetDOMCSSStyleSheetClass returns the class object for DOMCSSStyleSheet.

func (DOMCSSStyleSheetClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMCSSStyleSheetClass) Class

func (dc DOMCSSStyleSheetClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMCSSUnknownRule

type DOMCSSUnknownRule struct {
	DOMCSSRule
}

See: https://developer.apple.com/documentation/WebKit/DOMCSSUnknownRule

func DOMCSSUnknownRuleFromID

func DOMCSSUnknownRuleFromID(id objc.ID) DOMCSSUnknownRule

DOMCSSUnknownRuleFromID constructs a DOMCSSUnknownRule from an objc.ID.

func NewDOMCSSUnknownRule

func NewDOMCSSUnknownRule() DOMCSSUnknownRule

NewDOMCSSUnknownRule creates a new DOMCSSUnknownRule instance.

func (DOMCSSUnknownRule) Autorelease

func (d DOMCSSUnknownRule) Autorelease() DOMCSSUnknownRule

Autorelease adds the receiver to the current autorelease pool.

func (DOMCSSUnknownRule) Init

Init initializes the instance.

type DOMCSSUnknownRuleClass

type DOMCSSUnknownRuleClass struct {
	// contains filtered or unexported fields
}

func GetDOMCSSUnknownRuleClass

func GetDOMCSSUnknownRuleClass() DOMCSSUnknownRuleClass

GetDOMCSSUnknownRuleClass returns the class object for DOMCSSUnknownRule.

func (DOMCSSUnknownRuleClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMCSSUnknownRuleClass) Class

func (dc DOMCSSUnknownRuleClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMCSSValue

type DOMCSSValue struct {
	DOMObject
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMCSSValue

func DOMCSSValueFromID

func DOMCSSValueFromID(id objc.ID) DOMCSSValue

DOMCSSValueFromID constructs a DOMCSSValue from an objc.ID.

func NewDOMCSSValue

func NewDOMCSSValue() DOMCSSValue

NewDOMCSSValue creates a new DOMCSSValue instance.

func (DOMCSSValue) Autorelease

func (d DOMCSSValue) Autorelease() DOMCSSValue

Autorelease adds the receiver to the current autorelease pool.

func (DOMCSSValue) Init

func (d DOMCSSValue) Init() DOMCSSValue

Init initializes the instance.

func (DOMCSSValue) SetCssText

func (d DOMCSSValue) SetCssText(value string)

type DOMCSSValueClass

type DOMCSSValueClass struct {
	// contains filtered or unexported fields
}

func GetDOMCSSValueClass

func GetDOMCSSValueClass() DOMCSSValueClass

GetDOMCSSValueClass returns the class object for DOMCSSValue.

func (DOMCSSValueClass) Alloc

func (dc DOMCSSValueClass) Alloc() DOMCSSValue

Alloc allocates memory for a new instance of the class.

func (DOMCSSValueClass) Class

func (dc DOMCSSValueClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMCSSValueList

type DOMCSSValueList struct {
	DOMCSSValue
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMCSSValueList

func DOMCSSValueListFromID

func DOMCSSValueListFromID(id objc.ID) DOMCSSValueList

DOMCSSValueListFromID constructs a DOMCSSValueList from an objc.ID.

func NewDOMCSSValueList

func NewDOMCSSValueList() DOMCSSValueList

NewDOMCSSValueList creates a new DOMCSSValueList instance.

func (DOMCSSValueList) Autorelease

func (d DOMCSSValueList) Autorelease() DOMCSSValueList

Autorelease adds the receiver to the current autorelease pool.

func (DOMCSSValueList) Init

Init initializes the instance.

type DOMCSSValueListClass

type DOMCSSValueListClass struct {
	// contains filtered or unexported fields
}

func GetDOMCSSValueListClass

func GetDOMCSSValueListClass() DOMCSSValueListClass

GetDOMCSSValueListClass returns the class object for DOMCSSValueList.

func (DOMCSSValueListClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMCSSValueListClass) Class

func (dc DOMCSSValueListClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMCharacterData

type DOMCharacterData struct {
	DOMNode
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMCharacterData

func DOMCharacterDataFromID

func DOMCharacterDataFromID(id objc.ID) DOMCharacterData

DOMCharacterDataFromID constructs a DOMCharacterData from an objc.ID.

func NewDOMCharacterData

func NewDOMCharacterData() DOMCharacterData

NewDOMCharacterData creates a new DOMCharacterData instance.

func (DOMCharacterData) Autorelease

func (d DOMCharacterData) Autorelease() DOMCharacterData

Autorelease adds the receiver to the current autorelease pool.

func (DOMCharacterData) Init

Init initializes the instance.

func (DOMCharacterData) SetData

func (d DOMCharacterData) SetData(value string)

type DOMCharacterDataClass

type DOMCharacterDataClass struct {
	// contains filtered or unexported fields
}

func GetDOMCharacterDataClass

func GetDOMCharacterDataClass() DOMCharacterDataClass

GetDOMCharacterDataClass returns the class object for DOMCharacterData.

func (DOMCharacterDataClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMCharacterDataClass) Class

func (dc DOMCharacterDataClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMComment

type DOMComment struct {
	DOMCharacterData
}

See: https://developer.apple.com/documentation/WebKit/DOMComment

func DOMCommentFromID

func DOMCommentFromID(id objc.ID) DOMComment

DOMCommentFromID constructs a DOMComment from an objc.ID.

func NewDOMComment

func NewDOMComment() DOMComment

NewDOMComment creates a new DOMComment instance.

func (DOMComment) Autorelease

func (d DOMComment) Autorelease() DOMComment

Autorelease adds the receiver to the current autorelease pool.

func (DOMComment) Init

func (d DOMComment) Init() DOMComment

Init initializes the instance.

type DOMCommentClass

type DOMCommentClass struct {
	// contains filtered or unexported fields
}

func GetDOMCommentClass

func GetDOMCommentClass() DOMCommentClass

GetDOMCommentClass returns the class object for DOMComment.

func (DOMCommentClass) Alloc

func (dc DOMCommentClass) Alloc() DOMComment

Alloc allocates memory for a new instance of the class.

func (DOMCommentClass) Class

func (dc DOMCommentClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMCounter

type DOMCounter struct {
	DOMObject
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMCounter

func DOMCounterFromID

func DOMCounterFromID(id objc.ID) DOMCounter

DOMCounterFromID constructs a DOMCounter from an objc.ID.

func NewDOMCounter

func NewDOMCounter() DOMCounter

NewDOMCounter creates a new DOMCounter instance.

func (DOMCounter) Autorelease

func (d DOMCounter) Autorelease() DOMCounter

Autorelease adds the receiver to the current autorelease pool.

func (DOMCounter) Init

func (d DOMCounter) Init() DOMCounter

Init initializes the instance.

type DOMCounterClass

type DOMCounterClass struct {
	// contains filtered or unexported fields
}

func GetDOMCounterClass

func GetDOMCounterClass() DOMCounterClass

GetDOMCounterClass returns the class object for DOMCounter.

func (DOMCounterClass) Alloc

func (dc DOMCounterClass) Alloc() DOMCounter

Alloc allocates memory for a new instance of the class.

func (DOMCounterClass) Class

func (dc DOMCounterClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMDocument

type DOMDocument struct {
	DOMNode
}

Instance Properties

Instance Methods

See: https://developer.apple.com/documentation/WebKit/DOMDocument

func DOMDocumentFromID

func DOMDocumentFromID(id objc.ID) DOMDocument

DOMDocumentFromID constructs a DOMDocument from an objc.ID.

func NewDOMDocument

func NewDOMDocument() DOMDocument

NewDOMDocument creates a new DOMDocument instance.

func (DOMDocument) Autorelease

func (d DOMDocument) Autorelease() DOMDocument

Autorelease adds the receiver to the current autorelease pool.

func (DOMDocument) Init

func (d DOMDocument) Init() DOMDocument

Init initializes the instance.

func (DOMDocument) SetBody

func (d DOMDocument) SetBody(value IDOMHTMLElement)

func (DOMDocument) SetCharset

func (d DOMDocument) SetCharset(value string)

func (DOMDocument) SetCookie

func (d DOMDocument) SetCookie(value string)

func (DOMDocument) SetDocumentURI

func (d DOMDocument) SetDocumentURI(value string)

func (DOMDocument) SetSelectedStylesheetSet

func (d DOMDocument) SetSelectedStylesheetSet(value string)

func (DOMDocument) SetTitle

func (d DOMDocument) SetTitle(value string)

func (DOMDocument) SetXmlStandalone

func (d DOMDocument) SetXmlStandalone(value bool)

func (DOMDocument) SetXmlVersion

func (d DOMDocument) SetXmlVersion(value string)

func (DOMDocument) URLWithAttributeString

func (d DOMDocument) URLWithAttributeString(string_ string) foundation.NSURL

Constructs a URL given an attribute string.

string: The HTML attribute string to convert.

Return Value

An [NSURL] object containing an absolute URL derived from the specified attribute string.

Discussion

This method constructs a URL given the string value of an element attribute. Examples include the `href` attribute of a DOMHTMLAnchorElement object, or the `src` attribute of a DOMHTMLImageElement object. This method only applies to attributes that refer to URLs.

This method is similar to init(string:) in the [NSURL] class, except that `URLWithAttributeString:` handles relative URLs automatically based on the current document’s location.

See: https://developer.apple.com/documentation/WebKit/DOMDocument/url(withAttributeString:)

func (DOMDocument) WebFrame

func (d DOMDocument) WebFrame() IWebFrame

The web frame associated with the DOM document.

See: https://developer.apple.com/documentation/WebKit/DOMDocument/webFrame

type DOMDocumentClass

type DOMDocumentClass struct {
	// contains filtered or unexported fields
}

func GetDOMDocumentClass

func GetDOMDocumentClass() DOMDocumentClass

GetDOMDocumentClass returns the class object for DOMDocument.

func (DOMDocumentClass) Alloc

func (dc DOMDocumentClass) Alloc() DOMDocument

Alloc allocates memory for a new instance of the class.

func (DOMDocumentClass) Class

func (dc DOMDocumentClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMDocumentFragment

type DOMDocumentFragment struct {
	DOMNode
}

See: https://developer.apple.com/documentation/WebKit/DOMDocumentFragment

func DOMDocumentFragmentFromID

func DOMDocumentFragmentFromID(id objc.ID) DOMDocumentFragment

DOMDocumentFragmentFromID constructs a DOMDocumentFragment from an objc.ID.

func NewDOMDocumentFragment

func NewDOMDocumentFragment() DOMDocumentFragment

NewDOMDocumentFragment creates a new DOMDocumentFragment instance.

func (DOMDocumentFragment) Autorelease

func (d DOMDocumentFragment) Autorelease() DOMDocumentFragment

Autorelease adds the receiver to the current autorelease pool.

func (DOMDocumentFragment) Init

Init initializes the instance.

type DOMDocumentFragmentClass

type DOMDocumentFragmentClass struct {
	// contains filtered or unexported fields
}

func GetDOMDocumentFragmentClass

func GetDOMDocumentFragmentClass() DOMDocumentFragmentClass

GetDOMDocumentFragmentClass returns the class object for DOMDocumentFragment.

func (DOMDocumentFragmentClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMDocumentFragmentClass) Class

func (dc DOMDocumentFragmentClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMDocumentType

type DOMDocumentType struct {
	DOMNode
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMDocumentType

func DOMDocumentTypeFromID

func DOMDocumentTypeFromID(id objc.ID) DOMDocumentType

DOMDocumentTypeFromID constructs a DOMDocumentType from an objc.ID.

func NewDOMDocumentType

func NewDOMDocumentType() DOMDocumentType

NewDOMDocumentType creates a new DOMDocumentType instance.

func (DOMDocumentType) Autorelease

func (d DOMDocumentType) Autorelease() DOMDocumentType

Autorelease adds the receiver to the current autorelease pool.

func (DOMDocumentType) Init

Init initializes the instance.

type DOMDocumentTypeClass

type DOMDocumentTypeClass struct {
	// contains filtered or unexported fields
}

func GetDOMDocumentTypeClass

func GetDOMDocumentTypeClass() DOMDocumentTypeClass

GetDOMDocumentTypeClass returns the class object for DOMDocumentType.

func (DOMDocumentTypeClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMDocumentTypeClass) Class

func (dc DOMDocumentTypeClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMElement

type DOMElement struct {
	DOMNode
}

Instance Properties

Instance Methods

See: https://developer.apple.com/documentation/WebKit/DOMElement

func DOMElementFromID

func DOMElementFromID(id objc.ID) DOMElement

DOMElementFromID constructs a DOMElement from an objc.ID.

func NewDOMElement

func NewDOMElement() DOMElement

NewDOMElement creates a new DOMElement instance.

func (DOMElement) Autorelease

func (d DOMElement) Autorelease() DOMElement

Autorelease adds the receiver to the current autorelease pool.

func (DOMElement) Image

func (d DOMElement) Image() appkit.NSImage

Returns an image associated with the receiver.

Discussion

Returns an [NSImage] for the receiver if it is a DOMHTMLImageElement object—a DOMHTMLObjectElement object with an image loaded or a DOMHTMLInputElement object of type image. Returns `nil` if there is an error loading the image or the element does not contain an image.

See: https://developer.apple.com/documentation/WebKit/DOMElement/image()

func (DOMElement) Init

func (d DOMElement) Init() DOMElement

Init initializes the instance.

func (DOMElement) SetClassName

func (d DOMElement) SetClassName(value string)

func (DOMElement) SetInnerHTML

func (d DOMElement) SetInnerHTML(value string)

func (DOMElement) SetOuterHTML

func (d DOMElement) SetOuterHTML(value string)

func (DOMElement) SetScrollLeft

func (d DOMElement) SetScrollLeft(value int32)

func (DOMElement) SetScrollTop

func (d DOMElement) SetScrollTop(value int32)

type DOMElementClass

type DOMElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMElementClass

func GetDOMElementClass() DOMElementClass

GetDOMElementClass returns the class object for DOMElement.

func (DOMElementClass) Alloc

func (dc DOMElementClass) Alloc() DOMElement

Alloc allocates memory for a new instance of the class.

func (DOMElementClass) Class

func (dc DOMElementClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMEntity

type DOMEntity struct {
	DOMNode
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMEntity

func DOMEntityFromID

func DOMEntityFromID(id objc.ID) DOMEntity

DOMEntityFromID constructs a DOMEntity from an objc.ID.

func NewDOMEntity

func NewDOMEntity() DOMEntity

NewDOMEntity creates a new DOMEntity instance.

func (DOMEntity) Autorelease

func (d DOMEntity) Autorelease() DOMEntity

Autorelease adds the receiver to the current autorelease pool.

func (DOMEntity) Init

func (d DOMEntity) Init() DOMEntity

Init initializes the instance.

type DOMEntityClass

type DOMEntityClass struct {
	// contains filtered or unexported fields
}

func GetDOMEntityClass

func GetDOMEntityClass() DOMEntityClass

GetDOMEntityClass returns the class object for DOMEntity.

func (DOMEntityClass) Alloc

func (dc DOMEntityClass) Alloc() DOMEntity

Alloc allocates memory for a new instance of the class.

func (DOMEntityClass) Class

func (dc DOMEntityClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMEntityReference

type DOMEntityReference struct {
	DOMNode
}

See: https://developer.apple.com/documentation/WebKit/DOMEntityReference

func DOMEntityReferenceFromID

func DOMEntityReferenceFromID(id objc.ID) DOMEntityReference

DOMEntityReferenceFromID constructs a DOMEntityReference from an objc.ID.

func NewDOMEntityReference

func NewDOMEntityReference() DOMEntityReference

NewDOMEntityReference creates a new DOMEntityReference instance.

func (DOMEntityReference) Autorelease

func (d DOMEntityReference) Autorelease() DOMEntityReference

Autorelease adds the receiver to the current autorelease pool.

func (DOMEntityReference) Init

Init initializes the instance.

type DOMEntityReferenceClass

type DOMEntityReferenceClass struct {
	// contains filtered or unexported fields
}

func GetDOMEntityReferenceClass

func GetDOMEntityReferenceClass() DOMEntityReferenceClass

GetDOMEntityReferenceClass returns the class object for DOMEntityReference.

func (DOMEntityReferenceClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMEntityReferenceClass) Class

func (dc DOMEntityReferenceClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMEvent

type DOMEvent struct {
	DOMObject
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMEvent

func DOMEventFromID

func DOMEventFromID(id objc.ID) DOMEvent

DOMEventFromID constructs a DOMEvent from an objc.ID.

func NewDOMEvent

func NewDOMEvent() DOMEvent

NewDOMEvent creates a new DOMEvent instance.

func (DOMEvent) Autorelease

func (d DOMEvent) Autorelease() DOMEvent

Autorelease adds the receiver to the current autorelease pool.

func (DOMEvent) Init

func (d DOMEvent) Init() DOMEvent

Init initializes the instance.

func (DOMEvent) SetCancelBubble

func (d DOMEvent) SetCancelBubble(value bool)

func (DOMEvent) SetReturnValue

func (d DOMEvent) SetReturnValue(value bool)

type DOMEventClass

type DOMEventClass struct {
	// contains filtered or unexported fields
}

func GetDOMEventClass

func GetDOMEventClass() DOMEventClass

GetDOMEventClass returns the class object for DOMEvent.

func (DOMEventClass) Alloc

func (dc DOMEventClass) Alloc() DOMEvent

Alloc allocates memory for a new instance of the class.

func (DOMEventClass) Class

func (dc DOMEventClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMEventExceptionCode deprecated

type DOMEventExceptionCode uint32

Deprecated: Deprecated since macOS 10.14. See: https://developer.apple.com/documentation/WebKit/DOMEventExceptionCode

const (
	DOM_UNSPECIFIED_EVENT_TYPE_ERR DOMEventExceptionCode = 0
)

func (DOMEventExceptionCode) String

func (e DOMEventExceptionCode) String() string

type DOMEventListener

type DOMEventListener interface {
	objectivec.IObject

	// HandleEvent protocol.
	//
	// See: https://developer.apple.com/documentation/WebKit/DOMEventListener/handle(_:)
	HandleEvent(event IDOMEvent)
}

DOMEventListener protocol.

See: https://developer.apple.com/documentation/WebKit/DOMEventListener

type DOMEventListenerObject

type DOMEventListenerObject struct {
	objectivec.Object
}

DOMEventListenerObject wraps an existing Objective-C object that conforms to the DOMEventListener protocol.

func DOMEventListenerObjectFromID

func DOMEventListenerObjectFromID(id objc.ID) DOMEventListenerObject

DOMEventListenerObjectFromID constructs a DOMEventListenerObject from an objc.ID. The object is determined to conform to the protocol at runtime.

func (DOMEventListenerObject) BaseObject

func (o DOMEventListenerObject) BaseObject() objectivec.Object

type DOMEventTarget

type DOMEventTarget interface {
	objectivec.IObject
	foundation.NSCopying

	// AddEventListenerListenerUseCapture protocol.
	//
	// See: https://developer.apple.com/documentation/WebKit/DOMEventTarget/addEventListener(_:listener:useCapture:)
	AddEventListenerListenerUseCapture(type_ string, listener DOMEventListener, useCapture bool)

	// DispatchEvent protocol.
	//
	// See: https://developer.apple.com/documentation/WebKit/DOMEventTarget/dispatchEvent(_:)
	DispatchEvent(event IDOMEvent) bool

	// RemoveEventListenerListenerUseCapture protocol.
	//
	// See: https://developer.apple.com/documentation/WebKit/DOMEventTarget/removeEventListener(_:listener:useCapture:)
	RemoveEventListenerListenerUseCapture(type_ string, listener DOMEventListener, useCapture bool)

	// AddEventListener protocol.
	//
	// See: https://developer.apple.com/documentation/WebKit/DOMEventTarget/addEventListener:::
	AddEventListener(type_ string, listener DOMEventListener, useCapture bool)

	// RemoveEventListener protocol.
	//
	// See: https://developer.apple.com/documentation/WebKit/DOMEventTarget/removeEventListener:::
	RemoveEventListener(type_ string, listener DOMEventListener, useCapture bool)
}

DOMEventTarget protocol.

See: https://developer.apple.com/documentation/WebKit/DOMEventTarget

type DOMEventTargetObject

type DOMEventTargetObject struct {
	foundation.NSCopyingObject
}

DOMEventTargetObject wraps an existing Objective-C object that conforms to the DOMEventTarget protocol.

func DOMEventTargetObjectFromID

func DOMEventTargetObjectFromID(id objc.ID) DOMEventTargetObject

DOMEventTargetObjectFromID constructs a DOMEventTargetObject from an objc.ID. The object is determined to conform to the protocol at runtime.

func (DOMEventTargetObject) AddEventListener

func (o DOMEventTargetObject) AddEventListener(type_ string, listener DOMEventListener, useCapture bool)

See: https://developer.apple.com/documentation/WebKit/DOMEventTarget/addEventListener:::

func (DOMEventTargetObject) BaseObject

func (o DOMEventTargetObject) BaseObject() objectivec.Object

func (DOMEventTargetObject) RemoveEventListener

func (o DOMEventTargetObject) RemoveEventListener(type_ string, listener DOMEventListener, useCapture bool)

See: https://developer.apple.com/documentation/WebKit/DOMEventTarget/removeEventListener:::

type DOMExceptionCode deprecated

type DOMExceptionCode uint32

Deprecated: Deprecated since macOS 10.14. See: https://developer.apple.com/documentation/WebKit/DOMExceptionCode

const (
	DOM_DOMSTRING_SIZE_ERR          DOMExceptionCode = 2
	DOM_HIERARCHY_REQUEST_ERR       DOMExceptionCode = 3
	DOM_INDEX_SIZE_ERR              DOMExceptionCode = 1
	DOM_INUSE_ATTRIBUTE_ERR         DOMExceptionCode = 10
	DOM_INVALID_ACCESS_ERR          DOMExceptionCode = 15
	DOM_INVALID_CHARACTER_ERR       DOMExceptionCode = 5
	DOM_INVALID_MODIFICATION_ERR    DOMExceptionCode = 13
	DOM_INVALID_STATE_ERR           DOMExceptionCode = 11
	DOM_NAMESPACE_ERR               DOMExceptionCode = 14
	DOM_NOT_FOUND_ERR               DOMExceptionCode = 8
	DOM_NOT_SUPPORTED_ERR           DOMExceptionCode = 9
	DOM_NO_DATA_ALLOWED_ERR         DOMExceptionCode = 6
	DOM_NO_MODIFICATION_ALLOWED_ERR DOMExceptionCode = 7
	DOM_SYNTAX_ERR                  DOMExceptionCode = 12
	DOM_WRONG_DOCUMENT_ERR          DOMExceptionCode = 4
)

func (DOMExceptionCode) String

func (e DOMExceptionCode) String() string

type DOMFile

type DOMFile struct {
	DOMBlob
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMFile

func DOMFileFromID

func DOMFileFromID(id objc.ID) DOMFile

DOMFileFromID constructs a DOMFile from an objc.ID.

func NewDOMFile

func NewDOMFile() DOMFile

NewDOMFile creates a new DOMFile instance.

func (DOMFile) Autorelease

func (d DOMFile) Autorelease() DOMFile

Autorelease adds the receiver to the current autorelease pool.

func (DOMFile) Init

func (d DOMFile) Init() DOMFile

Init initializes the instance.

type DOMFileClass

type DOMFileClass struct {
	// contains filtered or unexported fields
}

func GetDOMFileClass

func GetDOMFileClass() DOMFileClass

GetDOMFileClass returns the class object for DOMFile.

func (DOMFileClass) Alloc

func (dc DOMFileClass) Alloc() DOMFile

Alloc allocates memory for a new instance of the class.

func (DOMFileClass) Class

func (dc DOMFileClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMFileList

type DOMFileList struct {
	DOMObject
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMFileList

func DOMFileListFromID

func DOMFileListFromID(id objc.ID) DOMFileList

DOMFileListFromID constructs a DOMFileList from an objc.ID.

func NewDOMFileList

func NewDOMFileList() DOMFileList

NewDOMFileList creates a new DOMFileList instance.

func (DOMFileList) Autorelease

func (d DOMFileList) Autorelease() DOMFileList

Autorelease adds the receiver to the current autorelease pool.

func (DOMFileList) Init

func (d DOMFileList) Init() DOMFileList

Init initializes the instance.

type DOMFileListClass

type DOMFileListClass struct {
	// contains filtered or unexported fields
}

func GetDOMFileListClass

func GetDOMFileListClass() DOMFileListClass

GetDOMFileListClass returns the class object for DOMFileList.

func (DOMFileListClass) Alloc

func (dc DOMFileListClass) Alloc() DOMFileList

Alloc allocates memory for a new instance of the class.

func (DOMFileListClass) Class

func (dc DOMFileListClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLAnchorElement

type DOMHTMLAnchorElement struct {
	DOMHTMLElement
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLAnchorElement

func DOMHTMLAnchorElementFromID

func DOMHTMLAnchorElementFromID(id objc.ID) DOMHTMLAnchorElement

DOMHTMLAnchorElementFromID constructs a DOMHTMLAnchorElement from an objc.ID.

func NewDOMHTMLAnchorElement

func NewDOMHTMLAnchorElement() DOMHTMLAnchorElement

NewDOMHTMLAnchorElement creates a new DOMHTMLAnchorElement instance.

func (DOMHTMLAnchorElement) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLAnchorElement) Init

Init initializes the instance.

func (DOMHTMLAnchorElement) SetCharset

func (d DOMHTMLAnchorElement) SetCharset(value string)

func (DOMHTMLAnchorElement) SetCoords

func (d DOMHTMLAnchorElement) SetCoords(value string)

func (DOMHTMLAnchorElement) SetHref

func (d DOMHTMLAnchorElement) SetHref(value string)

func (DOMHTMLAnchorElement) SetHreflang

func (d DOMHTMLAnchorElement) SetHreflang(value string)

func (DOMHTMLAnchorElement) SetName

func (d DOMHTMLAnchorElement) SetName(value string)

func (DOMHTMLAnchorElement) SetRel

func (d DOMHTMLAnchorElement) SetRel(value string)

func (DOMHTMLAnchorElement) SetRev

func (d DOMHTMLAnchorElement) SetRev(value string)

func (DOMHTMLAnchorElement) SetShape

func (d DOMHTMLAnchorElement) SetShape(value string)

func (DOMHTMLAnchorElement) SetTarget

func (d DOMHTMLAnchorElement) SetTarget(value string)

func (DOMHTMLAnchorElement) SetType

func (d DOMHTMLAnchorElement) SetType(value string)

type DOMHTMLAnchorElementClass

type DOMHTMLAnchorElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLAnchorElementClass

func GetDOMHTMLAnchorElementClass() DOMHTMLAnchorElementClass

GetDOMHTMLAnchorElementClass returns the class object for DOMHTMLAnchorElement.

func (DOMHTMLAnchorElementClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLAnchorElementClass) Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLAppletElement

type DOMHTMLAppletElement struct {
	DOMHTMLElement
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLAppletElement

func DOMHTMLAppletElementFromID

func DOMHTMLAppletElementFromID(id objc.ID) DOMHTMLAppletElement

DOMHTMLAppletElementFromID constructs a DOMHTMLAppletElement from an objc.ID.

func NewDOMHTMLAppletElement

func NewDOMHTMLAppletElement() DOMHTMLAppletElement

NewDOMHTMLAppletElement creates a new DOMHTMLAppletElement instance.

func (DOMHTMLAppletElement) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLAppletElement) Init

Init initializes the instance.

func (DOMHTMLAppletElement) SetAlign

func (d DOMHTMLAppletElement) SetAlign(value string)

func (DOMHTMLAppletElement) SetAlt

func (d DOMHTMLAppletElement) SetAlt(value string)

func (DOMHTMLAppletElement) SetArchive

func (d DOMHTMLAppletElement) SetArchive(value string)

func (DOMHTMLAppletElement) SetCode

func (d DOMHTMLAppletElement) SetCode(value string)

func (DOMHTMLAppletElement) SetCodeBase

func (d DOMHTMLAppletElement) SetCodeBase(value string)

func (DOMHTMLAppletElement) SetGetObject

func (d DOMHTMLAppletElement) SetGetObject(value string)

func (DOMHTMLAppletElement) SetHeight

func (d DOMHTMLAppletElement) SetHeight(value string)

func (DOMHTMLAppletElement) SetHspace

func (d DOMHTMLAppletElement) SetHspace(value int32)

func (DOMHTMLAppletElement) SetName

func (d DOMHTMLAppletElement) SetName(value string)

func (DOMHTMLAppletElement) SetVspace

func (d DOMHTMLAppletElement) SetVspace(value int32)

func (DOMHTMLAppletElement) SetWidth

func (d DOMHTMLAppletElement) SetWidth(value string)

type DOMHTMLAppletElementClass

type DOMHTMLAppletElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLAppletElementClass

func GetDOMHTMLAppletElementClass() DOMHTMLAppletElementClass

GetDOMHTMLAppletElementClass returns the class object for DOMHTMLAppletElement.

func (DOMHTMLAppletElementClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLAppletElementClass) Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLAreaElement

type DOMHTMLAreaElement struct {
	DOMHTMLElement
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLAreaElement

func DOMHTMLAreaElementFromID

func DOMHTMLAreaElementFromID(id objc.ID) DOMHTMLAreaElement

DOMHTMLAreaElementFromID constructs a DOMHTMLAreaElement from an objc.ID.

func NewDOMHTMLAreaElement

func NewDOMHTMLAreaElement() DOMHTMLAreaElement

NewDOMHTMLAreaElement creates a new DOMHTMLAreaElement instance.

func (DOMHTMLAreaElement) Autorelease

func (d DOMHTMLAreaElement) Autorelease() DOMHTMLAreaElement

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLAreaElement) Init

Init initializes the instance.

func (DOMHTMLAreaElement) SetAlt

func (d DOMHTMLAreaElement) SetAlt(value string)

func (DOMHTMLAreaElement) SetCoords

func (d DOMHTMLAreaElement) SetCoords(value string)

func (DOMHTMLAreaElement) SetHref

func (d DOMHTMLAreaElement) SetHref(value string)

func (DOMHTMLAreaElement) SetNoHref

func (d DOMHTMLAreaElement) SetNoHref(value bool)

func (DOMHTMLAreaElement) SetShape

func (d DOMHTMLAreaElement) SetShape(value string)

func (DOMHTMLAreaElement) SetTarget

func (d DOMHTMLAreaElement) SetTarget(value string)

type DOMHTMLAreaElementClass

type DOMHTMLAreaElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLAreaElementClass

func GetDOMHTMLAreaElementClass() DOMHTMLAreaElementClass

GetDOMHTMLAreaElementClass returns the class object for DOMHTMLAreaElement.

func (DOMHTMLAreaElementClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLAreaElementClass) Class

func (dc DOMHTMLAreaElementClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLBRElement

type DOMHTMLBRElement struct {
	DOMHTMLElement
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLBRElement

func DOMHTMLBRElementFromID

func DOMHTMLBRElementFromID(id objc.ID) DOMHTMLBRElement

DOMHTMLBRElementFromID constructs a DOMHTMLBRElement from an objc.ID.

func NewDOMHTMLBRElement

func NewDOMHTMLBRElement() DOMHTMLBRElement

NewDOMHTMLBRElement creates a new DOMHTMLBRElement instance.

func (DOMHTMLBRElement) Autorelease

func (d DOMHTMLBRElement) Autorelease() DOMHTMLBRElement

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLBRElement) Init

Init initializes the instance.

func (DOMHTMLBRElement) SetClear

func (d DOMHTMLBRElement) SetClear(value string)

type DOMHTMLBRElementClass

type DOMHTMLBRElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLBRElementClass

func GetDOMHTMLBRElementClass() DOMHTMLBRElementClass

GetDOMHTMLBRElementClass returns the class object for DOMHTMLBRElement.

func (DOMHTMLBRElementClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLBRElementClass) Class

func (dc DOMHTMLBRElementClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLBaseElement

type DOMHTMLBaseElement struct {
	DOMHTMLElement
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLBaseElement

func DOMHTMLBaseElementFromID

func DOMHTMLBaseElementFromID(id objc.ID) DOMHTMLBaseElement

DOMHTMLBaseElementFromID constructs a DOMHTMLBaseElement from an objc.ID.

func NewDOMHTMLBaseElement

func NewDOMHTMLBaseElement() DOMHTMLBaseElement

NewDOMHTMLBaseElement creates a new DOMHTMLBaseElement instance.

func (DOMHTMLBaseElement) Autorelease

func (d DOMHTMLBaseElement) Autorelease() DOMHTMLBaseElement

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLBaseElement) Init

Init initializes the instance.

func (DOMHTMLBaseElement) SetHref

func (d DOMHTMLBaseElement) SetHref(value string)

func (DOMHTMLBaseElement) SetTarget

func (d DOMHTMLBaseElement) SetTarget(value string)

type DOMHTMLBaseElementClass

type DOMHTMLBaseElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLBaseElementClass

func GetDOMHTMLBaseElementClass() DOMHTMLBaseElementClass

GetDOMHTMLBaseElementClass returns the class object for DOMHTMLBaseElement.

func (DOMHTMLBaseElementClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLBaseElementClass) Class

func (dc DOMHTMLBaseElementClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLBaseFontElement

type DOMHTMLBaseFontElement struct {
	DOMHTMLElement
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLBaseFontElement

func DOMHTMLBaseFontElementFromID

func DOMHTMLBaseFontElementFromID(id objc.ID) DOMHTMLBaseFontElement

DOMHTMLBaseFontElementFromID constructs a DOMHTMLBaseFontElement from an objc.ID.

func NewDOMHTMLBaseFontElement

func NewDOMHTMLBaseFontElement() DOMHTMLBaseFontElement

NewDOMHTMLBaseFontElement creates a new DOMHTMLBaseFontElement instance.

func (DOMHTMLBaseFontElement) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLBaseFontElement) Init

Init initializes the instance.

func (DOMHTMLBaseFontElement) SetColor

func (d DOMHTMLBaseFontElement) SetColor(value string)

func (DOMHTMLBaseFontElement) SetFace

func (d DOMHTMLBaseFontElement) SetFace(value string)

func (DOMHTMLBaseFontElement) SetSize

func (d DOMHTMLBaseFontElement) SetSize(value string)

type DOMHTMLBaseFontElementClass

type DOMHTMLBaseFontElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLBaseFontElementClass

func GetDOMHTMLBaseFontElementClass() DOMHTMLBaseFontElementClass

GetDOMHTMLBaseFontElementClass returns the class object for DOMHTMLBaseFontElement.

func (DOMHTMLBaseFontElementClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLBaseFontElementClass) Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLBodyElement

type DOMHTMLBodyElement struct {
	DOMHTMLElement
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLBodyElement

func DOMHTMLBodyElementFromID

func DOMHTMLBodyElementFromID(id objc.ID) DOMHTMLBodyElement

DOMHTMLBodyElementFromID constructs a DOMHTMLBodyElement from an objc.ID.

func NewDOMHTMLBodyElement

func NewDOMHTMLBodyElement() DOMHTMLBodyElement

NewDOMHTMLBodyElement creates a new DOMHTMLBodyElement instance.

func (DOMHTMLBodyElement) Autorelease

func (d DOMHTMLBodyElement) Autorelease() DOMHTMLBodyElement

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLBodyElement) Init

Init initializes the instance.

func (d DOMHTMLBodyElement) SetALink(value string)

func (DOMHTMLBodyElement) SetBackground

func (d DOMHTMLBodyElement) SetBackground(value string)

func (DOMHTMLBodyElement) SetBgColor

func (d DOMHTMLBodyElement) SetBgColor(value string)
func (d DOMHTMLBodyElement) SetLink(value string)

func (DOMHTMLBodyElement) SetText

func (d DOMHTMLBodyElement) SetText(value string)
func (d DOMHTMLBodyElement) SetVLink(value string)

type DOMHTMLBodyElementClass

type DOMHTMLBodyElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLBodyElementClass

func GetDOMHTMLBodyElementClass() DOMHTMLBodyElementClass

GetDOMHTMLBodyElementClass returns the class object for DOMHTMLBodyElement.

func (DOMHTMLBodyElementClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLBodyElementClass) Class

func (dc DOMHTMLBodyElementClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLButtonElement

type DOMHTMLButtonElement struct {
	DOMHTMLElement
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLButtonElement

func DOMHTMLButtonElementFromID

func DOMHTMLButtonElementFromID(id objc.ID) DOMHTMLButtonElement

DOMHTMLButtonElementFromID constructs a DOMHTMLButtonElement from an objc.ID.

func NewDOMHTMLButtonElement

func NewDOMHTMLButtonElement() DOMHTMLButtonElement

NewDOMHTMLButtonElement creates a new DOMHTMLButtonElement instance.

func (DOMHTMLButtonElement) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLButtonElement) Init

Init initializes the instance.

func (DOMHTMLButtonElement) SetAutofocus

func (d DOMHTMLButtonElement) SetAutofocus(value bool)

func (DOMHTMLButtonElement) SetDisabled

func (d DOMHTMLButtonElement) SetDisabled(value bool)

func (DOMHTMLButtonElement) SetName

func (d DOMHTMLButtonElement) SetName(value string)

func (DOMHTMLButtonElement) SetType

func (d DOMHTMLButtonElement) SetType(value string)

func (DOMHTMLButtonElement) SetValue

func (d DOMHTMLButtonElement) SetValue(value string)

type DOMHTMLButtonElementClass

type DOMHTMLButtonElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLButtonElementClass

func GetDOMHTMLButtonElementClass() DOMHTMLButtonElementClass

GetDOMHTMLButtonElementClass returns the class object for DOMHTMLButtonElement.

func (DOMHTMLButtonElementClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLButtonElementClass) Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLCollection

type DOMHTMLCollection struct {
	DOMObject
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLCollection

func DOMHTMLCollectionFromID

func DOMHTMLCollectionFromID(id objc.ID) DOMHTMLCollection

DOMHTMLCollectionFromID constructs a DOMHTMLCollection from an objc.ID.

func NewDOMHTMLCollection

func NewDOMHTMLCollection() DOMHTMLCollection

NewDOMHTMLCollection creates a new DOMHTMLCollection instance.

func (DOMHTMLCollection) Autorelease

func (d DOMHTMLCollection) Autorelease() DOMHTMLCollection

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLCollection) Init

Init initializes the instance.

type DOMHTMLCollectionClass

type DOMHTMLCollectionClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLCollectionClass

func GetDOMHTMLCollectionClass() DOMHTMLCollectionClass

GetDOMHTMLCollectionClass returns the class object for DOMHTMLCollection.

func (DOMHTMLCollectionClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLCollectionClass) Class

func (dc DOMHTMLCollectionClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLDListElement

type DOMHTMLDListElement struct {
	DOMHTMLElement
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLDListElement

func DOMHTMLDListElementFromID

func DOMHTMLDListElementFromID(id objc.ID) DOMHTMLDListElement

DOMHTMLDListElementFromID constructs a DOMHTMLDListElement from an objc.ID.

func NewDOMHTMLDListElement

func NewDOMHTMLDListElement() DOMHTMLDListElement

NewDOMHTMLDListElement creates a new DOMHTMLDListElement instance.

func (DOMHTMLDListElement) Autorelease

func (d DOMHTMLDListElement) Autorelease() DOMHTMLDListElement

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLDListElement) Init

Init initializes the instance.

func (DOMHTMLDListElement) SetCompact

func (d DOMHTMLDListElement) SetCompact(value bool)

type DOMHTMLDListElementClass

type DOMHTMLDListElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLDListElementClass

func GetDOMHTMLDListElementClass() DOMHTMLDListElementClass

GetDOMHTMLDListElementClass returns the class object for DOMHTMLDListElement.

func (DOMHTMLDListElementClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLDListElementClass) Class

func (dc DOMHTMLDListElementClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLDirectoryElement

type DOMHTMLDirectoryElement struct {
	DOMHTMLElement
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLDirectoryElement

func DOMHTMLDirectoryElementFromID

func DOMHTMLDirectoryElementFromID(id objc.ID) DOMHTMLDirectoryElement

DOMHTMLDirectoryElementFromID constructs a DOMHTMLDirectoryElement from an objc.ID.

func NewDOMHTMLDirectoryElement

func NewDOMHTMLDirectoryElement() DOMHTMLDirectoryElement

NewDOMHTMLDirectoryElement creates a new DOMHTMLDirectoryElement instance.

func (DOMHTMLDirectoryElement) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLDirectoryElement) Init

Init initializes the instance.

func (DOMHTMLDirectoryElement) SetCompact

func (d DOMHTMLDirectoryElement) SetCompact(value bool)

type DOMHTMLDirectoryElementClass

type DOMHTMLDirectoryElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLDirectoryElementClass

func GetDOMHTMLDirectoryElementClass() DOMHTMLDirectoryElementClass

GetDOMHTMLDirectoryElementClass returns the class object for DOMHTMLDirectoryElement.

func (DOMHTMLDirectoryElementClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLDirectoryElementClass) Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLDivElement

type DOMHTMLDivElement struct {
	DOMHTMLElement
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLDivElement

func DOMHTMLDivElementFromID

func DOMHTMLDivElementFromID(id objc.ID) DOMHTMLDivElement

DOMHTMLDivElementFromID constructs a DOMHTMLDivElement from an objc.ID.

func NewDOMHTMLDivElement

func NewDOMHTMLDivElement() DOMHTMLDivElement

NewDOMHTMLDivElement creates a new DOMHTMLDivElement instance.

func (DOMHTMLDivElement) Autorelease

func (d DOMHTMLDivElement) Autorelease() DOMHTMLDivElement

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLDivElement) Init

Init initializes the instance.

func (DOMHTMLDivElement) SetAlign

func (d DOMHTMLDivElement) SetAlign(value string)

type DOMHTMLDivElementClass

type DOMHTMLDivElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLDivElementClass

func GetDOMHTMLDivElementClass() DOMHTMLDivElementClass

GetDOMHTMLDivElementClass returns the class object for DOMHTMLDivElement.

func (DOMHTMLDivElementClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLDivElementClass) Class

func (dc DOMHTMLDivElementClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLDocument

type DOMHTMLDocument struct {
	DOMDocument
}

Instance Properties

Instance Methods

See: https://developer.apple.com/documentation/WebKit/DOMHTMLDocument

func DOMHTMLDocumentFromID

func DOMHTMLDocumentFromID(id objc.ID) DOMHTMLDocument

DOMHTMLDocumentFromID constructs a DOMHTMLDocument from an objc.ID.

func NewDOMHTMLDocument

func NewDOMHTMLDocument() DOMHTMLDocument

NewDOMHTMLDocument creates a new DOMHTMLDocument instance.

func (DOMHTMLDocument) Autorelease

func (d DOMHTMLDocument) Autorelease() DOMHTMLDocument

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLDocument) CreateDocumentFragmentWithMarkupStringBaseURL

func (d DOMHTMLDocument) CreateDocumentFragmentWithMarkupStringBaseURL(markupString string, baseURL foundation.NSURL) IDOMDocumentFragment

Creates a document fragment containing the given HTML markup.

markupString: The HTML content to parse into a DOM tree.

baseURL: The URI from which the content originated. Used for interpreting relative URLs.

Return Value

A DOMDocumentFragment derived from the original markup string.

Discussion

This is a convenience method for the `createDocumentFragment` method in DOMDocument. It creates a fragment that has the HTML markup parsed into child nodes of the fragment using the `baseURL` to resolve any relative paths for images or other resources.

See: https://developer.apple.com/documentation/WebKit/DOMHTMLDocument/createDocumentFragment(withMarkupString:baseURL:)

func (DOMHTMLDocument) CreateDocumentFragmentWithText

func (d DOMHTMLDocument) CreateDocumentFragmentWithText(text string) IDOMDocumentFragment

Creates a document fragment containing the given text.

text: The text to convert.

Return Value

A DOMDocumentFragment object derived from the source text.

Discussion

This is a convenience method for the `createDocumentFragment` method in DOMDocument. This method creates a fragment that contains the supplied plain text.

See: https://developer.apple.com/documentation/WebKit/DOMHTMLDocument/createDocumentFragment(withText:)

func (DOMHTMLDocument) Init

Init initializes the instance.

func (DOMHTMLDocument) SetAlinkColor

func (d DOMHTMLDocument) SetAlinkColor(value string)

func (DOMHTMLDocument) SetBgColor

func (d DOMHTMLDocument) SetBgColor(value string)

func (DOMHTMLDocument) SetDesignMode

func (d DOMHTMLDocument) SetDesignMode(value string)

func (DOMHTMLDocument) SetDir

func (d DOMHTMLDocument) SetDir(value string)

func (DOMHTMLDocument) SetFgColor

func (d DOMHTMLDocument) SetFgColor(value string)

func (DOMHTMLDocument) SetLinkColor

func (d DOMHTMLDocument) SetLinkColor(value string)

func (DOMHTMLDocument) SetVlinkColor

func (d DOMHTMLDocument) SetVlinkColor(value string)

type DOMHTMLDocumentClass

type DOMHTMLDocumentClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLDocumentClass

func GetDOMHTMLDocumentClass() DOMHTMLDocumentClass

GetDOMHTMLDocumentClass returns the class object for DOMHTMLDocument.

func (DOMHTMLDocumentClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLDocumentClass) Class

func (dc DOMHTMLDocumentClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLElement

type DOMHTMLElement struct {
	DOMElement
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLElement

func DOMHTMLElementFromID

func DOMHTMLElementFromID(id objc.ID) DOMHTMLElement

DOMHTMLElementFromID constructs a DOMHTMLElement from an objc.ID.

func NewDOMHTMLElement

func NewDOMHTMLElement() DOMHTMLElement

NewDOMHTMLElement creates a new DOMHTMLElement instance.

func (DOMHTMLElement) Autorelease

func (d DOMHTMLElement) Autorelease() DOMHTMLElement

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLElement) Init

func (d DOMHTMLElement) Init() DOMHTMLElement

Init initializes the instance.

func (DOMHTMLElement) SetAccessKey

func (d DOMHTMLElement) SetAccessKey(value string)

func (DOMHTMLElement) SetContentEditable

func (d DOMHTMLElement) SetContentEditable(value string)

func (DOMHTMLElement) SetDir

func (d DOMHTMLElement) SetDir(value string)

func (DOMHTMLElement) SetIdName

func (d DOMHTMLElement) SetIdName(value string)

func (DOMHTMLElement) SetInnerText

func (d DOMHTMLElement) SetInnerText(value string)

SetInnerText sets the innerText property. The superclass provides its getter.

See: https://developer.apple.com/documentation/WebKit/DOMHTMLElement/innerText

func (DOMHTMLElement) SetLang

func (d DOMHTMLElement) SetLang(value string)

func (DOMHTMLElement) SetOuterText

func (d DOMHTMLElement) SetOuterText(value string)

func (DOMHTMLElement) SetTabIndex

func (d DOMHTMLElement) SetTabIndex(value int32)

func (DOMHTMLElement) SetTitle

func (d DOMHTMLElement) SetTitle(value string)

type DOMHTMLElementClass

type DOMHTMLElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLElementClass

func GetDOMHTMLElementClass() DOMHTMLElementClass

GetDOMHTMLElementClass returns the class object for DOMHTMLElement.

func (DOMHTMLElementClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLElementClass) Class

func (dc DOMHTMLElementClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLEmbedElement

type DOMHTMLEmbedElement struct {
	DOMHTMLElement
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLEmbedElement

func DOMHTMLEmbedElementFromID

func DOMHTMLEmbedElementFromID(id objc.ID) DOMHTMLEmbedElement

DOMHTMLEmbedElementFromID constructs a DOMHTMLEmbedElement from an objc.ID.

func NewDOMHTMLEmbedElement

func NewDOMHTMLEmbedElement() DOMHTMLEmbedElement

NewDOMHTMLEmbedElement creates a new DOMHTMLEmbedElement instance.

func (DOMHTMLEmbedElement) Autorelease

func (d DOMHTMLEmbedElement) Autorelease() DOMHTMLEmbedElement

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLEmbedElement) Init

Init initializes the instance.

func (DOMHTMLEmbedElement) SetAlign

func (d DOMHTMLEmbedElement) SetAlign(value string)

func (DOMHTMLEmbedElement) SetHeight

func (d DOMHTMLEmbedElement) SetHeight(value int32)

func (DOMHTMLEmbedElement) SetName

func (d DOMHTMLEmbedElement) SetName(value string)

func (DOMHTMLEmbedElement) SetSrc

func (d DOMHTMLEmbedElement) SetSrc(value string)

func (DOMHTMLEmbedElement) SetType

func (d DOMHTMLEmbedElement) SetType(value string)

func (DOMHTMLEmbedElement) SetWidth

func (d DOMHTMLEmbedElement) SetWidth(value int32)

type DOMHTMLEmbedElementClass

type DOMHTMLEmbedElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLEmbedElementClass

func GetDOMHTMLEmbedElementClass() DOMHTMLEmbedElementClass

GetDOMHTMLEmbedElementClass returns the class object for DOMHTMLEmbedElement.

func (DOMHTMLEmbedElementClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLEmbedElementClass) Class

func (dc DOMHTMLEmbedElementClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLFieldSetElement

type DOMHTMLFieldSetElement struct {
	DOMHTMLElement
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLFieldSetElement

func DOMHTMLFieldSetElementFromID

func DOMHTMLFieldSetElementFromID(id objc.ID) DOMHTMLFieldSetElement

DOMHTMLFieldSetElementFromID constructs a DOMHTMLFieldSetElement from an objc.ID.

func NewDOMHTMLFieldSetElement

func NewDOMHTMLFieldSetElement() DOMHTMLFieldSetElement

NewDOMHTMLFieldSetElement creates a new DOMHTMLFieldSetElement instance.

func (DOMHTMLFieldSetElement) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLFieldSetElement) Init

Init initializes the instance.

type DOMHTMLFieldSetElementClass

type DOMHTMLFieldSetElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLFieldSetElementClass

func GetDOMHTMLFieldSetElementClass() DOMHTMLFieldSetElementClass

GetDOMHTMLFieldSetElementClass returns the class object for DOMHTMLFieldSetElement.

func (DOMHTMLFieldSetElementClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLFieldSetElementClass) Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLFontElement

type DOMHTMLFontElement struct {
	DOMHTMLElement
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLFontElement

func DOMHTMLFontElementFromID

func DOMHTMLFontElementFromID(id objc.ID) DOMHTMLFontElement

DOMHTMLFontElementFromID constructs a DOMHTMLFontElement from an objc.ID.

func NewDOMHTMLFontElement

func NewDOMHTMLFontElement() DOMHTMLFontElement

NewDOMHTMLFontElement creates a new DOMHTMLFontElement instance.

func (DOMHTMLFontElement) Autorelease

func (d DOMHTMLFontElement) Autorelease() DOMHTMLFontElement

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLFontElement) Init

Init initializes the instance.

func (DOMHTMLFontElement) SetColor

func (d DOMHTMLFontElement) SetColor(value string)

func (DOMHTMLFontElement) SetFace

func (d DOMHTMLFontElement) SetFace(value string)

func (DOMHTMLFontElement) SetSize

func (d DOMHTMLFontElement) SetSize(value string)

type DOMHTMLFontElementClass

type DOMHTMLFontElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLFontElementClass

func GetDOMHTMLFontElementClass() DOMHTMLFontElementClass

GetDOMHTMLFontElementClass returns the class object for DOMHTMLFontElement.

func (DOMHTMLFontElementClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLFontElementClass) Class

func (dc DOMHTMLFontElementClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLFormElement

type DOMHTMLFormElement struct {
	DOMHTMLElement
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLFormElement

func DOMHTMLFormElementFromID

func DOMHTMLFormElementFromID(id objc.ID) DOMHTMLFormElement

DOMHTMLFormElementFromID constructs a DOMHTMLFormElement from an objc.ID.

func NewDOMHTMLFormElement

func NewDOMHTMLFormElement() DOMHTMLFormElement

NewDOMHTMLFormElement creates a new DOMHTMLFormElement instance.

func (DOMHTMLFormElement) Autorelease

func (d DOMHTMLFormElement) Autorelease() DOMHTMLFormElement

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLFormElement) Init

Init initializes the instance.

func (DOMHTMLFormElement) SetAcceptCharset

func (d DOMHTMLFormElement) SetAcceptCharset(value string)

func (DOMHTMLFormElement) SetAction

func (d DOMHTMLFormElement) SetAction(value string)

func (DOMHTMLFormElement) SetEncoding

func (d DOMHTMLFormElement) SetEncoding(value string)

func (DOMHTMLFormElement) SetEnctype

func (d DOMHTMLFormElement) SetEnctype(value string)

func (DOMHTMLFormElement) SetMethod

func (d DOMHTMLFormElement) SetMethod(value string)

func (DOMHTMLFormElement) SetName

func (d DOMHTMLFormElement) SetName(value string)

func (DOMHTMLFormElement) SetTarget

func (d DOMHTMLFormElement) SetTarget(value string)

type DOMHTMLFormElementClass

type DOMHTMLFormElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLFormElementClass

func GetDOMHTMLFormElementClass() DOMHTMLFormElementClass

GetDOMHTMLFormElementClass returns the class object for DOMHTMLFormElement.

func (DOMHTMLFormElementClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLFormElementClass) Class

func (dc DOMHTMLFormElementClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLFrameElement

type DOMHTMLFrameElement struct {
	DOMHTMLElement
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLFrameElement

func DOMHTMLFrameElementFromID

func DOMHTMLFrameElementFromID(id objc.ID) DOMHTMLFrameElement

DOMHTMLFrameElementFromID constructs a DOMHTMLFrameElement from an objc.ID.

func NewDOMHTMLFrameElement

func NewDOMHTMLFrameElement() DOMHTMLFrameElement

NewDOMHTMLFrameElement creates a new DOMHTMLFrameElement instance.

func (DOMHTMLFrameElement) Autorelease

func (d DOMHTMLFrameElement) Autorelease() DOMHTMLFrameElement

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLFrameElement) ContentFrame

func (d DOMHTMLFrameElement) ContentFrame() IWebFrame

The content frame of the element.

See: https://developer.apple.com/documentation/WebKit/DOMHTMLFrameElement/contentFrame

func (DOMHTMLFrameElement) Init

Init initializes the instance.

func (DOMHTMLFrameElement) SetFrameBorder

func (d DOMHTMLFrameElement) SetFrameBorder(value string)

func (DOMHTMLFrameElement) SetLocation

func (d DOMHTMLFrameElement) SetLocation(value string)

func (DOMHTMLFrameElement) SetLongDesc

func (d DOMHTMLFrameElement) SetLongDesc(value string)

func (DOMHTMLFrameElement) SetMarginHeight

func (d DOMHTMLFrameElement) SetMarginHeight(value string)

func (DOMHTMLFrameElement) SetMarginWidth

func (d DOMHTMLFrameElement) SetMarginWidth(value string)

func (DOMHTMLFrameElement) SetName

func (d DOMHTMLFrameElement) SetName(value string)

func (DOMHTMLFrameElement) SetNoResize

func (d DOMHTMLFrameElement) SetNoResize(value bool)

func (DOMHTMLFrameElement) SetScrolling

func (d DOMHTMLFrameElement) SetScrolling(value string)

func (DOMHTMLFrameElement) SetSrc

func (d DOMHTMLFrameElement) SetSrc(value string)

type DOMHTMLFrameElementClass

type DOMHTMLFrameElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLFrameElementClass

func GetDOMHTMLFrameElementClass() DOMHTMLFrameElementClass

GetDOMHTMLFrameElementClass returns the class object for DOMHTMLFrameElement.

func (DOMHTMLFrameElementClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLFrameElementClass) Class

func (dc DOMHTMLFrameElementClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLFrameSetElement

type DOMHTMLFrameSetElement struct {
	DOMHTMLElement
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLFrameSetElement

func DOMHTMLFrameSetElementFromID

func DOMHTMLFrameSetElementFromID(id objc.ID) DOMHTMLFrameSetElement

DOMHTMLFrameSetElementFromID constructs a DOMHTMLFrameSetElement from an objc.ID.

func NewDOMHTMLFrameSetElement

func NewDOMHTMLFrameSetElement() DOMHTMLFrameSetElement

NewDOMHTMLFrameSetElement creates a new DOMHTMLFrameSetElement instance.

func (DOMHTMLFrameSetElement) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLFrameSetElement) Init

Init initializes the instance.

func (DOMHTMLFrameSetElement) SetCols

func (d DOMHTMLFrameSetElement) SetCols(value string)

func (DOMHTMLFrameSetElement) SetRows

func (d DOMHTMLFrameSetElement) SetRows(value string)

type DOMHTMLFrameSetElementClass

type DOMHTMLFrameSetElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLFrameSetElementClass

func GetDOMHTMLFrameSetElementClass() DOMHTMLFrameSetElementClass

GetDOMHTMLFrameSetElementClass returns the class object for DOMHTMLFrameSetElement.

func (DOMHTMLFrameSetElementClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLFrameSetElementClass) Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLHRElement

type DOMHTMLHRElement struct {
	DOMHTMLElement
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLHRElement

func DOMHTMLHRElementFromID

func DOMHTMLHRElementFromID(id objc.ID) DOMHTMLHRElement

DOMHTMLHRElementFromID constructs a DOMHTMLHRElement from an objc.ID.

func NewDOMHTMLHRElement

func NewDOMHTMLHRElement() DOMHTMLHRElement

NewDOMHTMLHRElement creates a new DOMHTMLHRElement instance.

func (DOMHTMLHRElement) Autorelease

func (d DOMHTMLHRElement) Autorelease() DOMHTMLHRElement

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLHRElement) Init

Init initializes the instance.

func (DOMHTMLHRElement) SetAlign

func (d DOMHTMLHRElement) SetAlign(value string)

func (DOMHTMLHRElement) SetNoShade

func (d DOMHTMLHRElement) SetNoShade(value bool)

func (DOMHTMLHRElement) SetSize

func (d DOMHTMLHRElement) SetSize(value string)

func (DOMHTMLHRElement) SetWidth

func (d DOMHTMLHRElement) SetWidth(value string)

type DOMHTMLHRElementClass

type DOMHTMLHRElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLHRElementClass

func GetDOMHTMLHRElementClass() DOMHTMLHRElementClass

GetDOMHTMLHRElementClass returns the class object for DOMHTMLHRElement.

func (DOMHTMLHRElementClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLHRElementClass) Class

func (dc DOMHTMLHRElementClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLHeadElement

type DOMHTMLHeadElement struct {
	DOMHTMLElement
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLHeadElement

func DOMHTMLHeadElementFromID

func DOMHTMLHeadElementFromID(id objc.ID) DOMHTMLHeadElement

DOMHTMLHeadElementFromID constructs a DOMHTMLHeadElement from an objc.ID.

func NewDOMHTMLHeadElement

func NewDOMHTMLHeadElement() DOMHTMLHeadElement

NewDOMHTMLHeadElement creates a new DOMHTMLHeadElement instance.

func (DOMHTMLHeadElement) Autorelease

func (d DOMHTMLHeadElement) Autorelease() DOMHTMLHeadElement

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLHeadElement) Init

Init initializes the instance.

func (DOMHTMLHeadElement) SetProfile

func (d DOMHTMLHeadElement) SetProfile(value string)

type DOMHTMLHeadElementClass

type DOMHTMLHeadElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLHeadElementClass

func GetDOMHTMLHeadElementClass() DOMHTMLHeadElementClass

GetDOMHTMLHeadElementClass returns the class object for DOMHTMLHeadElement.

func (DOMHTMLHeadElementClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLHeadElementClass) Class

func (dc DOMHTMLHeadElementClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLHeadingElement

type DOMHTMLHeadingElement struct {
	DOMHTMLElement
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLHeadingElement

func DOMHTMLHeadingElementFromID

func DOMHTMLHeadingElementFromID(id objc.ID) DOMHTMLHeadingElement

DOMHTMLHeadingElementFromID constructs a DOMHTMLHeadingElement from an objc.ID.

func NewDOMHTMLHeadingElement

func NewDOMHTMLHeadingElement() DOMHTMLHeadingElement

NewDOMHTMLHeadingElement creates a new DOMHTMLHeadingElement instance.

func (DOMHTMLHeadingElement) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLHeadingElement) Init

Init initializes the instance.

func (DOMHTMLHeadingElement) SetAlign

func (d DOMHTMLHeadingElement) SetAlign(value string)

type DOMHTMLHeadingElementClass

type DOMHTMLHeadingElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLHeadingElementClass

func GetDOMHTMLHeadingElementClass() DOMHTMLHeadingElementClass

GetDOMHTMLHeadingElementClass returns the class object for DOMHTMLHeadingElement.

func (DOMHTMLHeadingElementClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLHeadingElementClass) Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLHtmlElement

type DOMHTMLHtmlElement struct {
	DOMHTMLElement
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLHtmlElement

func DOMHTMLHtmlElementFromID

func DOMHTMLHtmlElementFromID(id objc.ID) DOMHTMLHtmlElement

DOMHTMLHtmlElementFromID constructs a DOMHTMLHtmlElement from an objc.ID.

func NewDOMHTMLHtmlElement

func NewDOMHTMLHtmlElement() DOMHTMLHtmlElement

NewDOMHTMLHtmlElement creates a new DOMHTMLHtmlElement instance.

func (DOMHTMLHtmlElement) Autorelease

func (d DOMHTMLHtmlElement) Autorelease() DOMHTMLHtmlElement

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLHtmlElement) Init

Init initializes the instance.

func (DOMHTMLHtmlElement) SetVersion

func (d DOMHTMLHtmlElement) SetVersion(value string)

type DOMHTMLHtmlElementClass

type DOMHTMLHtmlElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLHtmlElementClass

func GetDOMHTMLHtmlElementClass() DOMHTMLHtmlElementClass

GetDOMHTMLHtmlElementClass returns the class object for DOMHTMLHtmlElement.

func (DOMHTMLHtmlElementClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLHtmlElementClass) Class

func (dc DOMHTMLHtmlElementClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLIFrameElement

type DOMHTMLIFrameElement struct {
	DOMHTMLElement
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLIFrameElement

func DOMHTMLIFrameElementFromID

func DOMHTMLIFrameElementFromID(id objc.ID) DOMHTMLIFrameElement

DOMHTMLIFrameElementFromID constructs a DOMHTMLIFrameElement from an objc.ID.

func NewDOMHTMLIFrameElement

func NewDOMHTMLIFrameElement() DOMHTMLIFrameElement

NewDOMHTMLIFrameElement creates a new DOMHTMLIFrameElement instance.

func (DOMHTMLIFrameElement) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLIFrameElement) ContentFrame

func (d DOMHTMLIFrameElement) ContentFrame() IWebFrame

The content frame of the element.

See: https://developer.apple.com/documentation/WebKit/DOMHTMLIFrameElement/contentFrame

func (DOMHTMLIFrameElement) Init

Init initializes the instance.

func (DOMHTMLIFrameElement) SetAlign

func (d DOMHTMLIFrameElement) SetAlign(value string)

func (DOMHTMLIFrameElement) SetFrameBorder

func (d DOMHTMLIFrameElement) SetFrameBorder(value string)

func (DOMHTMLIFrameElement) SetHeight

func (d DOMHTMLIFrameElement) SetHeight(value string)

func (DOMHTMLIFrameElement) SetLongDesc

func (d DOMHTMLIFrameElement) SetLongDesc(value string)

func (DOMHTMLIFrameElement) SetMarginHeight

func (d DOMHTMLIFrameElement) SetMarginHeight(value string)

func (DOMHTMLIFrameElement) SetMarginWidth

func (d DOMHTMLIFrameElement) SetMarginWidth(value string)

func (DOMHTMLIFrameElement) SetName

func (d DOMHTMLIFrameElement) SetName(value string)

func (DOMHTMLIFrameElement) SetScrolling

func (d DOMHTMLIFrameElement) SetScrolling(value string)

func (DOMHTMLIFrameElement) SetSrc

func (d DOMHTMLIFrameElement) SetSrc(value string)

func (DOMHTMLIFrameElement) SetWidth

func (d DOMHTMLIFrameElement) SetWidth(value string)

type DOMHTMLIFrameElementClass

type DOMHTMLIFrameElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLIFrameElementClass

func GetDOMHTMLIFrameElementClass() DOMHTMLIFrameElementClass

GetDOMHTMLIFrameElementClass returns the class object for DOMHTMLIFrameElement.

func (DOMHTMLIFrameElementClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLIFrameElementClass) Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLImageElement

type DOMHTMLImageElement struct {
	DOMHTMLElement
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLImageElement

func DOMHTMLImageElementFromID

func DOMHTMLImageElementFromID(id objc.ID) DOMHTMLImageElement

DOMHTMLImageElementFromID constructs a DOMHTMLImageElement from an objc.ID.

func NewDOMHTMLImageElement

func NewDOMHTMLImageElement() DOMHTMLImageElement

NewDOMHTMLImageElement creates a new DOMHTMLImageElement instance.

func (DOMHTMLImageElement) Autorelease

func (d DOMHTMLImageElement) Autorelease() DOMHTMLImageElement

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLImageElement) Init

Init initializes the instance.

func (DOMHTMLImageElement) SetAlign

func (d DOMHTMLImageElement) SetAlign(value string)

func (DOMHTMLImageElement) SetAlt

func (d DOMHTMLImageElement) SetAlt(value string)

func (DOMHTMLImageElement) SetBorder

func (d DOMHTMLImageElement) SetBorder(value string)

func (DOMHTMLImageElement) SetHeight

func (d DOMHTMLImageElement) SetHeight(value int32)

func (DOMHTMLImageElement) SetHspace

func (d DOMHTMLImageElement) SetHspace(value int32)

func (DOMHTMLImageElement) SetIsMap

func (d DOMHTMLImageElement) SetIsMap(value bool)

func (DOMHTMLImageElement) SetLongDesc

func (d DOMHTMLImageElement) SetLongDesc(value string)

func (DOMHTMLImageElement) SetLowsrc

func (d DOMHTMLImageElement) SetLowsrc(value string)

func (DOMHTMLImageElement) SetName

func (d DOMHTMLImageElement) SetName(value string)

func (DOMHTMLImageElement) SetSrc

func (d DOMHTMLImageElement) SetSrc(value string)

func (DOMHTMLImageElement) SetUseMap

func (d DOMHTMLImageElement) SetUseMap(value string)

func (DOMHTMLImageElement) SetVspace

func (d DOMHTMLImageElement) SetVspace(value int32)

func (DOMHTMLImageElement) SetWidth

func (d DOMHTMLImageElement) SetWidth(value int32)

type DOMHTMLImageElementClass

type DOMHTMLImageElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLImageElementClass

func GetDOMHTMLImageElementClass() DOMHTMLImageElementClass

GetDOMHTMLImageElementClass returns the class object for DOMHTMLImageElement.

func (DOMHTMLImageElementClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLImageElementClass) Class

func (dc DOMHTMLImageElementClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLInputElement

type DOMHTMLInputElement struct {
	DOMHTMLElement
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLInputElement

func DOMHTMLInputElementFromID

func DOMHTMLInputElementFromID(id objc.ID) DOMHTMLInputElement

DOMHTMLInputElementFromID constructs a DOMHTMLInputElement from an objc.ID.

func NewDOMHTMLInputElement

func NewDOMHTMLInputElement() DOMHTMLInputElement

NewDOMHTMLInputElement creates a new DOMHTMLInputElement instance.

func (DOMHTMLInputElement) Autorelease

func (d DOMHTMLInputElement) Autorelease() DOMHTMLInputElement

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLInputElement) Init

Init initializes the instance.

func (DOMHTMLInputElement) SetAccept

func (d DOMHTMLInputElement) SetAccept(value string)

func (DOMHTMLInputElement) SetAlign

func (d DOMHTMLInputElement) SetAlign(value string)

func (DOMHTMLInputElement) SetAlt

func (d DOMHTMLInputElement) SetAlt(value string)

func (DOMHTMLInputElement) SetAutofocus

func (d DOMHTMLInputElement) SetAutofocus(value bool)

func (DOMHTMLInputElement) SetChecked

func (d DOMHTMLInputElement) SetChecked(value bool)

func (DOMHTMLInputElement) SetDefaultChecked

func (d DOMHTMLInputElement) SetDefaultChecked(value bool)

func (DOMHTMLInputElement) SetDefaultValue

func (d DOMHTMLInputElement) SetDefaultValue(value string)

func (DOMHTMLInputElement) SetDisabled

func (d DOMHTMLInputElement) SetDisabled(value bool)

func (DOMHTMLInputElement) SetFiles

func (d DOMHTMLInputElement) SetFiles(value IDOMFileList)

func (DOMHTMLInputElement) SetIndeterminate

func (d DOMHTMLInputElement) SetIndeterminate(value bool)

func (DOMHTMLInputElement) SetMaxLength

func (d DOMHTMLInputElement) SetMaxLength(value int32)

func (DOMHTMLInputElement) SetMultiple

func (d DOMHTMLInputElement) SetMultiple(value bool)

func (DOMHTMLInputElement) SetName

func (d DOMHTMLInputElement) SetName(value string)

func (DOMHTMLInputElement) SetReadOnly

func (d DOMHTMLInputElement) SetReadOnly(value bool)

func (DOMHTMLInputElement) SetSelectionEnd

func (d DOMHTMLInputElement) SetSelectionEnd(value int32)

func (DOMHTMLInputElement) SetSelectionStart

func (d DOMHTMLInputElement) SetSelectionStart(value int32)

func (DOMHTMLInputElement) SetSize

func (d DOMHTMLInputElement) SetSize(value string)

func (DOMHTMLInputElement) SetSrc

func (d DOMHTMLInputElement) SetSrc(value string)

func (DOMHTMLInputElement) SetType

func (d DOMHTMLInputElement) SetType(value string)

func (DOMHTMLInputElement) SetUseMap

func (d DOMHTMLInputElement) SetUseMap(value string)

func (DOMHTMLInputElement) SetValue

func (d DOMHTMLInputElement) SetValue(value string)

type DOMHTMLInputElementClass

type DOMHTMLInputElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLInputElementClass

func GetDOMHTMLInputElementClass() DOMHTMLInputElementClass

GetDOMHTMLInputElementClass returns the class object for DOMHTMLInputElement.

func (DOMHTMLInputElementClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLInputElementClass) Class

func (dc DOMHTMLInputElementClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLLIElement

type DOMHTMLLIElement struct {
	DOMHTMLElement
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLLIElement

func DOMHTMLLIElementFromID

func DOMHTMLLIElementFromID(id objc.ID) DOMHTMLLIElement

DOMHTMLLIElementFromID constructs a DOMHTMLLIElement from an objc.ID.

func NewDOMHTMLLIElement

func NewDOMHTMLLIElement() DOMHTMLLIElement

NewDOMHTMLLIElement creates a new DOMHTMLLIElement instance.

func (DOMHTMLLIElement) Autorelease

func (d DOMHTMLLIElement) Autorelease() DOMHTMLLIElement

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLLIElement) Init

Init initializes the instance.

func (DOMHTMLLIElement) SetType

func (d DOMHTMLLIElement) SetType(value string)

func (DOMHTMLLIElement) SetValue

func (d DOMHTMLLIElement) SetValue(value int32)

type DOMHTMLLIElementClass

type DOMHTMLLIElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLLIElementClass

func GetDOMHTMLLIElementClass() DOMHTMLLIElementClass

GetDOMHTMLLIElementClass returns the class object for DOMHTMLLIElement.

func (DOMHTMLLIElementClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLLIElementClass) Class

func (dc DOMHTMLLIElementClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLLabelElement

type DOMHTMLLabelElement struct {
	DOMHTMLElement
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLLabelElement

func DOMHTMLLabelElementFromID

func DOMHTMLLabelElementFromID(id objc.ID) DOMHTMLLabelElement

DOMHTMLLabelElementFromID constructs a DOMHTMLLabelElement from an objc.ID.

func NewDOMHTMLLabelElement

func NewDOMHTMLLabelElement() DOMHTMLLabelElement

NewDOMHTMLLabelElement creates a new DOMHTMLLabelElement instance.

func (DOMHTMLLabelElement) Autorelease

func (d DOMHTMLLabelElement) Autorelease() DOMHTMLLabelElement

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLLabelElement) Init

Init initializes the instance.

func (DOMHTMLLabelElement) SetHtmlFor

func (d DOMHTMLLabelElement) SetHtmlFor(value string)

type DOMHTMLLabelElementClass

type DOMHTMLLabelElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLLabelElementClass

func GetDOMHTMLLabelElementClass() DOMHTMLLabelElementClass

GetDOMHTMLLabelElementClass returns the class object for DOMHTMLLabelElement.

func (DOMHTMLLabelElementClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLLabelElementClass) Class

func (dc DOMHTMLLabelElementClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLLegendElement

type DOMHTMLLegendElement struct {
	DOMHTMLElement
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLLegendElement

func DOMHTMLLegendElementFromID

func DOMHTMLLegendElementFromID(id objc.ID) DOMHTMLLegendElement

DOMHTMLLegendElementFromID constructs a DOMHTMLLegendElement from an objc.ID.

func NewDOMHTMLLegendElement

func NewDOMHTMLLegendElement() DOMHTMLLegendElement

NewDOMHTMLLegendElement creates a new DOMHTMLLegendElement instance.

func (DOMHTMLLegendElement) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLLegendElement) Init

Init initializes the instance.

func (DOMHTMLLegendElement) SetAlign

func (d DOMHTMLLegendElement) SetAlign(value string)

type DOMHTMLLegendElementClass

type DOMHTMLLegendElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLLegendElementClass

func GetDOMHTMLLegendElementClass() DOMHTMLLegendElementClass

GetDOMHTMLLegendElementClass returns the class object for DOMHTMLLegendElement.

func (DOMHTMLLegendElementClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLLegendElementClass) Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLLinkElement

type DOMHTMLLinkElement struct {
	DOMHTMLElement
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLLinkElement

func DOMHTMLLinkElementFromID

func DOMHTMLLinkElementFromID(id objc.ID) DOMHTMLLinkElement

DOMHTMLLinkElementFromID constructs a DOMHTMLLinkElement from an objc.ID.

func NewDOMHTMLLinkElement

func NewDOMHTMLLinkElement() DOMHTMLLinkElement

NewDOMHTMLLinkElement creates a new DOMHTMLLinkElement instance.

func (DOMHTMLLinkElement) Autorelease

func (d DOMHTMLLinkElement) Autorelease() DOMHTMLLinkElement

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLLinkElement) Init

Init initializes the instance.

func (DOMHTMLLinkElement) SetCharset

func (d DOMHTMLLinkElement) SetCharset(value string)

func (DOMHTMLLinkElement) SetDisabled

func (d DOMHTMLLinkElement) SetDisabled(value bool)

func (DOMHTMLLinkElement) SetHref

func (d DOMHTMLLinkElement) SetHref(value string)

func (DOMHTMLLinkElement) SetHreflang

func (d DOMHTMLLinkElement) SetHreflang(value string)

func (DOMHTMLLinkElement) SetMedia

func (d DOMHTMLLinkElement) SetMedia(value string)

func (DOMHTMLLinkElement) SetRel

func (d DOMHTMLLinkElement) SetRel(value string)

func (DOMHTMLLinkElement) SetRev

func (d DOMHTMLLinkElement) SetRev(value string)

func (DOMHTMLLinkElement) SetTarget

func (d DOMHTMLLinkElement) SetTarget(value string)

func (DOMHTMLLinkElement) SetType

func (d DOMHTMLLinkElement) SetType(value string)

type DOMHTMLLinkElementClass

type DOMHTMLLinkElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLLinkElementClass

func GetDOMHTMLLinkElementClass() DOMHTMLLinkElementClass

GetDOMHTMLLinkElementClass returns the class object for DOMHTMLLinkElement.

func (DOMHTMLLinkElementClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLLinkElementClass) Class

func (dc DOMHTMLLinkElementClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLMapElement

type DOMHTMLMapElement struct {
	DOMHTMLElement
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLMapElement

func DOMHTMLMapElementFromID

func DOMHTMLMapElementFromID(id objc.ID) DOMHTMLMapElement

DOMHTMLMapElementFromID constructs a DOMHTMLMapElement from an objc.ID.

func NewDOMHTMLMapElement

func NewDOMHTMLMapElement() DOMHTMLMapElement

NewDOMHTMLMapElement creates a new DOMHTMLMapElement instance.

func (DOMHTMLMapElement) Autorelease

func (d DOMHTMLMapElement) Autorelease() DOMHTMLMapElement

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLMapElement) Init

Init initializes the instance.

func (DOMHTMLMapElement) SetName

func (d DOMHTMLMapElement) SetName(value string)

type DOMHTMLMapElementClass

type DOMHTMLMapElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLMapElementClass

func GetDOMHTMLMapElementClass() DOMHTMLMapElementClass

GetDOMHTMLMapElementClass returns the class object for DOMHTMLMapElement.

func (DOMHTMLMapElementClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLMapElementClass) Class

func (dc DOMHTMLMapElementClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLMarqueeElement

type DOMHTMLMarqueeElement struct {
	DOMHTMLElement
}

See: https://developer.apple.com/documentation/WebKit/DOMHTMLMarqueeElement

func DOMHTMLMarqueeElementFromID

func DOMHTMLMarqueeElementFromID(id objc.ID) DOMHTMLMarqueeElement

DOMHTMLMarqueeElementFromID constructs a DOMHTMLMarqueeElement from an objc.ID.

func NewDOMHTMLMarqueeElement

func NewDOMHTMLMarqueeElement() DOMHTMLMarqueeElement

NewDOMHTMLMarqueeElement creates a new DOMHTMLMarqueeElement instance.

func (DOMHTMLMarqueeElement) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLMarqueeElement) Init

Init initializes the instance.

type DOMHTMLMarqueeElementClass

type DOMHTMLMarqueeElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLMarqueeElementClass

func GetDOMHTMLMarqueeElementClass() DOMHTMLMarqueeElementClass

GetDOMHTMLMarqueeElementClass returns the class object for DOMHTMLMarqueeElement.

func (DOMHTMLMarqueeElementClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLMarqueeElementClass) Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLMenuElement

type DOMHTMLMenuElement struct {
	DOMHTMLElement
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLMenuElement

func DOMHTMLMenuElementFromID

func DOMHTMLMenuElementFromID(id objc.ID) DOMHTMLMenuElement

DOMHTMLMenuElementFromID constructs a DOMHTMLMenuElement from an objc.ID.

func NewDOMHTMLMenuElement

func NewDOMHTMLMenuElement() DOMHTMLMenuElement

NewDOMHTMLMenuElement creates a new DOMHTMLMenuElement instance.

func (DOMHTMLMenuElement) Autorelease

func (d DOMHTMLMenuElement) Autorelease() DOMHTMLMenuElement

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLMenuElement) Init

Init initializes the instance.

func (DOMHTMLMenuElement) SetCompact

func (d DOMHTMLMenuElement) SetCompact(value bool)

type DOMHTMLMenuElementClass

type DOMHTMLMenuElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLMenuElementClass

func GetDOMHTMLMenuElementClass() DOMHTMLMenuElementClass

GetDOMHTMLMenuElementClass returns the class object for DOMHTMLMenuElement.

func (DOMHTMLMenuElementClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLMenuElementClass) Class

func (dc DOMHTMLMenuElementClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLMetaElement

type DOMHTMLMetaElement struct {
	DOMHTMLElement
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLMetaElement

func DOMHTMLMetaElementFromID

func DOMHTMLMetaElementFromID(id objc.ID) DOMHTMLMetaElement

DOMHTMLMetaElementFromID constructs a DOMHTMLMetaElement from an objc.ID.

func NewDOMHTMLMetaElement

func NewDOMHTMLMetaElement() DOMHTMLMetaElement

NewDOMHTMLMetaElement creates a new DOMHTMLMetaElement instance.

func (DOMHTMLMetaElement) Autorelease

func (d DOMHTMLMetaElement) Autorelease() DOMHTMLMetaElement

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLMetaElement) Init

Init initializes the instance.

func (DOMHTMLMetaElement) SetContent

func (d DOMHTMLMetaElement) SetContent(value string)

func (DOMHTMLMetaElement) SetHttpEquiv

func (d DOMHTMLMetaElement) SetHttpEquiv(value string)

func (DOMHTMLMetaElement) SetName

func (d DOMHTMLMetaElement) SetName(value string)

func (DOMHTMLMetaElement) SetScheme

func (d DOMHTMLMetaElement) SetScheme(value string)

type DOMHTMLMetaElementClass

type DOMHTMLMetaElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLMetaElementClass

func GetDOMHTMLMetaElementClass() DOMHTMLMetaElementClass

GetDOMHTMLMetaElementClass returns the class object for DOMHTMLMetaElement.

func (DOMHTMLMetaElementClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLMetaElementClass) Class

func (dc DOMHTMLMetaElementClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLModElement

type DOMHTMLModElement struct {
	DOMHTMLElement
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLModElement

func DOMHTMLModElementFromID

func DOMHTMLModElementFromID(id objc.ID) DOMHTMLModElement

DOMHTMLModElementFromID constructs a DOMHTMLModElement from an objc.ID.

func NewDOMHTMLModElement

func NewDOMHTMLModElement() DOMHTMLModElement

NewDOMHTMLModElement creates a new DOMHTMLModElement instance.

func (DOMHTMLModElement) Autorelease

func (d DOMHTMLModElement) Autorelease() DOMHTMLModElement

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLModElement) Init

Init initializes the instance.

func (DOMHTMLModElement) SetCite

func (d DOMHTMLModElement) SetCite(value string)

func (DOMHTMLModElement) SetDateTime

func (d DOMHTMLModElement) SetDateTime(value string)

type DOMHTMLModElementClass

type DOMHTMLModElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLModElementClass

func GetDOMHTMLModElementClass() DOMHTMLModElementClass

GetDOMHTMLModElementClass returns the class object for DOMHTMLModElement.

func (DOMHTMLModElementClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLModElementClass) Class

func (dc DOMHTMLModElementClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLOListElement

type DOMHTMLOListElement struct {
	DOMHTMLElement
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLOListElement

func DOMHTMLOListElementFromID

func DOMHTMLOListElementFromID(id objc.ID) DOMHTMLOListElement

DOMHTMLOListElementFromID constructs a DOMHTMLOListElement from an objc.ID.

func NewDOMHTMLOListElement

func NewDOMHTMLOListElement() DOMHTMLOListElement

NewDOMHTMLOListElement creates a new DOMHTMLOListElement instance.

func (DOMHTMLOListElement) Autorelease

func (d DOMHTMLOListElement) Autorelease() DOMHTMLOListElement

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLOListElement) Init

Init initializes the instance.

func (DOMHTMLOListElement) SetCompact

func (d DOMHTMLOListElement) SetCompact(value bool)

func (DOMHTMLOListElement) SetStart

func (d DOMHTMLOListElement) SetStart(value int32)

func (DOMHTMLOListElement) SetType

func (d DOMHTMLOListElement) SetType(value string)

type DOMHTMLOListElementClass

type DOMHTMLOListElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLOListElementClass

func GetDOMHTMLOListElementClass() DOMHTMLOListElementClass

GetDOMHTMLOListElementClass returns the class object for DOMHTMLOListElement.

func (DOMHTMLOListElementClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLOListElementClass) Class

func (dc DOMHTMLOListElementClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLObjectElement

type DOMHTMLObjectElement struct {
	DOMHTMLElement
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLObjectElement

func DOMHTMLObjectElementFromID

func DOMHTMLObjectElementFromID(id objc.ID) DOMHTMLObjectElement

DOMHTMLObjectElementFromID constructs a DOMHTMLObjectElement from an objc.ID.

func NewDOMHTMLObjectElement

func NewDOMHTMLObjectElement() DOMHTMLObjectElement

NewDOMHTMLObjectElement creates a new DOMHTMLObjectElement instance.

func (DOMHTMLObjectElement) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLObjectElement) ContentFrame

func (d DOMHTMLObjectElement) ContentFrame() IWebFrame

The content frame of the element.

See: https://developer.apple.com/documentation/WebKit/DOMHTMLObjectElement/contentFrame

func (DOMHTMLObjectElement) Init

Init initializes the instance.

func (DOMHTMLObjectElement) SetAlign

func (d DOMHTMLObjectElement) SetAlign(value string)

func (DOMHTMLObjectElement) SetArchive

func (d DOMHTMLObjectElement) SetArchive(value string)

func (DOMHTMLObjectElement) SetBorder

func (d DOMHTMLObjectElement) SetBorder(value string)

func (DOMHTMLObjectElement) SetCode

func (d DOMHTMLObjectElement) SetCode(value string)

func (DOMHTMLObjectElement) SetCodeBase

func (d DOMHTMLObjectElement) SetCodeBase(value string)

func (DOMHTMLObjectElement) SetCodeType

func (d DOMHTMLObjectElement) SetCodeType(value string)

func (DOMHTMLObjectElement) SetData

func (d DOMHTMLObjectElement) SetData(value string)

func (DOMHTMLObjectElement) SetDeclare

func (d DOMHTMLObjectElement) SetDeclare(value bool)

func (DOMHTMLObjectElement) SetHeight

func (d DOMHTMLObjectElement) SetHeight(value string)

func (DOMHTMLObjectElement) SetHspace

func (d DOMHTMLObjectElement) SetHspace(value int32)

func (DOMHTMLObjectElement) SetName

func (d DOMHTMLObjectElement) SetName(value string)

func (DOMHTMLObjectElement) SetStandby

func (d DOMHTMLObjectElement) SetStandby(value string)

func (DOMHTMLObjectElement) SetType

func (d DOMHTMLObjectElement) SetType(value string)

func (DOMHTMLObjectElement) SetUseMap

func (d DOMHTMLObjectElement) SetUseMap(value string)

func (DOMHTMLObjectElement) SetVspace

func (d DOMHTMLObjectElement) SetVspace(value int32)

func (DOMHTMLObjectElement) SetWidth

func (d DOMHTMLObjectElement) SetWidth(value string)

type DOMHTMLObjectElementClass

type DOMHTMLObjectElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLObjectElementClass

func GetDOMHTMLObjectElementClass() DOMHTMLObjectElementClass

GetDOMHTMLObjectElementClass returns the class object for DOMHTMLObjectElement.

func (DOMHTMLObjectElementClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLObjectElementClass) Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLOptGroupElement

type DOMHTMLOptGroupElement struct {
	DOMHTMLElement
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLOptGroupElement

func DOMHTMLOptGroupElementFromID

func DOMHTMLOptGroupElementFromID(id objc.ID) DOMHTMLOptGroupElement

DOMHTMLOptGroupElementFromID constructs a DOMHTMLOptGroupElement from an objc.ID.

func NewDOMHTMLOptGroupElement

func NewDOMHTMLOptGroupElement() DOMHTMLOptGroupElement

NewDOMHTMLOptGroupElement creates a new DOMHTMLOptGroupElement instance.

func (DOMHTMLOptGroupElement) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLOptGroupElement) Init

Init initializes the instance.

func (DOMHTMLOptGroupElement) SetDisabled

func (d DOMHTMLOptGroupElement) SetDisabled(value bool)

func (DOMHTMLOptGroupElement) SetLabel

func (d DOMHTMLOptGroupElement) SetLabel(value string)

type DOMHTMLOptGroupElementClass

type DOMHTMLOptGroupElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLOptGroupElementClass

func GetDOMHTMLOptGroupElementClass() DOMHTMLOptGroupElementClass

GetDOMHTMLOptGroupElementClass returns the class object for DOMHTMLOptGroupElement.

func (DOMHTMLOptGroupElementClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLOptGroupElementClass) Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLOptionElement

type DOMHTMLOptionElement struct {
	DOMHTMLElement
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLOptionElement

func DOMHTMLOptionElementFromID

func DOMHTMLOptionElementFromID(id objc.ID) DOMHTMLOptionElement

DOMHTMLOptionElementFromID constructs a DOMHTMLOptionElement from an objc.ID.

func NewDOMHTMLOptionElement

func NewDOMHTMLOptionElement() DOMHTMLOptionElement

NewDOMHTMLOptionElement creates a new DOMHTMLOptionElement instance.

func (DOMHTMLOptionElement) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLOptionElement) Init

Init initializes the instance.

func (DOMHTMLOptionElement) SetDefaultSelected

func (d DOMHTMLOptionElement) SetDefaultSelected(value bool)

func (DOMHTMLOptionElement) SetDisabled

func (d DOMHTMLOptionElement) SetDisabled(value bool)

func (DOMHTMLOptionElement) SetLabel

func (d DOMHTMLOptionElement) SetLabel(value string)

func (DOMHTMLOptionElement) SetSelected

func (d DOMHTMLOptionElement) SetSelected(value bool)

func (DOMHTMLOptionElement) SetValue

func (d DOMHTMLOptionElement) SetValue(value string)

type DOMHTMLOptionElementClass

type DOMHTMLOptionElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLOptionElementClass

func GetDOMHTMLOptionElementClass() DOMHTMLOptionElementClass

GetDOMHTMLOptionElementClass returns the class object for DOMHTMLOptionElement.

func (DOMHTMLOptionElementClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLOptionElementClass) Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLOptionsCollection

type DOMHTMLOptionsCollection struct {
	DOMObject
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLOptionsCollection

func DOMHTMLOptionsCollectionFromID

func DOMHTMLOptionsCollectionFromID(id objc.ID) DOMHTMLOptionsCollection

DOMHTMLOptionsCollectionFromID constructs a DOMHTMLOptionsCollection from an objc.ID.

func NewDOMHTMLOptionsCollection

func NewDOMHTMLOptionsCollection() DOMHTMLOptionsCollection

NewDOMHTMLOptionsCollection creates a new DOMHTMLOptionsCollection instance.

func (DOMHTMLOptionsCollection) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLOptionsCollection) Init

Init initializes the instance.

func (DOMHTMLOptionsCollection) SetLength

func (d DOMHTMLOptionsCollection) SetLength(value uint32)

func (DOMHTMLOptionsCollection) SetSelectedIndex

func (d DOMHTMLOptionsCollection) SetSelectedIndex(value int32)

type DOMHTMLOptionsCollectionClass

type DOMHTMLOptionsCollectionClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLOptionsCollectionClass

func GetDOMHTMLOptionsCollectionClass() DOMHTMLOptionsCollectionClass

GetDOMHTMLOptionsCollectionClass returns the class object for DOMHTMLOptionsCollection.

func (DOMHTMLOptionsCollectionClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLOptionsCollectionClass) Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLParagraphElement

type DOMHTMLParagraphElement struct {
	DOMHTMLElement
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLParagraphElement

func DOMHTMLParagraphElementFromID

func DOMHTMLParagraphElementFromID(id objc.ID) DOMHTMLParagraphElement

DOMHTMLParagraphElementFromID constructs a DOMHTMLParagraphElement from an objc.ID.

func NewDOMHTMLParagraphElement

func NewDOMHTMLParagraphElement() DOMHTMLParagraphElement

NewDOMHTMLParagraphElement creates a new DOMHTMLParagraphElement instance.

func (DOMHTMLParagraphElement) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLParagraphElement) Init

Init initializes the instance.

func (DOMHTMLParagraphElement) SetAlign

func (d DOMHTMLParagraphElement) SetAlign(value string)

type DOMHTMLParagraphElementClass

type DOMHTMLParagraphElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLParagraphElementClass

func GetDOMHTMLParagraphElementClass() DOMHTMLParagraphElementClass

GetDOMHTMLParagraphElementClass returns the class object for DOMHTMLParagraphElement.

func (DOMHTMLParagraphElementClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLParagraphElementClass) Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLParamElement

type DOMHTMLParamElement struct {
	DOMHTMLElement
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLParamElement

func DOMHTMLParamElementFromID

func DOMHTMLParamElementFromID(id objc.ID) DOMHTMLParamElement

DOMHTMLParamElementFromID constructs a DOMHTMLParamElement from an objc.ID.

func NewDOMHTMLParamElement

func NewDOMHTMLParamElement() DOMHTMLParamElement

NewDOMHTMLParamElement creates a new DOMHTMLParamElement instance.

func (DOMHTMLParamElement) Autorelease

func (d DOMHTMLParamElement) Autorelease() DOMHTMLParamElement

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLParamElement) Init

Init initializes the instance.

func (DOMHTMLParamElement) SetName

func (d DOMHTMLParamElement) SetName(value string)

func (DOMHTMLParamElement) SetType

func (d DOMHTMLParamElement) SetType(value string)

func (DOMHTMLParamElement) SetValue

func (d DOMHTMLParamElement) SetValue(value string)

func (DOMHTMLParamElement) SetValueType

func (d DOMHTMLParamElement) SetValueType(value string)

type DOMHTMLParamElementClass

type DOMHTMLParamElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLParamElementClass

func GetDOMHTMLParamElementClass() DOMHTMLParamElementClass

GetDOMHTMLParamElementClass returns the class object for DOMHTMLParamElement.

func (DOMHTMLParamElementClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLParamElementClass) Class

func (dc DOMHTMLParamElementClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLPreElement

type DOMHTMLPreElement struct {
	DOMHTMLElement
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLPreElement

func DOMHTMLPreElementFromID

func DOMHTMLPreElementFromID(id objc.ID) DOMHTMLPreElement

DOMHTMLPreElementFromID constructs a DOMHTMLPreElement from an objc.ID.

func NewDOMHTMLPreElement

func NewDOMHTMLPreElement() DOMHTMLPreElement

NewDOMHTMLPreElement creates a new DOMHTMLPreElement instance.

func (DOMHTMLPreElement) Autorelease

func (d DOMHTMLPreElement) Autorelease() DOMHTMLPreElement

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLPreElement) Init

Init initializes the instance.

func (DOMHTMLPreElement) SetWidth

func (d DOMHTMLPreElement) SetWidth(value int32)

func (DOMHTMLPreElement) SetWrap

func (d DOMHTMLPreElement) SetWrap(value bool)

type DOMHTMLPreElementClass

type DOMHTMLPreElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLPreElementClass

func GetDOMHTMLPreElementClass() DOMHTMLPreElementClass

GetDOMHTMLPreElementClass returns the class object for DOMHTMLPreElement.

func (DOMHTMLPreElementClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLPreElementClass) Class

func (dc DOMHTMLPreElementClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLQuoteElement

type DOMHTMLQuoteElement struct {
	DOMHTMLElement
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLQuoteElement

func DOMHTMLQuoteElementFromID

func DOMHTMLQuoteElementFromID(id objc.ID) DOMHTMLQuoteElement

DOMHTMLQuoteElementFromID constructs a DOMHTMLQuoteElement from an objc.ID.

func NewDOMHTMLQuoteElement

func NewDOMHTMLQuoteElement() DOMHTMLQuoteElement

NewDOMHTMLQuoteElement creates a new DOMHTMLQuoteElement instance.

func (DOMHTMLQuoteElement) Autorelease

func (d DOMHTMLQuoteElement) Autorelease() DOMHTMLQuoteElement

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLQuoteElement) Init

Init initializes the instance.

func (DOMHTMLQuoteElement) SetCite

func (d DOMHTMLQuoteElement) SetCite(value string)

type DOMHTMLQuoteElementClass

type DOMHTMLQuoteElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLQuoteElementClass

func GetDOMHTMLQuoteElementClass() DOMHTMLQuoteElementClass

GetDOMHTMLQuoteElementClass returns the class object for DOMHTMLQuoteElement.

func (DOMHTMLQuoteElementClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLQuoteElementClass) Class

func (dc DOMHTMLQuoteElementClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLScriptElement

type DOMHTMLScriptElement struct {
	DOMHTMLElement
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLScriptElement

func DOMHTMLScriptElementFromID

func DOMHTMLScriptElementFromID(id objc.ID) DOMHTMLScriptElement

DOMHTMLScriptElementFromID constructs a DOMHTMLScriptElement from an objc.ID.

func NewDOMHTMLScriptElement

func NewDOMHTMLScriptElement() DOMHTMLScriptElement

NewDOMHTMLScriptElement creates a new DOMHTMLScriptElement instance.

func (DOMHTMLScriptElement) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLScriptElement) Init

Init initializes the instance.

func (DOMHTMLScriptElement) SetCharset

func (d DOMHTMLScriptElement) SetCharset(value string)

func (DOMHTMLScriptElement) SetDefer

func (d DOMHTMLScriptElement) SetDefer(value bool)

func (DOMHTMLScriptElement) SetEvent

func (d DOMHTMLScriptElement) SetEvent(value string)

func (DOMHTMLScriptElement) SetHtmlFor

func (d DOMHTMLScriptElement) SetHtmlFor(value string)

func (DOMHTMLScriptElement) SetSrc

func (d DOMHTMLScriptElement) SetSrc(value string)

func (DOMHTMLScriptElement) SetText

func (d DOMHTMLScriptElement) SetText(value string)

func (DOMHTMLScriptElement) SetType

func (d DOMHTMLScriptElement) SetType(value string)

type DOMHTMLScriptElementClass

type DOMHTMLScriptElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLScriptElementClass

func GetDOMHTMLScriptElementClass() DOMHTMLScriptElementClass

GetDOMHTMLScriptElementClass returns the class object for DOMHTMLScriptElement.

func (DOMHTMLScriptElementClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLScriptElementClass) Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLSelectElement

type DOMHTMLSelectElement struct {
	DOMHTMLElement
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLSelectElement

func DOMHTMLSelectElementFromID

func DOMHTMLSelectElementFromID(id objc.ID) DOMHTMLSelectElement

DOMHTMLSelectElementFromID constructs a DOMHTMLSelectElement from an objc.ID.

func NewDOMHTMLSelectElement

func NewDOMHTMLSelectElement() DOMHTMLSelectElement

NewDOMHTMLSelectElement creates a new DOMHTMLSelectElement instance.

func (DOMHTMLSelectElement) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLSelectElement) Init

Init initializes the instance.

func (DOMHTMLSelectElement) SetAutofocus

func (d DOMHTMLSelectElement) SetAutofocus(value bool)

func (DOMHTMLSelectElement) SetDisabled

func (d DOMHTMLSelectElement) SetDisabled(value bool)

func (DOMHTMLSelectElement) SetMultiple

func (d DOMHTMLSelectElement) SetMultiple(value bool)

func (DOMHTMLSelectElement) SetName

func (d DOMHTMLSelectElement) SetName(value string)

func (DOMHTMLSelectElement) SetSelectedIndex

func (d DOMHTMLSelectElement) SetSelectedIndex(value int32)

func (DOMHTMLSelectElement) SetSize

func (d DOMHTMLSelectElement) SetSize(value int32)

func (DOMHTMLSelectElement) SetValue

func (d DOMHTMLSelectElement) SetValue(value string)

type DOMHTMLSelectElementClass

type DOMHTMLSelectElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLSelectElementClass

func GetDOMHTMLSelectElementClass() DOMHTMLSelectElementClass

GetDOMHTMLSelectElementClass returns the class object for DOMHTMLSelectElement.

func (DOMHTMLSelectElementClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLSelectElementClass) Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLStyleElement

type DOMHTMLStyleElement struct {
	DOMHTMLElement
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLStyleElement

func DOMHTMLStyleElementFromID

func DOMHTMLStyleElementFromID(id objc.ID) DOMHTMLStyleElement

DOMHTMLStyleElementFromID constructs a DOMHTMLStyleElement from an objc.ID.

func NewDOMHTMLStyleElement

func NewDOMHTMLStyleElement() DOMHTMLStyleElement

NewDOMHTMLStyleElement creates a new DOMHTMLStyleElement instance.

func (DOMHTMLStyleElement) Autorelease

func (d DOMHTMLStyleElement) Autorelease() DOMHTMLStyleElement

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLStyleElement) Init

Init initializes the instance.

func (DOMHTMLStyleElement) SetDisabled

func (d DOMHTMLStyleElement) SetDisabled(value bool)

func (DOMHTMLStyleElement) SetMedia

func (d DOMHTMLStyleElement) SetMedia(value string)

func (DOMHTMLStyleElement) SetType

func (d DOMHTMLStyleElement) SetType(value string)

type DOMHTMLStyleElementClass

type DOMHTMLStyleElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLStyleElementClass

func GetDOMHTMLStyleElementClass() DOMHTMLStyleElementClass

GetDOMHTMLStyleElementClass returns the class object for DOMHTMLStyleElement.

func (DOMHTMLStyleElementClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLStyleElementClass) Class

func (dc DOMHTMLStyleElementClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLTableCaptionElement

type DOMHTMLTableCaptionElement struct {
	DOMHTMLElement
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLTableCaptionElement

func DOMHTMLTableCaptionElementFromID

func DOMHTMLTableCaptionElementFromID(id objc.ID) DOMHTMLTableCaptionElement

DOMHTMLTableCaptionElementFromID constructs a DOMHTMLTableCaptionElement from an objc.ID.

func NewDOMHTMLTableCaptionElement

func NewDOMHTMLTableCaptionElement() DOMHTMLTableCaptionElement

NewDOMHTMLTableCaptionElement creates a new DOMHTMLTableCaptionElement instance.

func (DOMHTMLTableCaptionElement) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLTableCaptionElement) Init

Init initializes the instance.

func (DOMHTMLTableCaptionElement) SetAlign

func (d DOMHTMLTableCaptionElement) SetAlign(value string)

type DOMHTMLTableCaptionElementClass

type DOMHTMLTableCaptionElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLTableCaptionElementClass

func GetDOMHTMLTableCaptionElementClass() DOMHTMLTableCaptionElementClass

GetDOMHTMLTableCaptionElementClass returns the class object for DOMHTMLTableCaptionElement.

func (DOMHTMLTableCaptionElementClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLTableCaptionElementClass) Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLTableCellElement

type DOMHTMLTableCellElement struct {
	DOMHTMLElement
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLTableCellElement

func DOMHTMLTableCellElementFromID

func DOMHTMLTableCellElementFromID(id objc.ID) DOMHTMLTableCellElement

DOMHTMLTableCellElementFromID constructs a DOMHTMLTableCellElement from an objc.ID.

func NewDOMHTMLTableCellElement

func NewDOMHTMLTableCellElement() DOMHTMLTableCellElement

NewDOMHTMLTableCellElement creates a new DOMHTMLTableCellElement instance.

func (DOMHTMLTableCellElement) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLTableCellElement) Init

Init initializes the instance.

func (DOMHTMLTableCellElement) SetAbbr

func (d DOMHTMLTableCellElement) SetAbbr(value string)

func (DOMHTMLTableCellElement) SetAlign

func (d DOMHTMLTableCellElement) SetAlign(value string)

func (DOMHTMLTableCellElement) SetAxis

func (d DOMHTMLTableCellElement) SetAxis(value string)

func (DOMHTMLTableCellElement) SetBgColor

func (d DOMHTMLTableCellElement) SetBgColor(value string)

func (DOMHTMLTableCellElement) SetCh

func (d DOMHTMLTableCellElement) SetCh(value string)

func (DOMHTMLTableCellElement) SetChOff

func (d DOMHTMLTableCellElement) SetChOff(value string)

func (DOMHTMLTableCellElement) SetColSpan

func (d DOMHTMLTableCellElement) SetColSpan(value int32)

func (DOMHTMLTableCellElement) SetHeaders

func (d DOMHTMLTableCellElement) SetHeaders(value string)

func (DOMHTMLTableCellElement) SetHeight

func (d DOMHTMLTableCellElement) SetHeight(value string)

func (DOMHTMLTableCellElement) SetNoWrap

func (d DOMHTMLTableCellElement) SetNoWrap(value bool)

func (DOMHTMLTableCellElement) SetRowSpan

func (d DOMHTMLTableCellElement) SetRowSpan(value int32)

func (DOMHTMLTableCellElement) SetScope

func (d DOMHTMLTableCellElement) SetScope(value string)

func (DOMHTMLTableCellElement) SetVAlign

func (d DOMHTMLTableCellElement) SetVAlign(value string)

func (DOMHTMLTableCellElement) SetWidth

func (d DOMHTMLTableCellElement) SetWidth(value string)

type DOMHTMLTableCellElementClass

type DOMHTMLTableCellElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLTableCellElementClass

func GetDOMHTMLTableCellElementClass() DOMHTMLTableCellElementClass

GetDOMHTMLTableCellElementClass returns the class object for DOMHTMLTableCellElement.

func (DOMHTMLTableCellElementClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLTableCellElementClass) Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLTableColElement

type DOMHTMLTableColElement struct {
	DOMHTMLElement
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLTableColElement

func DOMHTMLTableColElementFromID

func DOMHTMLTableColElementFromID(id objc.ID) DOMHTMLTableColElement

DOMHTMLTableColElementFromID constructs a DOMHTMLTableColElement from an objc.ID.

func NewDOMHTMLTableColElement

func NewDOMHTMLTableColElement() DOMHTMLTableColElement

NewDOMHTMLTableColElement creates a new DOMHTMLTableColElement instance.

func (DOMHTMLTableColElement) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLTableColElement) Init

Init initializes the instance.

func (DOMHTMLTableColElement) SetAlign

func (d DOMHTMLTableColElement) SetAlign(value string)

func (DOMHTMLTableColElement) SetCh

func (d DOMHTMLTableColElement) SetCh(value string)

func (DOMHTMLTableColElement) SetChOff

func (d DOMHTMLTableColElement) SetChOff(value string)

func (DOMHTMLTableColElement) SetSpan

func (d DOMHTMLTableColElement) SetSpan(value int32)

func (DOMHTMLTableColElement) SetVAlign

func (d DOMHTMLTableColElement) SetVAlign(value string)

func (DOMHTMLTableColElement) SetWidth

func (d DOMHTMLTableColElement) SetWidth(value string)

type DOMHTMLTableColElementClass

type DOMHTMLTableColElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLTableColElementClass

func GetDOMHTMLTableColElementClass() DOMHTMLTableColElementClass

GetDOMHTMLTableColElementClass returns the class object for DOMHTMLTableColElement.

func (DOMHTMLTableColElementClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLTableColElementClass) Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLTableElement

type DOMHTMLTableElement struct {
	DOMHTMLElement
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLTableElement

func DOMHTMLTableElementFromID

func DOMHTMLTableElementFromID(id objc.ID) DOMHTMLTableElement

DOMHTMLTableElementFromID constructs a DOMHTMLTableElement from an objc.ID.

func NewDOMHTMLTableElement

func NewDOMHTMLTableElement() DOMHTMLTableElement

NewDOMHTMLTableElement creates a new DOMHTMLTableElement instance.

func (DOMHTMLTableElement) Autorelease

func (d DOMHTMLTableElement) Autorelease() DOMHTMLTableElement

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLTableElement) Init

Init initializes the instance.

func (DOMHTMLTableElement) SetAlign

func (d DOMHTMLTableElement) SetAlign(value string)

func (DOMHTMLTableElement) SetBgColor

func (d DOMHTMLTableElement) SetBgColor(value string)

func (DOMHTMLTableElement) SetBorder

func (d DOMHTMLTableElement) SetBorder(value string)

func (DOMHTMLTableElement) SetCaption

func (DOMHTMLTableElement) SetCellPadding

func (d DOMHTMLTableElement) SetCellPadding(value string)

func (DOMHTMLTableElement) SetCellSpacing

func (d DOMHTMLTableElement) SetCellSpacing(value string)

func (DOMHTMLTableElement) SetFrameBorders

func (d DOMHTMLTableElement) SetFrameBorders(value string)

func (DOMHTMLTableElement) SetRules

func (d DOMHTMLTableElement) SetRules(value string)

func (DOMHTMLTableElement) SetSummary

func (d DOMHTMLTableElement) SetSummary(value string)

func (DOMHTMLTableElement) SetTFoot

func (DOMHTMLTableElement) SetTHead

func (DOMHTMLTableElement) SetWidth

func (d DOMHTMLTableElement) SetWidth(value string)

type DOMHTMLTableElementClass

type DOMHTMLTableElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLTableElementClass

func GetDOMHTMLTableElementClass() DOMHTMLTableElementClass

GetDOMHTMLTableElementClass returns the class object for DOMHTMLTableElement.

func (DOMHTMLTableElementClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLTableElementClass) Class

func (dc DOMHTMLTableElementClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLTableRowElement

type DOMHTMLTableRowElement struct {
	DOMHTMLElement
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLTableRowElement

func DOMHTMLTableRowElementFromID

func DOMHTMLTableRowElementFromID(id objc.ID) DOMHTMLTableRowElement

DOMHTMLTableRowElementFromID constructs a DOMHTMLTableRowElement from an objc.ID.

func NewDOMHTMLTableRowElement

func NewDOMHTMLTableRowElement() DOMHTMLTableRowElement

NewDOMHTMLTableRowElement creates a new DOMHTMLTableRowElement instance.

func (DOMHTMLTableRowElement) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLTableRowElement) Init

Init initializes the instance.

func (DOMHTMLTableRowElement) SetAlign

func (d DOMHTMLTableRowElement) SetAlign(value string)

func (DOMHTMLTableRowElement) SetBgColor

func (d DOMHTMLTableRowElement) SetBgColor(value string)

func (DOMHTMLTableRowElement) SetCh

func (d DOMHTMLTableRowElement) SetCh(value string)

func (DOMHTMLTableRowElement) SetChOff

func (d DOMHTMLTableRowElement) SetChOff(value string)

func (DOMHTMLTableRowElement) SetVAlign

func (d DOMHTMLTableRowElement) SetVAlign(value string)

type DOMHTMLTableRowElementClass

type DOMHTMLTableRowElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLTableRowElementClass

func GetDOMHTMLTableRowElementClass() DOMHTMLTableRowElementClass

GetDOMHTMLTableRowElementClass returns the class object for DOMHTMLTableRowElement.

func (DOMHTMLTableRowElementClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLTableRowElementClass) Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLTableSectionElement

type DOMHTMLTableSectionElement struct {
	DOMHTMLElement
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLTableSectionElement

func DOMHTMLTableSectionElementFromID

func DOMHTMLTableSectionElementFromID(id objc.ID) DOMHTMLTableSectionElement

DOMHTMLTableSectionElementFromID constructs a DOMHTMLTableSectionElement from an objc.ID.

func NewDOMHTMLTableSectionElement

func NewDOMHTMLTableSectionElement() DOMHTMLTableSectionElement

NewDOMHTMLTableSectionElement creates a new DOMHTMLTableSectionElement instance.

func (DOMHTMLTableSectionElement) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLTableSectionElement) Init

Init initializes the instance.

func (DOMHTMLTableSectionElement) SetAlign

func (d DOMHTMLTableSectionElement) SetAlign(value string)

func (DOMHTMLTableSectionElement) SetCh

func (d DOMHTMLTableSectionElement) SetCh(value string)

func (DOMHTMLTableSectionElement) SetChOff

func (d DOMHTMLTableSectionElement) SetChOff(value string)

func (DOMHTMLTableSectionElement) SetVAlign

func (d DOMHTMLTableSectionElement) SetVAlign(value string)

type DOMHTMLTableSectionElementClass

type DOMHTMLTableSectionElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLTableSectionElementClass

func GetDOMHTMLTableSectionElementClass() DOMHTMLTableSectionElementClass

GetDOMHTMLTableSectionElementClass returns the class object for DOMHTMLTableSectionElement.

func (DOMHTMLTableSectionElementClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLTableSectionElementClass) Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLTextAreaElement

type DOMHTMLTextAreaElement struct {
	DOMHTMLElement
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLTextAreaElement

func DOMHTMLTextAreaElementFromID

func DOMHTMLTextAreaElementFromID(id objc.ID) DOMHTMLTextAreaElement

DOMHTMLTextAreaElementFromID constructs a DOMHTMLTextAreaElement from an objc.ID.

func NewDOMHTMLTextAreaElement

func NewDOMHTMLTextAreaElement() DOMHTMLTextAreaElement

NewDOMHTMLTextAreaElement creates a new DOMHTMLTextAreaElement instance.

func (DOMHTMLTextAreaElement) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLTextAreaElement) Init

Init initializes the instance.

func (DOMHTMLTextAreaElement) SetAutofocus

func (d DOMHTMLTextAreaElement) SetAutofocus(value bool)

func (DOMHTMLTextAreaElement) SetCols

func (d DOMHTMLTextAreaElement) SetCols(value int32)

func (DOMHTMLTextAreaElement) SetDefaultValue

func (d DOMHTMLTextAreaElement) SetDefaultValue(value string)

func (DOMHTMLTextAreaElement) SetDisabled

func (d DOMHTMLTextAreaElement) SetDisabled(value bool)

func (DOMHTMLTextAreaElement) SetName

func (d DOMHTMLTextAreaElement) SetName(value string)

func (DOMHTMLTextAreaElement) SetReadOnly

func (d DOMHTMLTextAreaElement) SetReadOnly(value bool)

func (DOMHTMLTextAreaElement) SetRows

func (d DOMHTMLTextAreaElement) SetRows(value int32)

func (DOMHTMLTextAreaElement) SetSelectionEnd

func (d DOMHTMLTextAreaElement) SetSelectionEnd(value int32)

func (DOMHTMLTextAreaElement) SetSelectionStart

func (d DOMHTMLTextAreaElement) SetSelectionStart(value int32)

func (DOMHTMLTextAreaElement) SetValue

func (d DOMHTMLTextAreaElement) SetValue(value string)

type DOMHTMLTextAreaElementClass

type DOMHTMLTextAreaElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLTextAreaElementClass

func GetDOMHTMLTextAreaElementClass() DOMHTMLTextAreaElementClass

GetDOMHTMLTextAreaElementClass returns the class object for DOMHTMLTextAreaElement.

func (DOMHTMLTextAreaElementClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLTextAreaElementClass) Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLTitleElement

type DOMHTMLTitleElement struct {
	DOMHTMLElement
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLTitleElement

func DOMHTMLTitleElementFromID

func DOMHTMLTitleElementFromID(id objc.ID) DOMHTMLTitleElement

DOMHTMLTitleElementFromID constructs a DOMHTMLTitleElement from an objc.ID.

func NewDOMHTMLTitleElement

func NewDOMHTMLTitleElement() DOMHTMLTitleElement

NewDOMHTMLTitleElement creates a new DOMHTMLTitleElement instance.

func (DOMHTMLTitleElement) Autorelease

func (d DOMHTMLTitleElement) Autorelease() DOMHTMLTitleElement

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLTitleElement) Init

Init initializes the instance.

func (DOMHTMLTitleElement) SetText

func (d DOMHTMLTitleElement) SetText(value string)

type DOMHTMLTitleElementClass

type DOMHTMLTitleElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLTitleElementClass

func GetDOMHTMLTitleElementClass() DOMHTMLTitleElementClass

GetDOMHTMLTitleElementClass returns the class object for DOMHTMLTitleElement.

func (DOMHTMLTitleElementClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLTitleElementClass) Class

func (dc DOMHTMLTitleElementClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMHTMLUListElement

type DOMHTMLUListElement struct {
	DOMHTMLElement
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLUListElement

func DOMHTMLUListElementFromID

func DOMHTMLUListElementFromID(id objc.ID) DOMHTMLUListElement

DOMHTMLUListElementFromID constructs a DOMHTMLUListElement from an objc.ID.

func NewDOMHTMLUListElement

func NewDOMHTMLUListElement() DOMHTMLUListElement

NewDOMHTMLUListElement creates a new DOMHTMLUListElement instance.

func (DOMHTMLUListElement) Autorelease

func (d DOMHTMLUListElement) Autorelease() DOMHTMLUListElement

Autorelease adds the receiver to the current autorelease pool.

func (DOMHTMLUListElement) Init

Init initializes the instance.

func (DOMHTMLUListElement) SetCompact

func (d DOMHTMLUListElement) SetCompact(value bool)

func (DOMHTMLUListElement) SetType

func (d DOMHTMLUListElement) SetType(value string)

type DOMHTMLUListElementClass

type DOMHTMLUListElementClass struct {
	// contains filtered or unexported fields
}

func GetDOMHTMLUListElementClass

func GetDOMHTMLUListElementClass() DOMHTMLUListElementClass

GetDOMHTMLUListElementClass returns the class object for DOMHTMLUListElement.

func (DOMHTMLUListElementClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMHTMLUListElementClass) Class

func (dc DOMHTMLUListElementClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMImplementation

type DOMImplementation struct {
	DOMObject
}

See: https://developer.apple.com/documentation/WebKit/DOMImplementation

func DOMImplementationFromID

func DOMImplementationFromID(id objc.ID) DOMImplementation

DOMImplementationFromID constructs a DOMImplementation from an objc.ID.

func NewDOMImplementation

func NewDOMImplementation() DOMImplementation

NewDOMImplementation creates a new DOMImplementation instance.

func (DOMImplementation) Autorelease

func (d DOMImplementation) Autorelease() DOMImplementation

Autorelease adds the receiver to the current autorelease pool.

func (DOMImplementation) Init

Init initializes the instance.

type DOMImplementationClass

type DOMImplementationClass struct {
	// contains filtered or unexported fields
}

func GetDOMImplementationClass

func GetDOMImplementationClass() DOMImplementationClass

GetDOMImplementationClass returns the class object for DOMImplementation.

func (DOMImplementationClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMImplementationClass) Class

func (dc DOMImplementationClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMKeyboardEvent

type DOMKeyboardEvent struct {
	DOMUIEvent
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMKeyboardEvent

func DOMKeyboardEventFromID

func DOMKeyboardEventFromID(id objc.ID) DOMKeyboardEvent

DOMKeyboardEventFromID constructs a DOMKeyboardEvent from an objc.ID.

func NewDOMKeyboardEvent

func NewDOMKeyboardEvent() DOMKeyboardEvent

NewDOMKeyboardEvent creates a new DOMKeyboardEvent instance.

func (DOMKeyboardEvent) Autorelease

func (d DOMKeyboardEvent) Autorelease() DOMKeyboardEvent

Autorelease adds the receiver to the current autorelease pool.

func (DOMKeyboardEvent) Init

Init initializes the instance.

type DOMKeyboardEventClass

type DOMKeyboardEventClass struct {
	// contains filtered or unexported fields
}

func GetDOMKeyboardEventClass

func GetDOMKeyboardEventClass() DOMKeyboardEventClass

GetDOMKeyboardEventClass returns the class object for DOMKeyboardEvent.

func (DOMKeyboardEventClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMKeyboardEventClass) Class

func (dc DOMKeyboardEventClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMMediaList

type DOMMediaList struct {
	DOMObject
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMMediaList

func DOMMediaListFromID

func DOMMediaListFromID(id objc.ID) DOMMediaList

DOMMediaListFromID constructs a DOMMediaList from an objc.ID.

func NewDOMMediaList

func NewDOMMediaList() DOMMediaList

NewDOMMediaList creates a new DOMMediaList instance.

func (DOMMediaList) Autorelease

func (d DOMMediaList) Autorelease() DOMMediaList

Autorelease adds the receiver to the current autorelease pool.

func (DOMMediaList) Init

func (d DOMMediaList) Init() DOMMediaList

Init initializes the instance.

func (DOMMediaList) SetMediaText

func (d DOMMediaList) SetMediaText(value string)

type DOMMediaListClass

type DOMMediaListClass struct {
	// contains filtered or unexported fields
}

func GetDOMMediaListClass

func GetDOMMediaListClass() DOMMediaListClass

GetDOMMediaListClass returns the class object for DOMMediaList.

func (DOMMediaListClass) Alloc

func (dc DOMMediaListClass) Alloc() DOMMediaList

Alloc allocates memory for a new instance of the class.

func (DOMMediaListClass) Class

func (dc DOMMediaListClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMMouseEvent

type DOMMouseEvent struct {
	DOMUIEvent
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMMouseEvent

func DOMMouseEventFromID

func DOMMouseEventFromID(id objc.ID) DOMMouseEvent

DOMMouseEventFromID constructs a DOMMouseEvent from an objc.ID.

func NewDOMMouseEvent

func NewDOMMouseEvent() DOMMouseEvent

NewDOMMouseEvent creates a new DOMMouseEvent instance.

func (DOMMouseEvent) Autorelease

func (d DOMMouseEvent) Autorelease() DOMMouseEvent

Autorelease adds the receiver to the current autorelease pool.

func (DOMMouseEvent) Init

func (d DOMMouseEvent) Init() DOMMouseEvent

Init initializes the instance.

type DOMMouseEventClass

type DOMMouseEventClass struct {
	// contains filtered or unexported fields
}

func GetDOMMouseEventClass

func GetDOMMouseEventClass() DOMMouseEventClass

GetDOMMouseEventClass returns the class object for DOMMouseEvent.

func (DOMMouseEventClass) Alloc

func (dc DOMMouseEventClass) Alloc() DOMMouseEvent

Alloc allocates memory for a new instance of the class.

func (DOMMouseEventClass) Class

func (dc DOMMouseEventClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMMutationEvent

type DOMMutationEvent struct {
	DOMEvent
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMMutationEvent

func DOMMutationEventFromID

func DOMMutationEventFromID(id objc.ID) DOMMutationEvent

DOMMutationEventFromID constructs a DOMMutationEvent from an objc.ID.

func NewDOMMutationEvent

func NewDOMMutationEvent() DOMMutationEvent

NewDOMMutationEvent creates a new DOMMutationEvent instance.

func (DOMMutationEvent) Autorelease

func (d DOMMutationEvent) Autorelease() DOMMutationEvent

Autorelease adds the receiver to the current autorelease pool.

func (DOMMutationEvent) Init

Init initializes the instance.

type DOMMutationEventClass

type DOMMutationEventClass struct {
	// contains filtered or unexported fields
}

func GetDOMMutationEventClass

func GetDOMMutationEventClass() DOMMutationEventClass

GetDOMMutationEventClass returns the class object for DOMMutationEvent.

func (DOMMutationEventClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMMutationEventClass) Class

func (dc DOMMutationEventClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMNamedNodeMap

type DOMNamedNodeMap struct {
	DOMObject
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMNamedNodeMap

func DOMNamedNodeMapFromID

func DOMNamedNodeMapFromID(id objc.ID) DOMNamedNodeMap

DOMNamedNodeMapFromID constructs a DOMNamedNodeMap from an objc.ID.

func NewDOMNamedNodeMap

func NewDOMNamedNodeMap() DOMNamedNodeMap

NewDOMNamedNodeMap creates a new DOMNamedNodeMap instance.

func (DOMNamedNodeMap) Autorelease

func (d DOMNamedNodeMap) Autorelease() DOMNamedNodeMap

Autorelease adds the receiver to the current autorelease pool.

func (DOMNamedNodeMap) Init

Init initializes the instance.

type DOMNamedNodeMapClass

type DOMNamedNodeMapClass struct {
	// contains filtered or unexported fields
}

func GetDOMNamedNodeMapClass

func GetDOMNamedNodeMapClass() DOMNamedNodeMapClass

GetDOMNamedNodeMapClass returns the class object for DOMNamedNodeMap.

func (DOMNamedNodeMapClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMNamedNodeMapClass) Class

func (dc DOMNamedNodeMapClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMNode

type DOMNode struct {
	DOMObject
}

Instance Properties

Instance Methods

See: https://developer.apple.com/documentation/WebKit/DOMNode

func DOMNodeFromID

func DOMNodeFromID(id objc.ID) DOMNode

DOMNodeFromID constructs a DOMNode from an objc.ID.

func NewDOMNode

func NewDOMNode() DOMNode

NewDOMNode creates a new DOMNode instance.

func (DOMNode) Autorelease

func (d DOMNode) Autorelease() DOMNode

Autorelease adds the receiver to the current autorelease pool.

func (DOMNode) BoundingBox

func (d DOMNode) BoundingBox() corefoundation.CGRect

Returns a rectangle that bounds the onscreen rendering of the node.

Return Value

The rectangle that represents the bounding box of the onscreen rendering of the node.

See: https://developer.apple.com/documentation/WebKit/DOMNode/boundingBox()

func (DOMNode) Init

func (d DOMNode) Init() DOMNode

Init initializes the instance.

func (DOMNode) LineBoxRects

func (d DOMNode) LineBoxRects() foundation.INSArray

Returns the rectangles that bound each line of text in the node.

Return Value

An array of rectangles, in which each rectangle represents the bounding box of a line of text in the node.

See: https://developer.apple.com/documentation/WebKit/DOMNode/lineBoxRects()

func (DOMNode) SetNodeValue

func (d DOMNode) SetNodeValue(value string)

func (DOMNode) SetPrefix

func (d DOMNode) SetPrefix(value string)

func (DOMNode) SetTextContent

func (d DOMNode) SetTextContent(value string)

func (DOMNode) WebArchive

func (d DOMNode) WebArchive() IWebArchive

A web archive of the content of the node and its children.

See: https://developer.apple.com/documentation/WebKit/DOMNode/webArchive

type DOMNodeClass

type DOMNodeClass struct {
	// contains filtered or unexported fields
}

func GetDOMNodeClass

func GetDOMNodeClass() DOMNodeClass

GetDOMNodeClass returns the class object for DOMNode.

func (DOMNodeClass) Alloc

func (dc DOMNodeClass) Alloc() DOMNode

Alloc allocates memory for a new instance of the class.

func (DOMNodeClass) Class

func (dc DOMNodeClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMNodeFilter

type DOMNodeFilter interface {
	objectivec.IObject

	// AcceptNode protocol.
	//
	// See: https://developer.apple.com/documentation/WebKit/DOMNodeFilter/accept(_:)
	AcceptNode(n IDOMNode) int16
}

DOMNodeFilter protocol.

See: https://developer.apple.com/documentation/WebKit/DOMNodeFilter

type DOMNodeFilterObject

type DOMNodeFilterObject struct {
	objectivec.Object
}

DOMNodeFilterObject wraps an existing Objective-C object that conforms to the DOMNodeFilter protocol.

func DOMNodeFilterObjectFromID

func DOMNodeFilterObjectFromID(id objc.ID) DOMNodeFilterObject

DOMNodeFilterObjectFromID constructs a DOMNodeFilterObject from an objc.ID. The object is determined to conform to the protocol at runtime.

func (DOMNodeFilterObject) BaseObject

func (o DOMNodeFilterObject) BaseObject() objectivec.Object

type DOMNodeIterator

type DOMNodeIterator struct {
	DOMObject
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMNodeIterator

func DOMNodeIteratorFromID

func DOMNodeIteratorFromID(id objc.ID) DOMNodeIterator

DOMNodeIteratorFromID constructs a DOMNodeIterator from an objc.ID.

func NewDOMNodeIterator

func NewDOMNodeIterator() DOMNodeIterator

NewDOMNodeIterator creates a new DOMNodeIterator instance.

func (DOMNodeIterator) Autorelease

func (d DOMNodeIterator) Autorelease() DOMNodeIterator

Autorelease adds the receiver to the current autorelease pool.

func (DOMNodeIterator) Init

Init initializes the instance.

type DOMNodeIteratorClass

type DOMNodeIteratorClass struct {
	// contains filtered or unexported fields
}

func GetDOMNodeIteratorClass

func GetDOMNodeIteratorClass() DOMNodeIteratorClass

GetDOMNodeIteratorClass returns the class object for DOMNodeIterator.

func (DOMNodeIteratorClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMNodeIteratorClass) Class

func (dc DOMNodeIteratorClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMNodeList

type DOMNodeList struct {
	DOMObject
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMNodeList

func DOMNodeListFromID

func DOMNodeListFromID(id objc.ID) DOMNodeList

DOMNodeListFromID constructs a DOMNodeList from an objc.ID.

func NewDOMNodeList

func NewDOMNodeList() DOMNodeList

NewDOMNodeList creates a new DOMNodeList instance.

func (DOMNodeList) Autorelease

func (d DOMNodeList) Autorelease() DOMNodeList

Autorelease adds the receiver to the current autorelease pool.

func (DOMNodeList) Init

func (d DOMNodeList) Init() DOMNodeList

Init initializes the instance.

type DOMNodeListClass

type DOMNodeListClass struct {
	// contains filtered or unexported fields
}

func GetDOMNodeListClass

func GetDOMNodeListClass() DOMNodeListClass

GetDOMNodeListClass returns the class object for DOMNodeList.

func (DOMNodeListClass) Alloc

func (dc DOMNodeListClass) Alloc() DOMNodeList

Alloc allocates memory for a new instance of the class.

func (DOMNodeListClass) Class

func (dc DOMNodeListClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMObject

type DOMObject struct {
	WebScriptObject
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMObject

func DOMObjectFromID

func DOMObjectFromID(id objc.ID) DOMObject

DOMObjectFromID constructs a DOMObject from an objc.ID.

func NewDOMObject

func NewDOMObject() DOMObject

NewDOMObject creates a new DOMObject instance.

func (DOMObject) Autorelease

func (d DOMObject) Autorelease() DOMObject

Autorelease adds the receiver to the current autorelease pool.

func (DOMObject) Init

func (d DOMObject) Init() DOMObject

Init initializes the instance.

type DOMObjectClass

type DOMObjectClass struct {
	// contains filtered or unexported fields
}

func GetDOMObjectClass

func GetDOMObjectClass() DOMObjectClass

GetDOMObjectClass returns the class object for DOMObject.

func (DOMObjectClass) Alloc

func (dc DOMObjectClass) Alloc() DOMObject

Alloc allocates memory for a new instance of the class.

func (DOMObjectClass) Class

func (dc DOMObjectClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMOverflowEvent

type DOMOverflowEvent struct {
	DOMEvent
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMOverflowEvent

func DOMOverflowEventFromID

func DOMOverflowEventFromID(id objc.ID) DOMOverflowEvent

DOMOverflowEventFromID constructs a DOMOverflowEvent from an objc.ID.

func NewDOMOverflowEvent

func NewDOMOverflowEvent() DOMOverflowEvent

NewDOMOverflowEvent creates a new DOMOverflowEvent instance.

func (DOMOverflowEvent) Autorelease

func (d DOMOverflowEvent) Autorelease() DOMOverflowEvent

Autorelease adds the receiver to the current autorelease pool.

func (DOMOverflowEvent) Init

Init initializes the instance.

type DOMOverflowEventClass

type DOMOverflowEventClass struct {
	// contains filtered or unexported fields
}

func GetDOMOverflowEventClass

func GetDOMOverflowEventClass() DOMOverflowEventClass

GetDOMOverflowEventClass returns the class object for DOMOverflowEvent.

func (DOMOverflowEventClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMOverflowEventClass) Class

func (dc DOMOverflowEventClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMProcessingInstruction

type DOMProcessingInstruction struct {
	DOMCharacterData
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMProcessingInstruction

func DOMProcessingInstructionFromID

func DOMProcessingInstructionFromID(id objc.ID) DOMProcessingInstruction

DOMProcessingInstructionFromID constructs a DOMProcessingInstruction from an objc.ID.

func NewDOMProcessingInstruction

func NewDOMProcessingInstruction() DOMProcessingInstruction

NewDOMProcessingInstruction creates a new DOMProcessingInstruction instance.

func (DOMProcessingInstruction) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (DOMProcessingInstruction) Init

Init initializes the instance.

type DOMProcessingInstructionClass

type DOMProcessingInstructionClass struct {
	// contains filtered or unexported fields
}

func GetDOMProcessingInstructionClass

func GetDOMProcessingInstructionClass() DOMProcessingInstructionClass

GetDOMProcessingInstructionClass returns the class object for DOMProcessingInstruction.

func (DOMProcessingInstructionClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMProcessingInstructionClass) Class

Class returns the underlying Objective-C class pointer.

type DOMProgressEvent

type DOMProgressEvent struct {
	DOMEvent
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMProgressEvent

func DOMProgressEventFromID

func DOMProgressEventFromID(id objc.ID) DOMProgressEvent

DOMProgressEventFromID constructs a DOMProgressEvent from an objc.ID.

func NewDOMProgressEvent

func NewDOMProgressEvent() DOMProgressEvent

NewDOMProgressEvent creates a new DOMProgressEvent instance.

func (DOMProgressEvent) Autorelease

func (d DOMProgressEvent) Autorelease() DOMProgressEvent

Autorelease adds the receiver to the current autorelease pool.

func (DOMProgressEvent) Init

Init initializes the instance.

type DOMProgressEventClass

type DOMProgressEventClass struct {
	// contains filtered or unexported fields
}

func GetDOMProgressEventClass

func GetDOMProgressEventClass() DOMProgressEventClass

GetDOMProgressEventClass returns the class object for DOMProgressEvent.

func (DOMProgressEventClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMProgressEventClass) Class

func (dc DOMProgressEventClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMRGBColor

type DOMRGBColor struct {
	DOMObject
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMRGBColor

func DOMRGBColorFromID

func DOMRGBColorFromID(id objc.ID) DOMRGBColor

DOMRGBColorFromID constructs a DOMRGBColor from an objc.ID.

func NewDOMRGBColor

func NewDOMRGBColor() DOMRGBColor

NewDOMRGBColor creates a new DOMRGBColor instance.

func (DOMRGBColor) Autorelease

func (d DOMRGBColor) Autorelease() DOMRGBColor

Autorelease adds the receiver to the current autorelease pool.

func (DOMRGBColor) Init

func (d DOMRGBColor) Init() DOMRGBColor

Init initializes the instance.

type DOMRGBColorClass

type DOMRGBColorClass struct {
	// contains filtered or unexported fields
}

func GetDOMRGBColorClass

func GetDOMRGBColorClass() DOMRGBColorClass

GetDOMRGBColorClass returns the class object for DOMRGBColor.

func (DOMRGBColorClass) Alloc

func (dc DOMRGBColorClass) Alloc() DOMRGBColor

Alloc allocates memory for a new instance of the class.

func (DOMRGBColorClass) Class

func (dc DOMRGBColorClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMRange

type DOMRange struct {
	DOMObject
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMRange

func DOMRangeFromID

func DOMRangeFromID(id objc.ID) DOMRange

DOMRangeFromID constructs a DOMRange from an objc.ID.

func NewDOMRange

func NewDOMRange() DOMRange

NewDOMRange creates a new DOMRange instance.

func (DOMRange) Autorelease

func (d DOMRange) Autorelease() DOMRange

Autorelease adds the receiver to the current autorelease pool.

func (DOMRange) Init

func (d DOMRange) Init() DOMRange

Init initializes the instance.

func (DOMRange) MarkupString

func (d DOMRange) MarkupString() string

A string in markup format corresponding to the content in the range.

See: https://developer.apple.com/documentation/WebKit/DOMRange/markupString

func (DOMRange) WebArchive

func (d DOMRange) WebArchive() IWebArchive

A web archive of the content in the range.

Discussion

Falls within the specified DOM range.

See: https://developer.apple.com/documentation/WebKit/DOMRange/webArchive

type DOMRangeClass

type DOMRangeClass struct {
	// contains filtered or unexported fields
}

func GetDOMRangeClass

func GetDOMRangeClass() DOMRangeClass

GetDOMRangeClass returns the class object for DOMRange.

func (DOMRangeClass) Alloc

func (dc DOMRangeClass) Alloc() DOMRange

Alloc allocates memory for a new instance of the class.

func (DOMRangeClass) Class

func (dc DOMRangeClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMRangeExceptionCode deprecated

type DOMRangeExceptionCode uint32

Deprecated: Deprecated since macOS 10.14. See: https://developer.apple.com/documentation/WebKit/DOMRangeExceptionCode

const (
	DOM_BAD_BOUNDARYPOINTS_ERR DOMRangeExceptionCode = 1
	DOM_INVALID_NODE_TYPE_ERR  DOMRangeExceptionCode = 2
)

func (DOMRangeExceptionCode) String

func (e DOMRangeExceptionCode) String() string

type DOMRect

type DOMRect struct {
	DOMObject
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMRect

func DOMRectFromID

func DOMRectFromID(id objc.ID) DOMRect

DOMRectFromID constructs a DOMRect from an objc.ID.

func NewDOMRect

func NewDOMRect() DOMRect

NewDOMRect creates a new DOMRect instance.

func (DOMRect) Autorelease

func (d DOMRect) Autorelease() DOMRect

Autorelease adds the receiver to the current autorelease pool.

func (DOMRect) Init

func (d DOMRect) Init() DOMRect

Init initializes the instance.

type DOMRectClass

type DOMRectClass struct {
	// contains filtered or unexported fields
}

func GetDOMRectClass

func GetDOMRectClass() DOMRectClass

GetDOMRectClass returns the class object for DOMRect.

func (DOMRectClass) Alloc

func (dc DOMRectClass) Alloc() DOMRect

Alloc allocates memory for a new instance of the class.

func (DOMRectClass) Class

func (dc DOMRectClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMStyleSheet

type DOMStyleSheet struct {
	DOMObject
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMStyleSheet

func DOMStyleSheetFromID

func DOMStyleSheetFromID(id objc.ID) DOMStyleSheet

DOMStyleSheetFromID constructs a DOMStyleSheet from an objc.ID.

func NewDOMStyleSheet

func NewDOMStyleSheet() DOMStyleSheet

NewDOMStyleSheet creates a new DOMStyleSheet instance.

func (DOMStyleSheet) Autorelease

func (d DOMStyleSheet) Autorelease() DOMStyleSheet

Autorelease adds the receiver to the current autorelease pool.

func (DOMStyleSheet) Init

func (d DOMStyleSheet) Init() DOMStyleSheet

Init initializes the instance.

func (DOMStyleSheet) SetDisabled

func (d DOMStyleSheet) SetDisabled(value bool)

type DOMStyleSheetClass

type DOMStyleSheetClass struct {
	// contains filtered or unexported fields
}

func GetDOMStyleSheetClass

func GetDOMStyleSheetClass() DOMStyleSheetClass

GetDOMStyleSheetClass returns the class object for DOMStyleSheet.

func (DOMStyleSheetClass) Alloc

func (dc DOMStyleSheetClass) Alloc() DOMStyleSheet

Alloc allocates memory for a new instance of the class.

func (DOMStyleSheetClass) Class

func (dc DOMStyleSheetClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMStyleSheetList

type DOMStyleSheetList struct {
	DOMObject
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMStyleSheetList

func DOMStyleSheetListFromID

func DOMStyleSheetListFromID(id objc.ID) DOMStyleSheetList

DOMStyleSheetListFromID constructs a DOMStyleSheetList from an objc.ID.

func NewDOMStyleSheetList

func NewDOMStyleSheetList() DOMStyleSheetList

NewDOMStyleSheetList creates a new DOMStyleSheetList instance.

func (DOMStyleSheetList) Autorelease

func (d DOMStyleSheetList) Autorelease() DOMStyleSheetList

Autorelease adds the receiver to the current autorelease pool.

func (DOMStyleSheetList) Init

Init initializes the instance.

type DOMStyleSheetListClass

type DOMStyleSheetListClass struct {
	// contains filtered or unexported fields
}

func GetDOMStyleSheetListClass

func GetDOMStyleSheetListClass() DOMStyleSheetListClass

GetDOMStyleSheetListClass returns the class object for DOMStyleSheetList.

func (DOMStyleSheetListClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMStyleSheetListClass) Class

func (dc DOMStyleSheetListClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMText

type DOMText struct {
	DOMCharacterData
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMText

func DOMTextFromID

func DOMTextFromID(id objc.ID) DOMText

DOMTextFromID constructs a DOMText from an objc.ID.

func NewDOMText

func NewDOMText() DOMText

NewDOMText creates a new DOMText instance.

func (DOMText) Autorelease

func (d DOMText) Autorelease() DOMText

Autorelease adds the receiver to the current autorelease pool.

func (DOMText) Init

func (d DOMText) Init() DOMText

Init initializes the instance.

type DOMTextClass

type DOMTextClass struct {
	// contains filtered or unexported fields
}

func GetDOMTextClass

func GetDOMTextClass() DOMTextClass

GetDOMTextClass returns the class object for DOMText.

func (DOMTextClass) Alloc

func (dc DOMTextClass) Alloc() DOMText

Alloc allocates memory for a new instance of the class.

func (DOMTextClass) Class

func (dc DOMTextClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMTreeWalker

type DOMTreeWalker struct {
	DOMObject
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMTreeWalker

func DOMTreeWalkerFromID

func DOMTreeWalkerFromID(id objc.ID) DOMTreeWalker

DOMTreeWalkerFromID constructs a DOMTreeWalker from an objc.ID.

func NewDOMTreeWalker

func NewDOMTreeWalker() DOMTreeWalker

NewDOMTreeWalker creates a new DOMTreeWalker instance.

func (DOMTreeWalker) Autorelease

func (d DOMTreeWalker) Autorelease() DOMTreeWalker

Autorelease adds the receiver to the current autorelease pool.

func (DOMTreeWalker) Init

func (d DOMTreeWalker) Init() DOMTreeWalker

Init initializes the instance.

func (DOMTreeWalker) SetCurrentNode

func (d DOMTreeWalker) SetCurrentNode(value IDOMNode)

type DOMTreeWalkerClass

type DOMTreeWalkerClass struct {
	// contains filtered or unexported fields
}

func GetDOMTreeWalkerClass

func GetDOMTreeWalkerClass() DOMTreeWalkerClass

GetDOMTreeWalkerClass returns the class object for DOMTreeWalker.

func (DOMTreeWalkerClass) Alloc

func (dc DOMTreeWalkerClass) Alloc() DOMTreeWalker

Alloc allocates memory for a new instance of the class.

func (DOMTreeWalkerClass) Class

func (dc DOMTreeWalkerClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMUIEvent

type DOMUIEvent struct {
	DOMEvent
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMUIEvent

func DOMUIEventFromID

func DOMUIEventFromID(id objc.ID) DOMUIEvent

DOMUIEventFromID constructs a DOMUIEvent from an objc.ID.

func NewDOMUIEvent

func NewDOMUIEvent() DOMUIEvent

NewDOMUIEvent creates a new DOMUIEvent instance.

func (DOMUIEvent) Autorelease

func (d DOMUIEvent) Autorelease() DOMUIEvent

Autorelease adds the receiver to the current autorelease pool.

func (DOMUIEvent) Init

func (d DOMUIEvent) Init() DOMUIEvent

Init initializes the instance.

type DOMUIEventClass

type DOMUIEventClass struct {
	// contains filtered or unexported fields
}

func GetDOMUIEventClass

func GetDOMUIEventClass() DOMUIEventClass

GetDOMUIEventClass returns the class object for DOMUIEvent.

func (DOMUIEventClass) Alloc

func (dc DOMUIEventClass) Alloc() DOMUIEvent

Alloc allocates memory for a new instance of the class.

func (DOMUIEventClass) Class

func (dc DOMUIEventClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMWheelEvent

type DOMWheelEvent struct {
	DOMMouseEvent
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMWheelEvent

func DOMWheelEventFromID

func DOMWheelEventFromID(id objc.ID) DOMWheelEvent

DOMWheelEventFromID constructs a DOMWheelEvent from an objc.ID.

func NewDOMWheelEvent

func NewDOMWheelEvent() DOMWheelEvent

NewDOMWheelEvent creates a new DOMWheelEvent instance.

func (DOMWheelEvent) Autorelease

func (d DOMWheelEvent) Autorelease() DOMWheelEvent

Autorelease adds the receiver to the current autorelease pool.

func (DOMWheelEvent) Init

func (d DOMWheelEvent) Init() DOMWheelEvent

Init initializes the instance.

type DOMWheelEventClass

type DOMWheelEventClass struct {
	// contains filtered or unexported fields
}

func GetDOMWheelEventClass

func GetDOMWheelEventClass() DOMWheelEventClass

GetDOMWheelEventClass returns the class object for DOMWheelEvent.

func (DOMWheelEventClass) Alloc

func (dc DOMWheelEventClass) Alloc() DOMWheelEvent

Alloc allocates memory for a new instance of the class.

func (DOMWheelEventClass) Class

func (dc DOMWheelEventClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMXPathExceptionCode deprecated

type DOMXPathExceptionCode uint32

Deprecated: Deprecated since macOS 10.14. See: https://developer.apple.com/documentation/WebKit/DOMXPathExceptionCode

const (
	DOM_INVALID_EXPRESSION_ERR DOMXPathExceptionCode = 51
	DOM_TYPE_ERR               DOMXPathExceptionCode = 52
)

func (DOMXPathExceptionCode) String

func (e DOMXPathExceptionCode) String() string

type DOMXPathExpression

type DOMXPathExpression struct {
	DOMObject
}

See: https://developer.apple.com/documentation/WebKit/DOMXPathExpression

func DOMXPathExpressionFromID

func DOMXPathExpressionFromID(id objc.ID) DOMXPathExpression

DOMXPathExpressionFromID constructs a DOMXPathExpression from an objc.ID.

func NewDOMXPathExpression

func NewDOMXPathExpression() DOMXPathExpression

NewDOMXPathExpression creates a new DOMXPathExpression instance.

func (DOMXPathExpression) Autorelease

func (d DOMXPathExpression) Autorelease() DOMXPathExpression

Autorelease adds the receiver to the current autorelease pool.

func (DOMXPathExpression) Init

Init initializes the instance.

type DOMXPathExpressionClass

type DOMXPathExpressionClass struct {
	// contains filtered or unexported fields
}

func GetDOMXPathExpressionClass

func GetDOMXPathExpressionClass() DOMXPathExpressionClass

GetDOMXPathExpressionClass returns the class object for DOMXPathExpression.

func (DOMXPathExpressionClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMXPathExpressionClass) Class

func (dc DOMXPathExpressionClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DOMXPathNSResolver

type DOMXPathNSResolver interface {
	objectivec.IObject

	// LookupNamespaceURI protocol.
	//
	// See: https://developer.apple.com/documentation/WebKit/DOMXPathNSResolver/lookupNamespaceURI(_:)
	LookupNamespaceURI(prefix string) string
}

DOMXPathNSResolver protocol.

See: https://developer.apple.com/documentation/WebKit/DOMXPathNSResolver

type DOMXPathNSResolverObject

type DOMXPathNSResolverObject struct {
	objectivec.Object
}

DOMXPathNSResolverObject wraps an existing Objective-C object that conforms to the DOMXPathNSResolver protocol.

func DOMXPathNSResolverObjectFromID

func DOMXPathNSResolverObjectFromID(id objc.ID) DOMXPathNSResolverObject

DOMXPathNSResolverObjectFromID constructs a DOMXPathNSResolverObject from an objc.ID. The object is determined to conform to the protocol at runtime.

func (DOMXPathNSResolverObject) BaseObject

type DOMXPathResult

type DOMXPathResult struct {
	DOMObject
}

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMXPathResult

func DOMXPathResultFromID

func DOMXPathResultFromID(id objc.ID) DOMXPathResult

DOMXPathResultFromID constructs a DOMXPathResult from an objc.ID.

func NewDOMXPathResult

func NewDOMXPathResult() DOMXPathResult

NewDOMXPathResult creates a new DOMXPathResult instance.

func (DOMXPathResult) Autorelease

func (d DOMXPathResult) Autorelease() DOMXPathResult

Autorelease adds the receiver to the current autorelease pool.

func (DOMXPathResult) Init

func (d DOMXPathResult) Init() DOMXPathResult

Init initializes the instance.

type DOMXPathResultClass

type DOMXPathResultClass struct {
	// contains filtered or unexported fields
}

func GetDOMXPathResultClass

func GetDOMXPathResultClass() DOMXPathResultClass

GetDOMXPathResultClass returns the class object for DOMXPathResult.

func (DOMXPathResultClass) Alloc

Alloc allocates memory for a new instance of the class.

func (DOMXPathResultClass) Class

func (dc DOMXPathResultClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DataErrorHandler

type DataErrorHandler = func(*foundation.NSData, error)

DataErrorHandler handles The completion handler to call when the data is ready.

  • pdfDocumentData: A data object that contains the PDF data to use for rendering the contents of the web view.
  • error: An error object if a problem occurred, or `nil` on success.

The error can be type-asserted to *foundation.NSError for Domain, Code, and UserInfo.

Used by:

type DataHandler

type DataHandler = func(*foundation.NSData)

DataHandler handles A closure you provide to capture and store data so that you can resume the download later.

Used by:

type DomAllowKeyboard

type DomAllowKeyboard uint32
const (
	DOM_ALLOW_KEYBOARD_INPUT DomAllowKeyboard = 1
)

func (DomAllowKeyboard) String

func (e DomAllowKeyboard) String() string

type DomAnyType added in v0.6.17

type DomAnyType uint32
const (
	DOM_ANY_TYPE                     DomAnyType = 0
	DOM_ANY_UNORDERED_NODE_TYPE      DomAnyType = 8
	DOM_BOOLEAN_TYPE                 DomAnyType = 3
	DOM_FIRST_ORDERED_NODE_TYPE      DomAnyType = 9
	DOM_NUMBER_TYPE                  DomAnyType = 1
	DOM_ORDERED_NODE_ITERATOR_TYPE   DomAnyType = 5
	DOM_ORDERED_NODE_SNAPSHOT_TYPE   DomAnyType = 7
	DOM_STRING_TYPE                  DomAnyType = 2
	DOM_UNORDERED_NODE_ITERATOR_TYPE DomAnyType = 4
	DOM_UNORDERED_NODE_SNAPSHOT_TYPE DomAnyType = 6
)

func (DomAnyType) String added in v0.6.17

func (e DomAnyType) String() string

type DomCSSInherit added in v0.6.17

type DomCSSInherit uint32
const (
	DOM_CSS_CUSTOM          DomCSSInherit = 3
	DOM_CSS_INHERIT         DomCSSInherit = 0
	DOM_CSS_PRIMITIVE_VALUE DomCSSInherit = 1
	DOM_CSS_VALUE_LIST      DomCSSInherit = 2
)

func (DomCSSInherit) String added in v0.6.17

func (e DomCSSInherit) String() string

type DomCSSUnknown added in v0.6.17

type DomCSSUnknown uint32
const (
	DOM_CSS_ATTR       DomCSSUnknown = 22
	DOM_CSS_CM         DomCSSUnknown = 6
	DOM_CSS_COUNTER    DomCSSUnknown = 23
	DOM_CSS_DEG        DomCSSUnknown = 11
	DOM_CSS_DIMENSION  DomCSSUnknown = 18
	DOM_CSS_EMS        DomCSSUnknown = 3
	DOM_CSS_EXS        DomCSSUnknown = 4
	DOM_CSS_GRAD       DomCSSUnknown = 13
	DOM_CSS_HZ         DomCSSUnknown = 16
	DOM_CSS_IDENT      DomCSSUnknown = 21
	DOM_CSS_IN         DomCSSUnknown = 8
	DOM_CSS_KHZ        DomCSSUnknown = 17
	DOM_CSS_MM         DomCSSUnknown = 7
	DOM_CSS_MS         DomCSSUnknown = 14
	DOM_CSS_NUMBER     DomCSSUnknown = 1
	DOM_CSS_PC         DomCSSUnknown = 10
	DOM_CSS_PERCENTAGE DomCSSUnknown = 2
	DOM_CSS_PT         DomCSSUnknown = 9
	DOM_CSS_PX         DomCSSUnknown = 5
	DOM_CSS_RAD        DomCSSUnknown = 12
	DOM_CSS_RECT       DomCSSUnknown = 24
	DOM_CSS_RGBCOLOR   DomCSSUnknown = 25
	DOM_CSS_S          DomCSSUnknown = 15
	DOM_CSS_STRING     DomCSSUnknown = 19
	DOM_CSS_UNKNOWN    DomCSSUnknown = 0
	DOM_CSS_URI        DomCSSUnknown = 20
	DOM_CSS_VH         DomCSSUnknown = 27
	DOM_CSS_VMAX       DomCSSUnknown = 29
	DOM_CSS_VMIN       DomCSSUnknown = 28
	DOM_CSS_VW         DomCSSUnknown = 26
)

func (DomCSSUnknown) String added in v0.6.17

func (e DomCSSUnknown) String() string

type DomDomDelta

type DomDomDelta uint32
const (
	DOM_DOM_DELTA_LINE  DomDomDelta = 0x1
	DOM_DOM_DELTA_PAGE  DomDomDelta = 0x2
	DOM_DOM_DELTA_PIXEL DomDomDelta = 0
)

func (DomDomDelta) String

func (e DomDomDelta) String() string

type DomElementNode added in v0.6.17

type DomElementNode uint32
const (
	DOM_ATTRIBUTE_NODE                            DomElementNode = 2
	DOM_CDATA_SECTION_NODE                        DomElementNode = 4
	DOM_COMMENT_NODE                              DomElementNode = 8
	DOM_DOCUMENT_FRAGMENT_NODE                    DomElementNode = 11
	DOM_DOCUMENT_NODE                             DomElementNode = 9
	DOM_DOCUMENT_POSITION_CONTAINED_BY            DomElementNode = 0x10
	DOM_DOCUMENT_POSITION_CONTAINS                DomElementNode = 0x8
	DOM_DOCUMENT_POSITION_DISCONNECTED            DomElementNode = 0x1
	DOM_DOCUMENT_POSITION_FOLLOWING               DomElementNode = 0x4
	DOM_DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC DomElementNode = 0x20
	DOM_DOCUMENT_POSITION_PRECEDING               DomElementNode = 0x2
	DOM_DOCUMENT_TYPE_NODE                        DomElementNode = 10
	DOM_ELEMENT_NODE                              DomElementNode = 1
	DOM_ENTITY_NODE                               DomElementNode = 6
	DOM_ENTITY_REFERENCE_NODE                     DomElementNode = 5
	DOM_NOTATION_NODE                             DomElementNode = 12
	DOM_PROCESSING_INSTRUCTION_NODE               DomElementNode = 7
	DOM_TEXT_NODE                                 DomElementNode = 3
)

func (DomElementNode) String added in v0.6.17

func (e DomElementNode) String() string

type DomFilterAccept added in v0.6.17

type DomFilterAccept uint32
const (
	DOM_FILTER_ACCEPT               DomFilterAccept = 1
	DOM_FILTER_REJECT               DomFilterAccept = 2
	DOM_FILTER_SKIP                 DomFilterAccept = 3
	DOM_SHOW_ALL                    DomFilterAccept = 0xffffffff
	DOM_SHOW_ATTRIBUTE              DomFilterAccept = 0x2
	DOM_SHOW_CDATA_SECTION          DomFilterAccept = 0x8
	DOM_SHOW_COMMENT                DomFilterAccept = 0x80
	DOM_SHOW_DOCUMENT               DomFilterAccept = 0x100
	DOM_SHOW_DOCUMENT_FRAGMENT      DomFilterAccept = 0x400
	DOM_SHOW_DOCUMENT_TYPE          DomFilterAccept = 0x200
	DOM_SHOW_ELEMENT                DomFilterAccept = 0x1
	DOM_SHOW_ENTITY                 DomFilterAccept = 0x20
	DOM_SHOW_ENTITY_REFERENCE       DomFilterAccept = 0x10
	DOM_SHOW_NOTATION               DomFilterAccept = 0x800
	DOM_SHOW_PROCESSING_INSTRUCTION DomFilterAccept = 0x40
	DOM_SHOW_TEXT                   DomFilterAccept = 0x4
)

func (DomFilterAccept) String added in v0.6.17

func (e DomFilterAccept) String() string

type DomHorizontal added in v0.6.17

type DomHorizontal uint32
const (
	DOM_BOTH       DomHorizontal = 2
	DOM_HORIZONTAL DomHorizontal = 0
	DOM_VERTICAL   DomHorizontal = 1
)

func (DomHorizontal) String added in v0.6.17

func (e DomHorizontal) String() string

type DomKeyLocation

type DomKeyLocation uint32
const (
	DOM_KEY_LOCATION_LEFT     DomKeyLocation = 0x1
	DOM_KEY_LOCATION_NUMPAD   DomKeyLocation = 0x3
	DOM_KEY_LOCATION_RIGHT    DomKeyLocation = 0x2
	DOM_KEY_LOCATION_STANDARD DomKeyLocation = 0
)

func (DomKeyLocation) String

func (e DomKeyLocation) String() string

type DomModification added in v0.6.17

type DomModification uint32
const (
	DOM_ADDITION     DomModification = 2
	DOM_MODIFICATION DomModification = 1
	DOM_REMOVAL      DomModification = 3
)

func (DomModification) String added in v0.6.17

func (e DomModification) String() string

type DomNone added in v0.6.17

type DomNone uint32
const (
	DOM_AT_TARGET       DomNone = 2
	DOM_BUBBLING_PHASE  DomNone = 3
	DOM_CAPTURING_PHASE DomNone = 1
	DOM_NONE            DomNone = 0
)

func (DomNone) String added in v0.6.17

func (e DomNone) String() string

type DomStartToStart added in v0.6.17

type DomStartToStart uint32
const (
	DOM_END_TO_END            DomStartToStart = 2
	DOM_END_TO_START          DomStartToStart = 3
	DOM_NODE_AFTER            DomStartToStart = 1
	DOM_NODE_BEFORE           DomStartToStart = 0
	DOM_NODE_BEFORE_AND_AFTER DomStartToStart = 2
	DOM_NODE_INSIDE           DomStartToStart = 3
	DOM_START_TO_END          DomStartToStart = 1
	DOM_START_TO_START        DomStartToStart = 0
)

func (DomStartToStart) String added in v0.6.17

func (e DomStartToStart) String() string

type DomUnknownRule added in v0.6.17

type DomUnknownRule uint32
const (
	DOM_CHARSET_RULE          DomUnknownRule = 2
	DOM_FONT_FACE_RULE        DomUnknownRule = 5
	DOM_IMPORT_RULE           DomUnknownRule = 3
	DOM_KEYFRAMES_RULE        DomUnknownRule = 7
	DOM_KEYFRAME_RULE         DomUnknownRule = 8
	DOM_MEDIA_RULE            DomUnknownRule = 4
	DOM_NAMESPACE_RULE        DomUnknownRule = 10
	DOM_PAGE_RULE             DomUnknownRule = 6
	DOM_STYLE_RULE            DomUnknownRule = 1
	DOM_SUPPORTS_RULE         DomUnknownRule = 12
	DOM_UNKNOWN_RULE          DomUnknownRule = 0
	DOM_WEBKIT_KEYFRAMES_RULE DomUnknownRule = 7
	DOM_WEBKIT_KEYFRAME_RULE  DomUnknownRule = 8
	DOM_WEBKIT_REGION_RULE    DomUnknownRule = 16
)

func (DomUnknownRule) String added in v0.6.17

func (e DomUnknownRule) String() string

type ErrorHandler

type ErrorHandler = func(error)

ErrorHandler handles A completion handler block to call after the removal of the content rule list.

  • error: `nil` on success, or an error object if the store encountered an error when deleting the rule list.

The error can be type-asserted to *foundation.NSError for Domain, Code, and UserInfo.

Used by:

  • WKContentRuleListStore.RemoveContentRuleListForIdentifierCompletionHandler
  • WKWebExtensionContext.LoadBackgroundContentWithCompletionHandler
  • [WKWebExtensionControllerDelegate.WebExtensionControllerConnectUsingMessagePortForExtensionContextCompletionHandler]
  • [WKWebExtensionControllerDelegate.WebExtensionControllerOpenOptionsPageForExtensionContextCompletionHandler]
  • [WKWebExtensionControllerDelegate.WebExtensionControllerPresentPopupForActionForExtensionContextCompletionHandler]
  • WKWebExtensionMessagePort.SendMessageCompletionHandler
  • [WKWebExtensionTab.ActivateForWebExtensionContextCompletionHandler]
  • [WKWebExtensionTab.CloseForWebExtensionContextCompletionHandler]
  • [WKWebExtensionTab.GoBackForWebExtensionContextCompletionHandler]
  • [WKWebExtensionTab.GoForwardForWebExtensionContextCompletionHandler]
  • [WKWebExtensionTab.LoadURLForWebExtensionContextCompletionHandler]
  • [WKWebExtensionTab.ReloadFromOriginForWebExtensionContextCompletionHandler]
  • [WKWebExtensionTab.SetMutedForWebExtensionContextCompletionHandler]
  • [WKWebExtensionTab.SetParentTabForWebExtensionContextCompletionHandler]
  • [WKWebExtensionTab.SetPinnedForWebExtensionContextCompletionHandler]
  • [WKWebExtensionTab.SetReaderModeActiveForWebExtensionContextCompletionHandler]
  • [WKWebExtensionTab.SetSelectedForWebExtensionContextCompletionHandler]
  • [WKWebExtensionTab.SetZoomFactorForWebExtensionContextCompletionHandler]
  • [WKWebExtensionWindow.CloseForWebExtensionContextCompletionHandler]
  • [WKWebExtensionWindow.FocusForWebExtensionContextCompletionHandler]
  • [WKWebExtensionWindow.SetFrameForWebExtensionContextCompletionHandler]
  • [WKWebExtensionWindow.SetWindowStateForWebExtensionContextCompletionHandler]
  • WKWebView.RestoreDataCompletionHandler
  • [WKWebsiteDataStore.RemoveDataStoreForIdentifierCompletionHandler]
  • WKWebsiteDataStore.RestoreDataCompletionHandler

type IDOMAbstractView

type IDOMAbstractView interface {
	IDOMObject

	Document() IDOMDocument
}

An interface definition for the DOMAbstractView class.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMAbstractView

type IDOMAttr

type IDOMAttr interface {
	IDOMNode

	Name() string
	OwnerElement() IDOMElement
	Specified() bool
	Style() IDOMCSSStyleDeclaration
	Value() string
	SetValue(value string)
}

An interface definition for the DOMAttr class.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMAttr

type IDOMBlob

type IDOMBlob interface {
	IDOMObject

	Size() uint64
}

An interface definition for the DOMBlob class.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMBlob

type IDOMCDATASection

type IDOMCDATASection interface {
	IDOMText
}

An interface definition for the DOMCDATASection class.

See: https://developer.apple.com/documentation/WebKit/DOMCDATASection

type IDOMCSSCharsetRule

type IDOMCSSCharsetRule interface {
	IDOMCSSRule

	Encoding() string
}

An interface definition for the DOMCSSCharsetRule class.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMCSSCharsetRule

type IDOMCSSFontFaceRule

type IDOMCSSFontFaceRule interface {
	IDOMCSSRule

	Style() IDOMCSSStyleDeclaration
}

An interface definition for the DOMCSSFontFaceRule class.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMCSSFontFaceRule

type IDOMCSSMediaRule

type IDOMCSSMediaRule interface {
	IDOMCSSRule

	CssRules() IDOMCSSRuleList
	Media() IDOMMediaList
}

An interface definition for the DOMCSSMediaRule class.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMCSSMediaRule

type IDOMCSSPageRule

type IDOMCSSPageRule interface {
	IDOMCSSRule

	SelectorText() string
	SetSelectorText(value string)
	Style() IDOMCSSStyleDeclaration
}

An interface definition for the DOMCSSPageRule class.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMCSSPageRule

type IDOMCSSPrimitiveValue

type IDOMCSSPrimitiveValue interface {
	IDOMCSSValue

	PrimitiveType() uint16
}

An interface definition for the DOMCSSPrimitiveValue class.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMCSSPrimitiveValue

type IDOMCSSRule

type IDOMCSSRule interface {
	IDOMObject

	CssText() string
	SetCssText(value string)
	ParentRule() IDOMCSSRule
	ParentStyleSheet() IDOMCSSStyleSheet
	Type() uint16
}

An interface definition for the DOMCSSRule class.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMCSSRule

type IDOMCSSRuleList

type IDOMCSSRuleList interface {
	IDOMObject

	Length() uint32
}

An interface definition for the DOMCSSRuleList class.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMCSSRuleList

type IDOMCSSStyleDeclaration

type IDOMCSSStyleDeclaration interface {
	IDOMObject

	CssText() string
	SetCssText(value string)
	Length() uint32
	ParentRule() IDOMCSSRule

	Azimuth() string
	Background() string
	BackgroundAttachment() string
	BackgroundColor() string
	BackgroundImage() string
	BackgroundPosition() string
	BackgroundRepeat() string
	Border() string
	BorderBottom() string
	BorderBottomColor() string
	BorderBottomStyle() string
	BorderBottomWidth() string
	BorderCollapse() string
	BorderColor() string
	BorderLeft() string
	BorderLeftColor() string
	BorderLeftStyle() string
	BorderLeftWidth() string
	BorderRight() string
	BorderRightColor() string
	BorderRightStyle() string
	BorderRightWidth() string
	BorderSpacing() string
	BorderStyle() string
	BorderTop() string
	BorderTopColor() string
	BorderTopStyle() string
	BorderTopWidth() string
	BorderWidth() string
	Bottom() string
	CaptionSide() string
	Clear() string
	Clip() string
	Color() string
	Content() string
	CounterIncrement() string
	CounterReset() string
	CssFloat() string
	Cue() string
	CueAfter() string
	CueBefore() string
	Cursor() string
	Direction() string
	Display() string
	Elevation() string
	EmptyCells() string
	Font() string
	FontFamily() string
	FontSize() string
	FontSizeAdjust() string
	FontStretch() string
	FontStyle() string
	FontVariant() string
	FontWeight() string
	Height() string
	Left() string
	LetterSpacing() string
	LineHeight() string
	ListStyle() string
	ListStyleImage() string
	ListStylePosition() string
	ListStyleType() string
	Margin() string
	MarginBottom() string
	MarginLeft() string
	MarginRight() string
	MarginTop() string
	MarkerOffset() string
	Marks() string
	MaxHeight() string
	MaxWidth() string
	MinHeight() string
	MinWidth() string
	Orphans() string
	Outline() string
	OutlineColor() string
	OutlineStyle() string
	OutlineWidth() string
	Overflow() string
	Padding() string
	PaddingBottom() string
	PaddingLeft() string
	PaddingRight() string
	PaddingTop() string
	Page() string
	PageBreakAfter() string
	PageBreakBefore() string
	PageBreakInside() string
	Pause() string
	PauseAfter() string
	PauseBefore() string
	Pitch() string
	PitchRange() string
	PlayDuring() string
	Position() string
	Quotes() string
	Richness() string
	Right() string
	SetAzimuth(azimuth string)
	SetBackground(background string)
	SetBackgroundAttachment(backgroundAttachment string)
	SetBackgroundColor(backgroundColor string)
	SetBackgroundImage(backgroundImage string)
	SetBackgroundPosition(backgroundPosition string)
	SetBackgroundRepeat(backgroundRepeat string)
	SetBorder(border string)
	SetBorderBottom(borderBottom string)
	SetBorderBottomColor(borderBottomColor string)
	SetBorderBottomStyle(borderBottomStyle string)
	SetBorderBottomWidth(borderBottomWidth string)
	SetBorderCollapse(borderCollapse string)
	SetBorderColor(borderColor string)
	SetBorderLeft(borderLeft string)
	SetBorderLeftColor(borderLeftColor string)
	SetBorderLeftStyle(borderLeftStyle string)
	SetBorderLeftWidth(borderLeftWidth string)
	SetBorderRight(borderRight string)
	SetBorderRightColor(borderRightColor string)
	SetBorderRightStyle(borderRightStyle string)
	SetBorderRightWidth(borderRightWidth string)
	SetBorderSpacing(borderSpacing string)
	SetBorderStyle(borderStyle string)
	SetBorderTop(borderTop string)
	SetBorderTopColor(borderTopColor string)
	SetBorderTopStyle(borderTopStyle string)
	SetBorderTopWidth(borderTopWidth string)
	SetBorderWidth(borderWidth string)
	SetBottom(bottom string)
	SetCaptionSide(captionSide string)
	SetClear(clear string)
	SetClip(clip string)
	SetColor(color string)
	SetContent(content string)
	SetCounterIncrement(counterIncrement string)
	SetCounterReset(counterReset string)
	SetCssFloat(cssFloat string)
	SetCue(cue string)
	SetCueAfter(cueAfter string)
	SetCueBefore(cueBefore string)
	SetCursor(cursor string)
	SetDirection(direction string)
	SetDisplay(display string)
	SetElevation(elevation string)
	SetEmptyCells(emptyCells string)
	SetFont(font string)
	SetFontFamily(fontFamily string)
	SetFontSize(fontSize string)
	SetFontSizeAdjust(fontSizeAdjust string)
	SetFontStretch(fontStretch string)
	SetFontStyle(fontStyle string)
	SetFontVariant(fontVariant string)
	SetFontWeight(fontWeight string)
	SetHeight(height string)
	SetLeft(left string)
	SetLetterSpacing(letterSpacing string)
	SetLineHeight(lineHeight string)
	SetListStyle(listStyle string)
	SetListStyleImage(listStyleImage string)
	SetListStylePosition(listStylePosition string)
	SetListStyleType(listStyleType string)
	SetMargin(margin string)
	SetMarginBottom(marginBottom string)
	SetMarginLeft(marginLeft string)
	SetMarginRight(marginRight string)
	SetMarginTop(marginTop string)
	SetMarkerOffset(markerOffset string)
	SetMarks(marks string)
	SetMaxHeight(maxHeight string)
	SetMaxWidth(maxWidth string)
	SetMinHeight(minHeight string)
	SetMinWidth(minWidth string)
	SetOrphans(orphans string)
	SetOutline(outline string)
	SetOutlineColor(outlineColor string)
	SetOutlineStyle(outlineStyle string)
	SetOutlineWidth(outlineWidth string)
	SetOverflow(overflow string)
	SetPadding(padding string)
	SetPaddingBottom(paddingBottom string)
	SetPaddingLeft(paddingLeft string)
	SetPaddingRight(paddingRight string)
	SetPaddingTop(paddingTop string)
	SetPage(page string)
	SetPageBreakAfter(pageBreakAfter string)
	SetPageBreakBefore(pageBreakBefore string)
	SetPageBreakInside(pageBreakInside string)
	SetPause(pause string)
	SetPauseAfter(pauseAfter string)
	SetPauseBefore(pauseBefore string)
	SetPitch(pitch string)
	SetPitchRange(pitchRange string)
	SetPlayDuring(playDuring string)
	SetPosition(position string)
	SetQuotes(quotes string)
	SetRichness(richness string)
	SetRight(right string)
	SetSize(size string)
	SetSpeak(speak string)
	SetSpeakHeader(speakHeader string)
	SetSpeakNumeral(speakNumeral string)
	SetSpeakPunctuation(speakPunctuation string)
	SetSpeechRate(speechRate string)
	SetStress(stress string)
	SetTableLayout(tableLayout string)
	SetTextAlign(textAlign string)
	SetTextDecoration(textDecoration string)
	SetTextIndent(textIndent string)
	SetTextShadow(textShadow string)
	SetTextTransform(textTransform string)
	SetTop(top string)
	SetUnicodeBidi(unicodeBidi string)
	SetVerticalAlign(verticalAlign string)
	SetVisibility(visibility string)
	SetVoiceFamily(voiceFamily string)
	SetVolume(volume string)
	SetWhiteSpace(whiteSpace string)
	SetWidows(widows string)
	SetWidth(width string)
	SetWordSpacing(wordSpacing string)
	SetZIndex(zIndex string)
	Size() string
	Speak() string
	SpeakHeader() string
	SpeakNumeral() string
	SpeakPunctuation() string
	SpeechRate() string
	Stress() string
	TableLayout() string
	TextAlign() string
	TextDecoration() string
	TextIndent() string
	TextShadow() string
	TextTransform() string
	Top() string
	UnicodeBidi() string
	VerticalAlign() string
	Visibility() string
	VoiceFamily() string
	Volume() string
	WhiteSpace() string
	Widows() string
	Width() string
	WordSpacing() string
	ZIndex() string
}

An interface definition for the DOMCSSStyleDeclaration class.

Instance Properties

Instance Methods

See: https://developer.apple.com/documentation/WebKit/DOMCSSStyleDeclaration

type IDOMCSSStyleRule

type IDOMCSSStyleRule interface {
	IDOMCSSRule

	SelectorText() string
	SetSelectorText(value string)
	Style() IDOMCSSStyleDeclaration
}

An interface definition for the DOMCSSStyleRule class.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMCSSStyleRule

type IDOMCSSUnknownRule

type IDOMCSSUnknownRule interface {
	IDOMCSSRule
}

An interface definition for the DOMCSSUnknownRule class.

See: https://developer.apple.com/documentation/WebKit/DOMCSSUnknownRule

type IDOMCSSValue

type IDOMCSSValue interface {
	IDOMObject

	CssText() string
	SetCssText(value string)
	CssValueType() uint16
}

An interface definition for the DOMCSSValue class.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMCSSValue

type IDOMCSSValueList

type IDOMCSSValueList interface {
	IDOMCSSValue

	Length() uint32
}

An interface definition for the DOMCSSValueList class.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMCSSValueList

type IDOMCharacterData

type IDOMCharacterData interface {
	IDOMNode

	Data() string
	SetData(value string)
	Length() uint32
}

An interface definition for the DOMCharacterData class.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMCharacterData

type IDOMComment

type IDOMComment interface {
	IDOMCharacterData
}

An interface definition for the DOMComment class.

See: https://developer.apple.com/documentation/WebKit/DOMComment

type IDOMCounter

type IDOMCounter interface {
	IDOMObject

	Identifier() string
	ListStyle() string
	Separator() string
}

An interface definition for the DOMCounter class.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMCounter

type IDOMDocument

type IDOMDocument interface {
	IDOMNode

	ActiveElement() IDOMElement
	Anchors() IDOMHTMLCollection
	Applets() IDOMHTMLCollection
	Body() IDOMHTMLElement
	SetBody(value IDOMHTMLElement)
	CharacterSet() string
	Charset() string
	SetCharset(value string)
	Cookie() string
	SetCookie(value string)
	DefaultCharset() string
	DefaultView() IDOMAbstractView
	Doctype() IDOMDocumentType
	DocumentElement() IDOMElement
	DocumentURI() string
	SetDocumentURI(value string)
	Domain() string
	Forms() IDOMHTMLCollection
	Images() IDOMHTMLCollection
	Implementation() IDOMImplementation
	InputEncoding() string
	LastModified() string
	Links() IDOMHTMLCollection
	PreferredStylesheetSet() string
	ReadyState() string
	Referrer() string
	SelectedStylesheetSet() string
	SetSelectedStylesheetSet(value string)
	StyleSheets() IDOMStyleSheetList
	Title() string
	SetTitle(value string)
	URL() string
	// The web frame associated with the DOM document.
	WebFrame() IWebFrame
	XmlEncoding() string
	XmlStandalone() bool
	SetXmlStandalone(value bool)
	XmlVersion() string
	SetXmlVersion(value string)

	// Constructs a URL given an attribute string.
	URLWithAttributeString(string_ string) foundation.NSURL
}

An interface definition for the DOMDocument class.

Instance Properties

Instance Methods

See: https://developer.apple.com/documentation/WebKit/DOMDocument

type IDOMDocumentFragment

type IDOMDocumentFragment interface {
	IDOMNode
}

An interface definition for the DOMDocumentFragment class.

See: https://developer.apple.com/documentation/WebKit/DOMDocumentFragment

type IDOMElement

type IDOMElement interface {
	IDOMNode

	ChildElementCount() uint32
	ClassName() string
	SetClassName(value string)
	ClientHeight() int32
	ClientLeft() int32
	ClientTop() int32
	ClientWidth() int32
	FirstElementChild() IDOMElement
	InnerHTML() string
	SetInnerHTML(value string)
	InnerText() string
	LastElementChild() IDOMElement
	NextElementSibling() IDOMElement
	OffsetHeight() int32
	OffsetLeft() int32
	OffsetParent() IDOMElement
	OffsetTop() int32
	OffsetWidth() int32
	OuterHTML() string
	SetOuterHTML(value string)
	PreviousElementSibling() IDOMElement
	ScrollHeight() int32
	ScrollLeft() int32
	SetScrollLeft(value int32)
	ScrollTop() int32
	SetScrollTop(value int32)
	ScrollWidth() int32
	Style() IDOMCSSStyleDeclaration
	TagName() string

	// Returns an image associated with the receiver.
	Image() appkit.NSImage
}

An interface definition for the DOMElement class.

Instance Properties

Instance Methods

See: https://developer.apple.com/documentation/WebKit/DOMElement

type IDOMEntity

type IDOMEntity interface {
	IDOMNode

	NotationName() string
	PublicId() string
	SystemId() string
}

An interface definition for the DOMEntity class.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMEntity

type IDOMEntityReference

type IDOMEntityReference interface {
	IDOMNode
}

An interface definition for the DOMEntityReference class.

See: https://developer.apple.com/documentation/WebKit/DOMEntityReference

type IDOMEvent

type IDOMEvent interface {
	IDOMObject

	Bubbles() bool
	CancelBubble() bool
	SetCancelBubble(value bool)
	Cancelable() bool
	CurrentTarget() DOMEventTarget
	EventPhase() uint16
	ReturnValue() bool
	SetReturnValue(value bool)
	SrcElement() DOMEventTarget
	Target() DOMEventTarget
	TimeStamp() DOMTimeStamp
	Type() string
}

An interface definition for the DOMEvent class.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMEvent

type IDOMFile

type IDOMFile interface {
	IDOMBlob

	Name() string
}

An interface definition for the DOMFile class.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMFile

type IDOMFileList

type IDOMFileList interface {
	IDOMObject

	Length() uint32
}

An interface definition for the DOMFileList class.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMFileList

type IDOMHTMLAnchorElement

type IDOMHTMLAnchorElement interface {
	IDOMHTMLElement

	AbsoluteLinkURL() foundation.NSURL
	Charset() string
	SetCharset(value string)
	Coords() string
	SetCoords(value string)
	HashName() string
	Host() string
	Hostname() string
	Href() string
	SetHref(value string)
	Hreflang() string
	SetHreflang(value string)
	Name() string
	SetName(value string)
	Pathname() string
	Port() string
	Protocol() string
	Rel() string
	SetRel(value string)
	Rev() string
	SetRev(value string)
	Search() string
	Shape() string
	SetShape(value string)
	Target() string
	SetTarget(value string)
	Text() string
	Type() string
	SetType(value string)
}

An interface definition for the DOMHTMLAnchorElement class.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLAnchorElement

type IDOMHTMLBRElement

type IDOMHTMLBRElement interface {
	IDOMHTMLElement

	Clear() string
	SetClear(value string)
}

An interface definition for the DOMHTMLBRElement class.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLBRElement

type IDOMHTMLCollection

type IDOMHTMLCollection interface {
	IDOMObject

	Length() uint32
}

An interface definition for the DOMHTMLCollection class.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLCollection

type IDOMHTMLDListElement

type IDOMHTMLDListElement interface {
	IDOMHTMLElement

	Compact() bool
	SetCompact(value bool)
}

An interface definition for the DOMHTMLDListElement class.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLDListElement

type IDOMHTMLDivElement

type IDOMHTMLDivElement interface {
	IDOMHTMLElement

	Align() string
	SetAlign(value string)
}

An interface definition for the DOMHTMLDivElement class.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLDivElement

type IDOMHTMLDocument

type IDOMHTMLDocument interface {
	IDOMDocument

	AlinkColor() string
	SetAlinkColor(value string)
	BgColor() string
	SetBgColor(value string)
	CompatMode() string
	DesignMode() string
	SetDesignMode(value string)
	Dir() string
	SetDir(value string)
	Embeds() IDOMHTMLCollection
	FgColor() string
	SetFgColor(value string)
	Height() int32
	LinkColor() string
	SetLinkColor(value string)
	Plugins() IDOMHTMLCollection
	Scripts() IDOMHTMLCollection
	VlinkColor() string
	SetVlinkColor(value string)
	Width() int32

	// Creates a document fragment containing the given HTML markup.
	CreateDocumentFragmentWithMarkupStringBaseURL(markupString string, baseURL foundation.NSURL) IDOMDocumentFragment
	// Creates a document fragment containing the given text.
	CreateDocumentFragmentWithText(text string) IDOMDocumentFragment
}

An interface definition for the DOMHTMLDocument class.

Instance Properties

Instance Methods

See: https://developer.apple.com/documentation/WebKit/DOMHTMLDocument

type IDOMHTMLFrameElement

type IDOMHTMLFrameElement interface {
	IDOMHTMLElement

	ContentDocument() IDOMDocument
	// The content frame of the element.
	ContentFrame() IWebFrame
	ContentWindow() IDOMAbstractView
	FrameBorder() string
	SetFrameBorder(value string)
	Height() int32
	Location() string
	SetLocation(value string)
	LongDesc() string
	SetLongDesc(value string)
	MarginHeight() string
	SetMarginHeight(value string)
	MarginWidth() string
	SetMarginWidth(value string)
	Name() string
	SetName(value string)
	NoResize() bool
	SetNoResize(value bool)
	Scrolling() string
	SetScrolling(value string)
	Src() string
	SetSrc(value string)
	Width() int32
}

An interface definition for the DOMHTMLFrameElement class.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLFrameElement

type IDOMHTMLHeadElement

type IDOMHTMLHeadElement interface {
	IDOMHTMLElement

	Profile() string
	SetProfile(value string)
}

An interface definition for the DOMHTMLHeadElement class.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLHeadElement

type IDOMHTMLHtmlElement

type IDOMHTMLHtmlElement interface {
	IDOMHTMLElement

	Version() string
	SetVersion(value string)
}

An interface definition for the DOMHTMLHtmlElement class.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLHtmlElement

type IDOMHTMLIFrameElement

type IDOMHTMLIFrameElement interface {
	IDOMHTMLElement

	Align() string
	SetAlign(value string)
	ContentDocument() IDOMDocument
	// The content frame of the element.
	ContentFrame() IWebFrame
	ContentWindow() IDOMAbstractView
	FrameBorder() string
	SetFrameBorder(value string)
	Height() string
	SetHeight(value string)
	LongDesc() string
	SetLongDesc(value string)
	MarginHeight() string
	SetMarginHeight(value string)
	MarginWidth() string
	SetMarginWidth(value string)
	Name() string
	SetName(value string)
	Scrolling() string
	SetScrolling(value string)
	Src() string
	SetSrc(value string)
	Width() string
	SetWidth(value string)
}

An interface definition for the DOMHTMLIFrameElement class.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLIFrameElement

type IDOMHTMLImageElement

type IDOMHTMLImageElement interface {
	IDOMHTMLElement

	AbsoluteImageURL() foundation.NSURL
	Align() string
	SetAlign(value string)
	Alt() string
	SetAlt(value string)
	AltDisplayString() string
	Border() string
	SetBorder(value string)
	Complete() bool
	Height() int32
	SetHeight(value int32)
	Hspace() int32
	SetHspace(value int32)
	IsMap() bool
	SetIsMap(value bool)
	LongDesc() string
	SetLongDesc(value string)
	Lowsrc() string
	SetLowsrc(value string)
	Name() string
	SetName(value string)
	NaturalHeight() int32
	NaturalWidth() int32
	Src() string
	SetSrc(value string)
	UseMap() string
	SetUseMap(value string)
	Vspace() int32
	SetVspace(value int32)
	Width() int32
	SetWidth(value int32)
	X() int32
	Y() int32
}

An interface definition for the DOMHTMLImageElement class.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLImageElement

type IDOMHTMLInputElement

type IDOMHTMLInputElement interface {
	IDOMHTMLElement

	AbsoluteImageURL() foundation.NSURL
	Accept() string
	SetAccept(value string)
	Align() string
	SetAlign(value string)
	Alt() string
	SetAlt(value string)
	AltDisplayString() string
	Autofocus() bool
	SetAutofocus(value bool)
	Checked() bool
	SetChecked(value bool)
	DefaultChecked() bool
	SetDefaultChecked(value bool)
	DefaultValue() string
	SetDefaultValue(value string)
	Disabled() bool
	SetDisabled(value bool)
	Files() IDOMFileList
	SetFiles(value IDOMFileList)
	Form() IDOMHTMLFormElement
	Indeterminate() bool
	SetIndeterminate(value bool)
	MaxLength() int32
	SetMaxLength(value int32)
	Multiple() bool
	SetMultiple(value bool)
	Name() string
	SetName(value string)
	ReadOnly() bool
	SetReadOnly(value bool)
	SelectionEnd() int32
	SetSelectionEnd(value int32)
	SelectionStart() int32
	SetSelectionStart(value int32)
	Size() string
	SetSize(value string)
	Src() string
	SetSrc(value string)
	Type() string
	SetType(value string)
	UseMap() string
	SetUseMap(value string)
	Value() string
	SetValue(value string)
	WillValidate() bool
}

An interface definition for the DOMHTMLInputElement class.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLInputElement

type IDOMHTMLMarqueeElement

type IDOMHTMLMarqueeElement interface {
	IDOMHTMLElement
}

An interface definition for the DOMHTMLMarqueeElement class.

See: https://developer.apple.com/documentation/WebKit/DOMHTMLMarqueeElement

type IDOMHTMLMenuElement

type IDOMHTMLMenuElement interface {
	IDOMHTMLElement

	Compact() bool
	SetCompact(value bool)
}

An interface definition for the DOMHTMLMenuElement class.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLMenuElement

type IDOMHTMLObjectElement

type IDOMHTMLObjectElement interface {
	IDOMHTMLElement

	AbsoluteImageURL() foundation.NSURL
	Align() string
	SetAlign(value string)
	Archive() string
	SetArchive(value string)
	Border() string
	SetBorder(value string)
	Code() string
	SetCode(value string)
	CodeBase() string
	SetCodeBase(value string)
	CodeType() string
	SetCodeType(value string)
	ContentDocument() IDOMDocument
	// The content frame of the element.
	ContentFrame() IWebFrame
	Data() string
	SetData(value string)
	Declare() bool
	SetDeclare(value bool)
	Form() IDOMHTMLFormElement
	Height() string
	SetHeight(value string)
	Hspace() int32
	SetHspace(value int32)
	Name() string
	SetName(value string)
	Standby() string
	SetStandby(value string)
	Type() string
	SetType(value string)
	UseMap() string
	SetUseMap(value string)
	Vspace() int32
	SetVspace(value int32)
	Width() string
	SetWidth(value string)
}

An interface definition for the DOMHTMLObjectElement class.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLObjectElement

type IDOMHTMLQuoteElement

type IDOMHTMLQuoteElement interface {
	IDOMHTMLElement

	Cite() string
	SetCite(value string)
}

An interface definition for the DOMHTMLQuoteElement class.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLQuoteElement

type IDOMHTMLTableCellElement

type IDOMHTMLTableCellElement interface {
	IDOMHTMLElement

	Abbr() string
	SetAbbr(value string)
	Align() string
	SetAlign(value string)
	Axis() string
	SetAxis(value string)
	BgColor() string
	SetBgColor(value string)
	CellIndex() int32
	Ch() string
	SetCh(value string)
	ChOff() string
	SetChOff(value string)
	ColSpan() int32
	SetColSpan(value int32)
	Headers() string
	SetHeaders(value string)
	Height() string
	SetHeight(value string)
	NoWrap() bool
	SetNoWrap(value bool)
	RowSpan() int32
	SetRowSpan(value int32)
	Scope() string
	SetScope(value string)
	VAlign() string
	SetVAlign(value string)
	Width() string
	SetWidth(value string)
}

An interface definition for the DOMHTMLTableCellElement class.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLTableCellElement

type IDOMHTMLTableElement

type IDOMHTMLTableElement interface {
	IDOMHTMLElement

	Align() string
	SetAlign(value string)
	BgColor() string
	SetBgColor(value string)
	Border() string
	SetBorder(value string)
	Caption() IDOMHTMLTableCaptionElement
	SetCaption(value IDOMHTMLTableCaptionElement)
	CellPadding() string
	SetCellPadding(value string)
	CellSpacing() string
	SetCellSpacing(value string)
	FrameBorders() string
	SetFrameBorders(value string)
	Rows() IDOMHTMLCollection
	Rules() string
	SetRules(value string)
	Summary() string
	SetSummary(value string)
	TBodies() IDOMHTMLCollection
	TFoot() IDOMHTMLTableSectionElement
	SetTFoot(value IDOMHTMLTableSectionElement)
	THead() IDOMHTMLTableSectionElement
	SetTHead(value IDOMHTMLTableSectionElement)
	Width() string
	SetWidth(value string)
}

An interface definition for the DOMHTMLTableElement class.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLTableElement

type IDOMHTMLTextAreaElement

type IDOMHTMLTextAreaElement interface {
	IDOMHTMLElement

	Autofocus() bool
	SetAutofocus(value bool)
	Cols() int32
	SetCols(value int32)
	DefaultValue() string
	SetDefaultValue(value string)
	Disabled() bool
	SetDisabled(value bool)
	Form() IDOMHTMLFormElement
	Name() string
	SetName(value string)
	ReadOnly() bool
	SetReadOnly(value bool)
	Rows() int32
	SetRows(value int32)
	SelectionEnd() int32
	SetSelectionEnd(value int32)
	SelectionStart() int32
	SetSelectionStart(value int32)
	Type() string
	Value() string
	SetValue(value string)
	WillValidate() bool
}

An interface definition for the DOMHTMLTextAreaElement class.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLTextAreaElement

type IDOMHTMLTitleElement

type IDOMHTMLTitleElement interface {
	IDOMHTMLElement

	Text() string
	SetText(value string)
}

An interface definition for the DOMHTMLTitleElement class.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMHTMLTitleElement

type IDOMImplementation

type IDOMImplementation interface {
	IDOMObject
}

An interface definition for the DOMImplementation class.

See: https://developer.apple.com/documentation/WebKit/DOMImplementation

type IDOMMediaList

type IDOMMediaList interface {
	IDOMObject

	Length() uint32
	MediaText() string
	SetMediaText(value string)
}

An interface definition for the DOMMediaList class.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMMediaList

type IDOMNamedNodeMap

type IDOMNamedNodeMap interface {
	IDOMObject

	Length() uint32
}

An interface definition for the DOMNamedNodeMap class.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMNamedNodeMap

type IDOMNode

type IDOMNode interface {
	IDOMObject

	Attributes() IDOMNamedNodeMap
	BaseURI() string
	ChildNodes() IDOMNodeList
	FirstChild() IDOMNode
	IsContentEditable() bool
	LastChild() IDOMNode
	LocalName() string
	NamespaceURI() string
	NextSibling() IDOMNode
	NodeName() string
	NodeType() uint16
	NodeValue() string
	SetNodeValue(value string)
	OwnerDocument() IDOMDocument
	ParentNode() IDOMNode
	ParentElement() IDOMElement
	Prefix() string
	SetPrefix(value string)
	PreviousSibling() IDOMNode
	TextContent() string
	SetTextContent(value string)
	// A web archive of the content of the node and its children.
	WebArchive() IWebArchive

	// Returns a rectangle that bounds the onscreen rendering of the node.
	BoundingBox() corefoundation.CGRect
	// Returns the rectangles that bound each line of text in the node.
	LineBoxRects() foundation.INSArray
}

An interface definition for the DOMNode class.

Instance Properties

Instance Methods

See: https://developer.apple.com/documentation/WebKit/DOMNode

type IDOMNodeList

type IDOMNodeList interface {
	IDOMObject

	Length() uint32
}

An interface definition for the DOMNodeList class.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMNodeList

type IDOMObject

type IDOMObject interface {
	IWebScriptObject

	Sheet() IDOMStyleSheet
}

An interface definition for the DOMObject class.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMObject

type IDOMOverflowEvent

type IDOMOverflowEvent interface {
	IDOMEvent

	HorizontalOverflow() bool
	Orient() uint16
	VerticalOverflow() bool
}

An interface definition for the DOMOverflowEvent class.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMOverflowEvent

type IDOMProgressEvent

type IDOMProgressEvent interface {
	IDOMEvent

	LengthComputable() bool
	Loaded() uint64
	Total() uint64
}

An interface definition for the DOMProgressEvent class.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMProgressEvent

type IDOMRange

type IDOMRange interface {
	IDOMObject

	Collapsed() bool
	CommonAncestorContainer() IDOMNode
	EndContainer() IDOMNode
	EndOffset() int32
	// A string in markup format corresponding to the content in the range.
	MarkupString() string
	StartContainer() IDOMNode
	StartOffset() int32
	Text() string
	// A web archive of the content in the range.
	WebArchive() IWebArchive
}

An interface definition for the DOMRange class.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMRange

type IDOMStyleSheetList

type IDOMStyleSheetList interface {
	IDOMObject

	Length() uint32
}

An interface definition for the DOMStyleSheetList class.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMStyleSheetList

type IDOMText

type IDOMText interface {
	IDOMCharacterData

	WholeText() string
}

An interface definition for the DOMText class.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMText

type IDOMUIEvent

type IDOMUIEvent interface {
	IDOMEvent

	CharCode() int32
	Detail() int32
	KeyCode() int32
	PageX() int32
	PageY() int32
	View() IDOMAbstractView
	Which() int32

	LayerX() int32
	LayerY() int32
}

An interface definition for the DOMUIEvent class.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMUIEvent

type IDOMWheelEvent

type IDOMWheelEvent interface {
	IDOMMouseEvent

	IsHorizontal() bool
	WheelDelta() int32
	WheelDeltaX() int32
	WheelDeltaY() int32
}

An interface definition for the DOMWheelEvent class.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/DOMWheelEvent

type IDOMXPathExpression

type IDOMXPathExpression interface {
	IDOMObject
}

An interface definition for the DOMXPathExpression class.

See: https://developer.apple.com/documentation/WebKit/DOMXPathExpression

type IObjectStringHandler added in v0.6.16

type IObjectStringHandler = func(objectivec.IObject, string)

IObjectStringHandler handles A reply handler block to execute with the response to send back to the webpage.

Used by:

type IWKBackForwardList

type IWKBackForwardList interface {
	objectivec.IObject

	// The item immediately preceding the current item, if any.
	BackItem() IWKBackForwardListItem
	// The current item.
	CurrentItem() IWKBackForwardListItem
	// The item immediately following the current item, if any.
	ForwardItem() IWKBackForwardListItem

	// Returns the item at the relative offset from the current item.
	ItemAtIndex(index int) IWKBackForwardListItem

	// The array of items that precede the current item.
	BackList() []WKBackForwardListItem
	// The array of items that follow the current item.
	ForwardList() []WKBackForwardListItem
}

An interface definition for the WKBackForwardList class.

Getting the Most Recent Items

Getting Specific Items in the List

Getting Sublists

See: https://developer.apple.com/documentation/WebKit/WKBackForwardList

type IWKBackForwardListItem

type IWKBackForwardListItem interface {
	objectivec.IObject

	// The title of the webpage this item represents.
	Title() string
	// The URL of the webpage this item represents.
	URL() foundation.NSURL

	// The source URL that originally asked the web view to load this page.
	InitialURL() foundation.NSURL
}

An interface definition for the WKBackForwardListItem class.

Getting the Page-Specific Information

Getting the Requesting Page

See: https://developer.apple.com/documentation/WebKit/WKBackForwardListItem

type IWKContentRuleList

type IWKContentRuleList interface {
	objectivec.IObject

	// The identifier for the rule list.
	Identifier() string
}

An interface definition for the WKContentRuleList class.

Getting the Rules List Identifier

See: https://developer.apple.com/documentation/WebKit/WKContentRuleList

type IWKContentRuleListStore

type IWKContentRuleListStore interface {
	objectivec.IObject

	// Compiles the specified JSON content into a new rule list and adds it to the current data store.
	CompileContentRuleListForIdentifierEncodedContentRuleListCompletionHandler(identifier string, encodedContentRuleList string, completionHandler WKContentRuleListErrorHandler)
	// Removes a rule list from the current data store asynchronously.
	RemoveContentRuleListForIdentifierCompletionHandler(identifier string, completionHandler ErrorHandler)

	// Fetches the identifiers for all rule lists in the store asynchronously.
	GetAvailableContentRuleListIdentifiers(completionHandler stringArrayHandler)
	// Searches asynchronously for a specific rule list in the data store.
	LookUpContentRuleListForIdentifierCompletionHandler(identifier string, completionHandler WKContentRuleListErrorHandler)
}

An interface definition for the WKContentRuleListStore class.

Creating and Deleting Content Rule Lists

Accessing the Current Rule Lists

See: https://developer.apple.com/documentation/WebKit/WKContentRuleListStore

type IWKContentWorld

type IWKContentWorld interface {
	objectivec.IObject

	// The name of a custom content world.
	Name() string
}

An interface definition for the WKContentWorld class.

Retrieving a Custom Content World

See: https://developer.apple.com/documentation/WebKit/WKContentWorld

type IWKDownload

type IWKDownload interface {
	objectivec.IObject

	// An object you use to track download progress and handle redirects, authentication challenges, and failures.
	Delegate() WKDownloadDelegate
	SetDelegate(value WKDownloadDelegate)
	// Cancels the download, and optionally captures data so that you can resume the download later.
	Cancel(completionHandler DataHandler)

	// An object that represents the request that initiated the download.
	OriginalRequest() foundation.NSURLRequest
	// The web view where the download initiated.
	WebView() IWKWebView

	IsUserInitiated() bool
	OriginatingFrame() IWKFrameInfo
}

An interface definition for the WKDownload class.

Managing the download

Inspecting the download

Instance Properties

See: https://developer.apple.com/documentation/WebKit/WKDownload

type IWKFindConfiguration

type IWKFindConfiguration interface {
	objectivec.IObject

	// A Boolean value that indicates the search direction, relative to the current selection.
	Backwards() bool
	SetBackwards(value bool)
	// A Boolean value that indicates whether to consider case when matching the search string.
	CaseSensitive() bool
	SetCaseSensitive(value bool)
	// A Boolean value that indicates whether the search wraps around to the other side of the page.
	Wraps() bool
	SetWraps(value bool)
}

An interface definition for the WKFindConfiguration class.

Configuring the Search Parameters

See: https://developer.apple.com/documentation/WebKit/WKFindConfiguration

type IWKFindResult

type IWKFindResult interface {
	objectivec.IObject

	// A Boolean value that indicates whether the web view found a match during the search.
	MatchFound() bool
}

An interface definition for the WKFindResult class.

Getting the Search Result

See: https://developer.apple.com/documentation/WebKit/WKFindResult

type IWKFrameInfo

type IWKFrameInfo interface {
	objectivec.IObject

	// A Boolean value indicating whether the frame is the web site’s main frame or a subframe.
	IsMainFrame() bool
	// The frame’s current request.
	Request() foundation.NSURLRequest
	// The frame’s security origin.
	SecurityOrigin() IWKSecurityOrigin
	// The web view that contains this frame and the containing webpage.
	WebView() IWKWebView
}

An interface definition for the WKFrameInfo class.

Inspecting frame information

See: https://developer.apple.com/documentation/WebKit/WKFrameInfo

type IWKHTTPCookieStore

type IWKHTTPCookieStore interface {
	objectivec.IObject

	// Fetches all stored cookies asynchronously and delivers them to the specified completion handler.
	GetAllCookies(completionHandler NSHTTPCookieArrayHandler)
	// Adds a cookie to the cookie store.
	SetCookieCompletionHandler(cookie foundation.NSHTTPCookie, completionHandler VoidHandler)
	// Deletes the specified cookie.
	DeleteCookieCompletionHandler(cookie foundation.NSHTTPCookie, completionHandler VoidHandler)

	// Returns a cookie policy that indicates whether the cookie store allows cookie storage.
	GetCookiePolicy(completionHandler WKCookiePolicyHandler)
	// Sets a cookie policy that indicates whether the cookie store allows cookie storage.
	SetCookiePolicyCompletionHandler(policy WKCookiePolicy, completionHandler VoidHandler)

	// Adds an observer to the cookie store.
	AddObserver(observer WKHTTPCookieStoreObserver)
	// Removes an observer from the cookie store.
	RemoveObserver(observer WKHTTPCookieStoreObserver)

	SetCookiesCompletionHandler(cookies []foundation.NSHTTPCookie, completionHandler VoidHandler)
}

An interface definition for the WKHTTPCookieStore class.

Managing cookies

Instance Methods

See: https://developer.apple.com/documentation/WebKit/WKHTTPCookieStore

type IWKNavigation

type IWKNavigation interface {
	objectivec.IObject

	// The content mode WebKit uses to load the webpage.
	EffectiveContentMode() WKContentMode
}

An interface definition for the WKNavigation class.

Getting the Content Mode

See: https://developer.apple.com/documentation/WebKit/WKNavigation

type IWKNavigationAction

type IWKNavigationAction interface {
	objectivec.IObject

	// The type of action that triggered the navigation.
	NavigationType() WKNavigationType

	// The URL request object associated with the navigation action.
	Request() foundation.NSURLRequest
	// The frame that requested the navigation.
	SourceFrame() IWKFrameInfo
	// The frame in which to display the new content.
	TargetFrame() IWKFrameInfo
	// A Boolean value that indicates whether the web content provided an attribute that indicates a download.
	ShouldPerformDownload() bool

	// The number of the mouse button that caused the navigation request.
	ButtonNumber() int
	// The modifier keys that were pressed at the time of the navigation request.
	ModifierFlags() appkit.NSEventModifierFlags

	IsContentRuleListRedirect() bool
}

An interface definition for the WKNavigationAction class.

Getting the navigation type

Inspecting navigation information

Inspecting user actions

Instance Properties

See: https://developer.apple.com/documentation/WebKit/WKNavigationAction

type IWKNavigationResponse

type IWKNavigationResponse interface {
	objectivec.IObject

	// The frame’s response.
	Response() foundation.URLResponse

	// A Boolean value that indicates whether WebKit is capable of displaying the response’s MIME type natively.
	CanShowMIMEType() bool
	// A Boolean value that indicates whether the response targets the web view’s main frame.
	IsForMainFrame() bool
}

An interface definition for the WKNavigationResponse class.

Getting the Response Details

Getting Additional Response Information

See: https://developer.apple.com/documentation/WebKit/WKNavigationResponse

type IWKOpenPanelParameters

type IWKOpenPanelParameters interface {
	objectivec.IObject

	// A Boolean value that indicates whether the file upload control supports multiple files.
	AllowsMultipleSelection() bool
	// A Boolean value that indicates whether the file upload control supports the selection of directories.
	AllowsDirectories() bool
}

An interface definition for the WKOpenPanelParameters class.

Configuring the panel parameters

See: https://developer.apple.com/documentation/WebKit/WKOpenPanelParameters

type IWKPDFConfiguration

type IWKPDFConfiguration interface {
	objectivec.IObject

	// The portion of your web view to capture, specified as a rectangle in the view’s coordinate system.
	Rect() corefoundation.CGRect
	SetRect(value corefoundation.CGRect)

	// A Boolean value that indicates whether the PDF may have a transparent background.
	AllowTransparentBackground() bool
	SetAllowTransparentBackground(value bool)
}

An interface definition for the WKPDFConfiguration class.

Specifying the snapshot dimensions

Specifying snapshot properties

See: https://developer.apple.com/documentation/WebKit/WKPDFConfiguration

type IWKPreferences

type IWKPreferences interface {
	objectivec.IObject

	// The minimum font size, in points.
	MinimumFontSize() float64
	SetMinimumFontSize(value float64)
	// A Boolean value that indicates whether to include any background color or graphics when printing content.
	ShouldPrintBackgrounds() bool
	SetShouldPrintBackgrounds(value bool)

	// A Boolean value that indicates whether pressing the tab key changes the focus to links and form controls.
	TabFocusesLinks() bool
	SetTabFocusesLinks(value bool)
	// A Boolean value that indicates whether to allow people to select or otherwise interact with text.
	IsTextInteractionEnabled() bool
	SetTextInteractionEnabled(value bool)
	// A Boolean value that indicates whether a web view can display content full screen.
	IsElementFullscreenEnabled() bool
	SetElementFullscreenEnabled(value bool)
	// A policy you set to specify how a web view that’s not in a window handles tasks.
	InactiveSchedulingPolicy() WKInactiveSchedulingPolicy
	SetInactiveSchedulingPolicy(value WKInactiveSchedulingPolicy)

	// A Boolean value that indicates whether JavaScript can open windows without user interaction.
	JavaScriptCanOpenWindowsAutomatically() bool
	SetJavaScriptCanOpenWindowsAutomatically(value bool)
	// A Boolean that indicates whether to apply site-specific compatibility workarounds.
	IsSiteSpecificQuirksModeEnabled() bool
	SetSiteSpecificQuirksModeEnabled(value bool)

	// A Boolean value that indicates whether the web view shows warnings for suspected fraudulent content, such as malware or phishing attemps.
	IsFraudulentWebsiteWarningEnabled() bool
	SetFraudulentWebsiteWarningEnabled(value bool)

	// A Boolean value that indicates whether Java is enabled.
	JavaEnabled() bool
	SetJavaEnabled(value bool)
	// A Boolean value that indicates whether JavaScript is enabled.
	JavaScriptEnabled() bool
	SetJavaScriptEnabled(value bool)
	// A Boolean value that indicates whether plug-ins are enabled.
	PlugInsEnabled() bool
	SetPlugInsEnabled(value bool)

	InitWithCoder(coder foundation.INSCoder) WKPreferences
	EncodeWithCoder(coder foundation.INSCoder)
}

An interface definition for the WKPreferences class.

Setting Rendering Preferences

Setting Behavior Preferences

Setting Java and JavaScript Preferences

Setting Fraud Warning Preferences

Deprecated

See: https://developer.apple.com/documentation/WebKit/WKPreferences

type IWKProcessPool

type IWKProcessPool interface {
	objectivec.IObject

	EncodeWithCoder(coder foundation.INSCoder)
}

An interface definition for the WKProcessPool class.

See: https://developer.apple.com/documentation/WebKit/WKProcessPool

type IWKScriptMessage

type IWKScriptMessage interface {
	objectivec.IObject

	// The body of the message.
	Body() objectivec.IObject

	// The frame that sent the message.
	FrameInfo() IWKFrameInfo
	// The web view that sent the message.
	WebView() IWKWebView
	// The namespace in which the JavaScript code executes.
	World() IWKContentWorld

	// The name of the message handler to which the message is sent.
	Name() string
}

An interface definition for the WKScriptMessage class.

Getting the Message Contents

Getting the Message Handler’s Name

See: https://developer.apple.com/documentation/WebKit/WKScriptMessage

type IWKSecurityOrigin

type IWKSecurityOrigin interface {
	objectivec.IObject

	// The security origin’s host.
	Host() string
	// The security origin’s port.
	Port() int

	// The security origin’s protocol.
	Protocol() string
}

An interface definition for the WKSecurityOrigin class.

Getting the Host Information

Getting the Host Protocol

See: https://developer.apple.com/documentation/WebKit/WKSecurityOrigin

type IWKSnapshotConfiguration

type IWKSnapshotConfiguration interface {
	objectivec.IObject

	// The portion of your web view to capture, specified as a rectangle in the view’s coordinate system.
	Rect() corefoundation.CGRect
	SetRect(value corefoundation.CGRect)
	// The width of the captured image, in points.
	SnapshotWidth() foundation.NSNumber
	SetSnapshotWidth(value foundation.NSNumber)

	// A Boolean value that indicates whether to take the snapshot after incorporating any pending screen updates.
	AfterScreenUpdates() bool
	SetAfterScreenUpdates(value bool)
}

An interface definition for the WKSnapshotConfiguration class.

Specifying the snapshot dimensions

Configuring the capture behavior

See: https://developer.apple.com/documentation/WebKit/WKSnapshotConfiguration

type IWKUserContentController

type IWKUserContentController interface {
	objectivec.IObject

	// Injects the specified script into the webpage’s content.
	AddUserScript(userScript IWKUserScript)
	// Removes all user scripts from the web view.
	RemoveAllUserScripts()
	// The user scripts associated with the user content controller.
	UserScripts() []WKUserScript

	// Installs a message handler that you can call from your JavaScript code.
	AddScriptMessageHandlerName(scriptMessageHandler WKScriptMessageHandler, name string)
	// Installs a message handler that you can call from the specified content world in your JavaScript code.
	AddScriptMessageHandlerContentWorldName(scriptMessageHandler WKScriptMessageHandler, world IWKContentWorld, name string)
	// Installs a message handler that returns a reply to your JavaScript code.
	AddScriptMessageHandlerWithReplyContentWorldName(scriptMessageHandlerWithReply WKScriptMessageHandlerWithReply, contentWorld IWKContentWorld, name string)
	// Uninstalls the custom message handler with the specified name from your JavaScript code.
	RemoveScriptMessageHandlerForName(name string)
	// Uninstalls a custom message handler from the specified content world in your JavaScript code.
	RemoveScriptMessageHandlerForNameContentWorld(name string, contentWorld IWKContentWorld)
	// Uninstalls all custom message handlers from the specified content world in your JavaScript code.
	RemoveAllScriptMessageHandlersFromContentWorld(contentWorld IWKContentWorld)
	// Uninstalls all custom message handlers associated with the user content controller.
	RemoveAllScriptMessageHandlers()

	// Adds the specified content rule list to the content controller object.
	AddContentRuleList(contentRuleList IWKContentRuleList)
	// Removes the specified rule list from the content controller object.
	RemoveContentRuleList(contentRuleList IWKContentRuleList)
	// Removes all rules lists from the content controller.
	RemoveAllContentRuleLists()

	InitWithCoder(coder foundation.INSCoder) WKUserContentController
	EncodeWithCoder(coder foundation.INSCoder)
}

An interface definition for the WKUserContentController class.

Adding and Removing Custom Scripts

Adding and Removing Message Handlers

Adding and Removing Content Rules

See: https://developer.apple.com/documentation/WebKit/WKUserContentController

type IWKUserScript

type IWKUserScript interface {
	objectivec.IObject

	// Creates a user script object that contains the specified source code and attributes.
	InitWithSourceInjectionTimeForMainFrameOnly(source string, injectionTime WKUserScriptInjectionTime, forMainFrameOnly bool) WKUserScript
	// Creates a user script object that is scoped to a particular content world.
	InitWithSourceInjectionTimeForMainFrameOnlyInContentWorld(source string, injectionTime WKUserScriptInjectionTime, forMainFrameOnly bool, contentWorld IWKContentWorld) WKUserScript

	// The script’s source code.
	Source() string
	// The time at which to inject the script into the webpage.
	InjectionTime() WKUserScriptInjectionTime
	// A Boolean value that indicates whether to inject the script into the main frame or all frames.
	IsForMainFrameOnly() bool
}

An interface definition for the WKUserScript class.

Creating a User Script Object

Inspecting Script Information

See: https://developer.apple.com/documentation/WebKit/WKUserScript

type IWKWebExtension

type IWKWebExtension interface {
	objectivec.IObject

	// The set of websites that the extension requires access to for injected content and for receiving messages from websites.
	AllRequestedMatchPatterns() foundation.INSSet
	// The default locale for the extension.
	DefaultLocale() foundation.NSLocale
	// The default localized extension action label.
	DisplayActionLabel() string
	// The localized extension description.
	DisplayDescription() string
	// The localized extension name.
	DisplayName() string
	// The localized extension short name.
	DisplayShortName() string
	// The localized extension display version.
	DisplayVersion() string
	// An array of all errors that occurred during the processing of the extension.
	Errors() []foundation.NSError
	// A Boolean value indicating whether the extension has background content that can run when needed.
	HasBackgroundContent() bool
	// A Boolean value indicating whether the extension includes commands that users can invoke.
	HasCommands() bool
	// A Boolean value indicating whether the extension includes rules used for content modification or blocking.
	HasContentModificationRules() bool
	// A Boolean value indicating whether the extension has script or stylesheet content that can be injected into webpages.
	HasInjectedContent() bool
	// A Boolean value indicating whether the extension has an options page.
	HasOptionsPage() bool
	// A Boolean value indicating whether the extension provides an alternative to the default new tab page.
	HasOverrideNewTabPage() bool
	// A Boolean value indicating whether the extension has background content that stays in memory as long as the extension is loaded.
	HasPersistentBackgroundContent() bool
	// The parsed manifest as a dictionary.
	Manifest() foundation.INSDictionary
	// The parsed manifest version, or `0` if there is no version specified in the manifest.
	ManifestVersion() float64
	// The set of websites that the extension may need access to for optional functionality.
	OptionalPermissionMatchPatterns() foundation.INSSet
	// The set of permissions that the extension may need for optional functionality.
	OptionalPermissions() foundation.INSSet
	// The set of websites that the extension requires access to for its base functionality.
	RequestedPermissionMatchPatterns() foundation.INSSet
	// The set of permissions that the extension requires for its base functionality.
	RequestedPermissions() foundation.INSSet
	// The extension version.
	Version() string

	// Returns the default action icon for the specified size.
	ActionIconForSize(size corefoundation.CGSize) appkit.NSImage
	// Returns the extension’s icon image for the specified size.
	IconForSize(size corefoundation.CGSize) appkit.NSImage
	// Checks if a manifest version is supported by the extension.
	SupportsManifestVersion(manifestVersion float64) bool
}

An interface definition for the WKWebExtension class.

Instance Properties

Instance Methods

See: https://developer.apple.com/documentation/WebKit/WKWebExtension

type IWKWebExtensionAction

type IWKWebExtensionAction interface {
	objectivec.IObject

	// The tab that this action is associated with, or `nil` if it’s the default action.
	AssociatedTab() WKWebExtensionTab
	// The badge text for the action.
	BadgeText() string
	// A Boolean value indicating whether the badge text is unread.
	HasUnreadBadgeText() bool
	SetHasUnreadBadgeText(value bool)
	// The name shown when inspecting the pop-up web view.
	InspectionName() string
	SetInspectionName(value string)
	// A Boolean value indicating whether the action is enabled.
	IsEnabled() bool
	// The localized display label for the action.
	Label() string
	// The menu items provided by the extension for this action.
	MenuItems() []appkit.NSMenuItem
	// A popover that presents a web view loaded with the pop-up page for this action, or `nil` if no popup is specified.
	PopupPopover() appkit.NSPopover
	// A web view loaded with the pop-up page for this action, or `nil` if no pop-up is specified.
	PopupWebView() IWKWebView
	// A Boolean value indicating whether the action has a pop-up.
	PresentsPopup() bool
	// The extension context to which this action is related.
	WebExtensionContext() IWKWebExtensionContext

	// Triggers the dismissal process of the pop-up.
	ClosePopup()
	// Returns the action icon for the specified size.
	IconForSize(size corefoundation.CGSize) appkit.NSImage
}

An interface definition for the WKWebExtensionAction class.

Instance Properties

Instance Methods

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/Action

type IWKWebExtensionCommand

type IWKWebExtensionCommand interface {
	objectivec.IObject

	// The primary key used to trigger the command, distinct from any modifier flags.
	ActivationKey() string
	SetActivationKey(value string)
	// A unique identifier for the command.
	Identifier() string
	// A menu item representation of the web extension command for use in menus.
	MenuItem() appkit.NSMenuItem
	// The modifier flags used with the activation key to trigger the command.
	ModifierFlags() appkit.NSEventModifierFlags
	SetModifierFlags(value appkit.NSEventModifierFlags)
	// A descriptive title for the command to help discoverability.
	Title() string
	// The web extension context associated with the command.
	WebExtensionContext() IWKWebExtensionContext
}

An interface definition for the WKWebExtensionCommand class.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/Command

type IWKWebExtensionContext

type IWKWebExtensionContext interface {
	objectivec.IObject

	// Returns a web extension context initialized with a specified extension.
	InitForExtension(extension IWKWebExtension) WKWebExtensionContext

	// The base URL the context uses for loading extension resources or injecting content into webpages.
	BaseURL() foundation.NSURL
	SetBaseURL(value foundation.NSURL)
	// The commands associated with the extension.
	Commands() []WKWebExtensionCommand
	// The currently granted permission match patterns that have not expired.
	CurrentPermissionMatchPatterns() foundation.INSSet
	// The currently granted permissions that have not expired.
	CurrentPermissions() foundation.INSSet
	// The currently denied permission match patterns and their expiration dates.
	DeniedPermissionMatchPatterns() foundation.INSDictionary
	SetDeniedPermissionMatchPatterns(value foundation.INSDictionary)
	// The currently denied permissions and their expiration dates.
	DeniedPermissions() foundation.INSDictionary
	SetDeniedPermissions(value foundation.INSDictionary)
	// All errors that occurred in the extension context.
	Errors() []foundation.NSError
	// The window that currently has focus for this extension.
	FocusedWindow() WKWebExtensionWindow
	// The currently granted permission match patterns and their expiration dates.
	GrantedPermissionMatchPatterns() foundation.INSDictionary
	SetGrantedPermissionMatchPatterns(value foundation.INSDictionary)
	// The currently granted permissions and their expiration dates.
	GrantedPermissions() foundation.INSDictionary
	SetGrantedPermissions(value foundation.INSDictionary)
	// A Boolean value indicating if the currently granted permission match patterns set contains the `<all_urls>` pattern or any `*` host patterns.
	HasAccessToAllHosts() bool
	// A Boolean value indicating if the currently granted permission match patterns set contains the `<all_urls>` pattern.
	HasAccessToAllURLs() bool
	// A Boolean value indicating if the extension has access to private data.
	HasAccessToPrivateData() bool
	SetHasAccessToPrivateData(value bool)
	// A boolean value indicating whether the extension includes rules used for content modification or blocking.
	HasContentModificationRules() bool
	// A Boolean value indicating whether the extension has script or stylesheet content that can be injected into webpages.
	HasInjectedContent() bool
	// A Boolean value indicating if the extension has requested optional access to all hosts.
	HasRequestedOptionalAccessToAllHosts() bool
	SetHasRequestedOptionalAccessToAllHosts(value bool)
	// The name shown when inspecting the background web view.
	InspectionName() string
	SetInspectionName(value string)
	// Determines whether Web Inspector can inspect the [WKWebView](<https://developer.apple.com/documentation/WebKit/WKWebView>) instances for this context.
	IsInspectable() bool
	SetInspectable(value bool)
	// A Boolean value indicating if this context is loaded in an extension controller.
	IsLoaded() bool
	// A set of open tabs in all open windows that are exposed to this extension.
	OpenTabs() foundation.INSSet
	// The open windows that are exposed to this extension.
	OpenWindows() []objectivec.IObject
	// The URL of the extension’s options page, if the extension has one.
	OptionsPageURL() foundation.NSURL
	// The URL to use as an alternative to the default new tab page, if the extension has one.
	OverrideNewTabPageURL() foundation.NSURL
	// A unique identifier used to distinguish the extension from other extensions and target it for messages.
	UniqueIdentifier() string
	SetUniqueIdentifier(value string)
	// Specifies unsupported APIs for this extension, making them `undefined` in JavaScript.
	UnsupportedAPIs() foundation.INSSet
	SetUnsupportedAPIs(value foundation.INSSet)
	// The extension this context represents.
	WebExtension() IWKWebExtension
	// The extension controller this context is loaded in, otherwise `nil` if it isn’t loaded.
	WebExtensionController() IWKWebExtensionController
	// The web view configuration to use for web views that load pages from this extension.
	WebViewConfiguration() IWKWebViewConfiguration

	// Retrieves the extension action for a given tab, or the default action if `nil` is passed.
	ActionForTab(tab WKWebExtensionTab) IWKWebExtensionAction
	// Called by the app to clear a user gesture in a specific tab.
	ClearUserGestureInTab(tab WKWebExtensionTab)
	// Retrieves the command associated with the given event without performing it.
	CommandForEvent(event appkit.NSEvent) IWKWebExtensionCommand
	// Called by the app when the properties of a tab are changed to fire appropriate events with only this extension.
	DidChangeTabPropertiesForTab(properties WKWebExtensionTabChangedProperties, changedTab WKWebExtensionTab)
	// Called by the app when a window is closed to fire appropriate events with only this extension.
	DidCloseWindow(closedWindow WKWebExtensionWindow)
	// Called by the app when tabs are deselected to fire appropriate events with only this extension.
	DidDeselectTabs(deselectedTabs []objectivec.IObject)
	// Called by the app when a window gains focus to fire appropriate events with only this extension.
	DidFocusWindow(focusedWindow WKWebExtensionWindow)
	// Called by the app when a new tab is opened to fire appropriate events with only this extension.
	DidOpenTab(newTab WKWebExtensionTab)
	// Called by the app when a new window is opened to fire appropriate events with only this extension.
	DidOpenWindow(newWindow WKWebExtensionWindow)
	// Called by the app when a tab is replaced by another tab to fire appropriate events with only this extension.
	DidReplaceTabWithTab(oldTab WKWebExtensionTab, newTab WKWebExtensionTab)
	// Called by the app when tabs are selected to fire appropriate events with only this extension.
	DidSelectTabs(selectedTabs []objectivec.IObject)
	// Checks the specified URL against the currently granted permission match patterns.
	HasAccessToURL(url foundation.NSURL) bool
	// Checks the specified URL against the currently granted permission match patterns in a specific tab.
	HasAccessToURLInTab(url foundation.NSURL, tab WKWebExtensionTab) bool
	// Indicates if a user gesture is currently active in the specified tab.
	HasActiveUserGestureInTab(tab WKWebExtensionTab) bool
	// Checks if the extension has script or stylesheet content that can be injected into the specified URL.
	HasInjectedContentForURL(url foundation.NSURL) bool
	// Checks the specified permission against the currently granted permissions.
	HasPermission(permission WKWebExtensionPermission) bool
	// Checks the specified permission against the currently granted permissions in a specific tab.
	HasPermissionInTab(permission WKWebExtensionPermission, tab WKWebExtensionTab) bool
	// Loads the background content if needed for the extension.
	LoadBackgroundContentWithCompletionHandler(completionHandler ErrorHandler)
	// Retrieves the menu items for a given tab.
	MenuItemsForTab(tab WKWebExtensionTab) []appkit.NSMenuItem
	// Performs the extension action associated with the specified tab or performs the default action if `nil` is passed.
	PerformActionForTab(tab WKWebExtensionTab)
	// Performs the specified command, triggering events specific to this extension.
	PerformCommand(command IWKWebExtensionCommand)
	// Performs the command associated with the given event.
	PerformCommandForEvent(event appkit.NSEvent) bool
	// Checks the specified permission against the currently denied, granted, and requested permissions.
	PermissionStatusForPermission(permission WKWebExtensionPermission) WKWebExtensionContextPermissionStatus
	// Checks the specified match pattern against the currently denied, granted, and requested permission match patterns.
	PermissionStatusForMatchPattern(pattern IWKWebExtensionMatchPattern) WKWebExtensionContextPermissionStatus
	// Checks the specified URL against the currently denied, granted, and requested permission match patterns.
	PermissionStatusForURL(url foundation.NSURL) WKWebExtensionContextPermissionStatus
	// Checks the specified permission against the currently denied, granted, and requested permissions.
	PermissionStatusForPermissionInTab(permission WKWebExtensionPermission, tab WKWebExtensionTab) WKWebExtensionContextPermissionStatus
	// Checks the specified URL against the currently denied, granted, and requested permission match patterns.
	PermissionStatusForURLInTab(url foundation.NSURL, tab WKWebExtensionTab) WKWebExtensionContextPermissionStatus
	// Checks the specified match pattern against the currently denied, granted, and requested permission match patterns.
	PermissionStatusForMatchPatternInTab(pattern IWKWebExtensionMatchPattern, tab WKWebExtensionTab) WKWebExtensionContextPermissionStatus
	// Sets the status of a permission with a distant future expiration date.
	SetPermissionStatusForPermission(status WKWebExtensionContextPermissionStatus, permission WKWebExtensionPermission)
	// Sets the permission status of a URL with a distant future expiration date.
	SetPermissionStatusForURL(status WKWebExtensionContextPermissionStatus, url foundation.NSURL)
	// Sets the status of a match pattern with a distant future expiration date.
	SetPermissionStatusForMatchPattern(status WKWebExtensionContextPermissionStatus, pattern IWKWebExtensionMatchPattern)
	// Sets the permission status of a URL with a distant future expiration date.
	SetPermissionStatusForURLExpirationDate(status WKWebExtensionContextPermissionStatus, url foundation.NSURL, expirationDate foundation.NSDate)
	// Sets the status of a permission with a specific expiration date.
	SetPermissionStatusForPermissionExpirationDate(status WKWebExtensionContextPermissionStatus, permission WKWebExtensionPermission, expirationDate foundation.NSDate)
	// Sets the status of a match pattern with a specific expiration date.
	SetPermissionStatusForMatchPatternExpirationDate(status WKWebExtensionContextPermissionStatus, pattern IWKWebExtensionMatchPattern, expirationDate foundation.NSDate)
	// Should be called by the app when a user gesture is performed in a specific tab.
	UserGesturePerformedInTab(tab WKWebExtensionTab)

	// Called by the app when a tab is activated to notify only this specific extension.
	DidActivateTabPreviousActiveTab(activatedTab WKWebExtensionTab, previousTab WKWebExtensionTab)
	// Called by the app when a tab is closed to fire appropriate events with only this extension.
	DidCloseTabWindowIsClosing(closedTab WKWebExtensionTab, windowIsClosing bool)
	// Called by the app when a tab is moved to fire appropriate events with only this extension.
	DidMoveTabFromIndexInWindow(movedTab WKWebExtensionTab, index uint, oldWindow WKWebExtensionWindow)
}

An interface definition for the WKWebExtensionContext class.

Initializers

Instance Properties

Instance Methods

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext

type IWKWebExtensionController

type IWKWebExtensionController interface {
	objectivec.IObject

	// Returns a web extension controller initialized with the specified configuration.
	InitWithConfiguration(configuration IWKWebExtensionControllerConfiguration) WKWebExtensionController

	// A copy of the configuration with which the web extension controller was initialized.
	Configuration() IWKWebExtensionControllerConfiguration
	// The extension controller delegate.
	Delegate() WKWebExtensionControllerDelegate
	SetDelegate(value WKWebExtensionControllerDelegate)
	// A set of all the currently loaded extension contexts.
	ExtensionContexts() foundation.INSSet
	// A set of all the currently loaded extensions.
	Extensions() foundation.INSSet

	// Should be called by the app when the properties of a tab are changed to fire appropriate events with all loaded web extensions.
	DidChangeTabPropertiesForTab(properties WKWebExtensionTabChangedProperties, changedTab WKWebExtensionTab)
	// Should be called by the app when a window is closed to fire appropriate events with all loaded web extensions.
	DidCloseWindow(closedWindow WKWebExtensionWindow)
	// Should be called by the app when tabs are deselected to fire appropriate events with all loaded web extensions.
	DidDeselectTabs(deselectedTabs []objectivec.IObject)
	// Should be called by the app when a window gains focus to fire appropriate events with all loaded web extensions.
	DidFocusWindow(focusedWindow WKWebExtensionWindow)
	// Should be called by the app when a new tab is opened to fire appropriate events with all loaded web extensions.
	DidOpenTab(newTab WKWebExtensionTab)
	// Should be called by the app when a new window is opened to fire appropriate events with all loaded web extensions.
	DidOpenWindow(newWindow WKWebExtensionWindow)
	// Should be called by the app when a tab is replaced by another tab to fire appropriate events with all loaded web extensions.
	DidReplaceTabWithTab(oldTab WKWebExtensionTab, newTab WKWebExtensionTab)
	// Should be called by the app when tabs are selected to fire appropriate events with all loaded web extensions.
	DidSelectTabs(selectedTabs []objectivec.IObject)
	// Returns a loaded extension context matching the specified URL.
	ExtensionContextForURL(URL foundation.NSURL) IWKWebExtensionContext
	// Returns a loaded extension context for the specified extension.
	ExtensionContextForExtension(extension IWKWebExtension) IWKWebExtensionContext
	// Fetches a data record containing the given extension data types for a specific known web extension context.
	FetchDataRecordOfTypesForExtensionContextCompletionHandler(dataTypes foundation.INSSet, extensionContext IWKWebExtensionContext, completionHandler WKWebExtensionDataRecordHandler)
	// Fetches data records containing the given extension data types for all known extensions.
	FetchDataRecordsOfTypesCompletionHandler(dataTypes foundation.INSSet, completionHandler WKWebExtensionDataRecordArrayHandler)
	// Loads the specified extension context.
	LoadExtensionContextError(extensionContext IWKWebExtensionContext) (bool, error)
	// Removes extension data of the given types for the given data records.
	RemoveDataOfTypesFromDataRecordsCompletionHandler(dataTypes foundation.INSSet, dataRecords []WKWebExtensionDataRecord, completionHandler VoidHandler)
	// Unloads the specified extension context.
	UnloadExtensionContextError(extensionContext IWKWebExtensionContext) (bool, error)

	// Should be called by the app when a tab is activated to notify all loaded web extensions.
	DidActivateTabPreviousActiveTab(activatedTab WKWebExtensionTab, previousTab WKWebExtensionTab)
	// Should be called by the app when a tab is closed to fire appropriate events with all loaded web extensions.
	DidCloseTabWindowIsClosing(closedTab WKWebExtensionTab, windowIsClosing bool)
	// Should be called by the app when a tab is moved to fire appropriate events with all loaded web extensions.
	DidMoveTabFromIndexInWindow(movedTab WKWebExtensionTab, index uint, oldWindow WKWebExtensionWindow)
}

An interface definition for the WKWebExtensionController class.

Initializers

Instance Properties

Instance Methods

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionController

type IWKWebExtensionControllerConfiguration

type IWKWebExtensionControllerConfiguration interface {
	objectivec.IObject

	// The default data store for website data and cookie access in extension contexts.
	DefaultWebsiteDataStore() IWKWebsiteDataStore
	SetDefaultWebsiteDataStore(value IWKWebsiteDataStore)
	// The unique identifier used for persistent configuration storage, or `nil` when it is the default or not persistent.
	Identifier() foundation.NSUUID
	// A Boolean value indicating if this context will write data to the the file system.
	IsPersistent() bool
	// The web view configuration to be used as a basis for configuring web views in extension contexts.
	WebViewConfiguration() IWKWebViewConfiguration
	SetWebViewConfiguration(value IWKWebViewConfiguration)

	EncodeWithCoder(coder foundation.INSCoder)
}

An interface definition for the WKWebExtensionControllerConfiguration class.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionController/Configuration-swift.class

type IWKWebExtensionDataRecord

type IWKWebExtensionDataRecord interface {
	objectivec.IObject

	// The set of data types contained in this data record.
	ContainedDataTypes() foundation.INSSet
	// The display name for the web extension to which this data record belongs.
	DisplayName() string
	// An array of errors that may have occurred when either calculating or deleting storage.
	Errors() []foundation.NSError
	// The total size in bytes of all data types contained in this data record.
	TotalSizeInBytes() uint
	// Unique identifier for the web extension context to which this data record belongs.
	UniqueIdentifier() string

	// Retrieves the size in bytes of the specific data types in this data record.
	SizeInBytesOfTypes(dataTypes foundation.INSSet) uint
}

An interface definition for the WKWebExtensionDataRecord class.

Instance Properties

Instance Methods

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/DataRecord

type IWKWebExtensionMatchPattern

type IWKWebExtensionMatchPattern interface {
	objectivec.IObject

	// Returns a pattern object for the specified scheme, host, and path strings.
	InitWithSchemeHostPathError(scheme string, host string, path string) (WKWebExtensionMatchPattern, error)
	// Returns a pattern object for the specified pattern string.
	InitWithStringError(string_ string) (WKWebExtensionMatchPattern, error)

	// The host part of the pattern string, unless [matchesAllURLs](<https://developer.apple.com/documentation/WebKit/WKWebExtension/MatchPattern/matchesAllURLs>) is [YES].
	Host() string
	// A Boolean value that indicates if the pattern is `<all_urls>` or has `*` as the host.
	MatchesAllHosts() bool
	// A Boolean value that indicates if the pattern is `<all_urls>`.
	MatchesAllURLs() bool
	// The path part of the pattern string, unless [matchesAllURLs](<https://developer.apple.com/documentation/WebKit/WKWebExtension/MatchPattern/matchesAllURLs>) is [YES].
	Path() string
	// The scheme part of the pattern string, unless [matchesAllURLs](<https://developer.apple.com/documentation/WebKit/WKWebExtension/MatchPattern/matchesAllURLs>) is [YES].
	Scheme() string
	// The original pattern string.
	String() string

	// Matches the receiver pattern against the specified URL.
	MatchesURL(url foundation.NSURL) bool
	// Matches the receiver pattern against the specified pattern.
	MatchesPattern(pattern IWKWebExtensionMatchPattern) bool
	// Matches the receiver pattern against the specified URL with options.
	MatchesURLOptions(url foundation.NSURL, options WKWebExtensionMatchPatternOptions) bool
	// Matches the receiver pattern against the specified pattern with options.
	MatchesPatternOptions(pattern IWKWebExtensionMatchPattern, options WKWebExtensionMatchPatternOptions) bool

	EncodeWithCoder(coder foundation.INSCoder)
}

An interface definition for the WKWebExtensionMatchPattern class.

Initializers

Instance Properties

Instance Methods

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/MatchPattern

type IWKWebExtensionMessagePort

type IWKWebExtensionMessagePort interface {
	objectivec.IObject

	// The unique identifier for the app to which this port should be connected.
	ApplicationIdentifier() string
	// The block to be executed when the port disconnects.
	DisconnectHandler() ErrorHandler
	SetDisconnectHandler(value ErrorHandler)
	// Indicates whether the message port is disconnected.
	IsDisconnected() bool
	// The block to be executed when a message is received from the web extension.
	MessageHandler() ObjectErrorHandler
	SetMessageHandler(value ObjectErrorHandler)

	// Disconnects the port, terminating all further messages.
	Disconnect()
	// Disconnects the port, terminating all further messages with an optional error.
	DisconnectWithError(error_ foundation.NSError)
	// Sends a message to the connected web extension.
	SendMessageCompletionHandler(message objectivec.IObject, completionHandler ErrorHandler)
}

An interface definition for the WKWebExtensionMessagePort class.

Instance Properties

Instance Methods

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/MessagePort

type IWKWebExtensionTabConfiguration

type IWKWebExtensionTabConfiguration interface {
	objectivec.IObject

	// Indicates the parent tab with which the tab should be related.
	ParentTab() WKWebExtensionTab
	// Indicates whether the tab should be added to the current tab selection.
	ShouldAddToSelection() bool
	// Indicates whether the tab should be the active tab.
	ShouldBeActive() bool
	// Indicates whether the tab should be muted.
	ShouldBeMuted() bool
	// Indicates whether the tab should be pinned.
	ShouldBePinned() bool
	// Indicates whether reader mode in the tab should be active.
	ShouldReaderModeBeActive() bool
	// Indicates the initial URL for the tab.
	Url() foundation.NSURL
	// Indicates the window where the tab should be opened.
	Window() WKWebExtensionWindow
}

An interface definition for the WKWebExtensionTabConfiguration class.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/TabConfiguration

type IWKWebExtensionWindowConfiguration

type IWKWebExtensionWindowConfiguration interface {
	objectivec.IObject

	// Indicates the frame where the window should be positioned on the main screen.
	Frame() corefoundation.CGRect
	// Indicates whether the window should be focused.
	ShouldBeFocused() bool
	// Indicates whether the window should be private.
	ShouldBePrivate() bool
	// Indicates the URLs that the window should initially load as tabs.
	TabURLs() []foundation.NSURL
	// Indicates the existing tabs that should be moved to the window.
	Tabs() []objectivec.IObject
	// Indicates the window state for the window.
	WindowState() WKWebExtensionWindowState
	// Indicates the window type for the window.
	WindowType() WKWebExtensionWindowType
}

An interface definition for the WKWebExtensionWindowConfiguration class.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/WindowConfiguration

type IWKWebView

type IWKWebView interface {
	appkit.INSView

	// Creates a web view and initializes it with the specified frame and configuration data.
	InitWithFrameConfiguration(frame corefoundation.CGRect, configuration IWKWebViewConfiguration) WKWebView
	// The object that contains the configuration details for the web view.
	Configuration() IWKWebViewConfiguration

	// The object you use to integrate custom user interface elements, such as contextual menus or panels, into web view interactions.
	UIDelegate() WKUIDelegate
	SetUIDelegate(value WKUIDelegate)

	// The object you use to manage navigation behavior for the web view.
	NavigationDelegate() WKNavigationDelegate
	SetNavigationDelegate(value WKNavigationDelegate)

	// Loads the web content that the specified URL request object references and navigates to that content.
	LoadRequest(request foundation.NSURLRequest) IWKNavigation
	// Loads the content of the specified data object and navigates to it.
	LoadDataMIMETypeCharacterEncodingNameBaseURL(data foundation.NSData, MIMEType string, characterEncodingName string, baseURL foundation.NSURL) IWKNavigation
	// Loads the contents of the specified HTML string and navigates to it.
	LoadHTMLStringBaseURL(string_ string, baseURL foundation.NSURL) IWKNavigation
	// Loads the web content from the file the URL request object specifies and navigates to that content.
	LoadFileRequestAllowingReadAccessToURL(request foundation.NSURLRequest, readAccessURL foundation.NSURL) IWKNavigation
	// Loads the web content from the specified file and navigates to it.
	LoadFileURLAllowingReadAccessToURL(URL foundation.NSURL, readAccessURL foundation.NSURL) IWKNavigation
	// Loads the web content from the data you provide as if the data were the response to the request.
	LoadSimulatedRequestResponseResponseData(request foundation.NSURLRequest, response foundation.NSURLResponse, data foundation.NSData) IWKNavigation
	// Loads the web content from the HTML you provide as if the HTML were the response to the request.
	LoadSimulatedRequestResponseHTMLString(request foundation.NSURLRequest, string_ string) IWKNavigation
	// A Boolean value that indicates whether the view is currently loading content.
	IsLoading() bool
	// An estimate of what fraction of the current navigation has been loaded.
	EstimatedProgress() float64

	// Reloads the current webpage.
	Reload() IWKNavigation
	// Reloads the current webpage.
	ReloadWithSender(sender objectivec.IObject)
	// Reloads the current webpage, and performs end-to-end revalidation of the content using cache-validating conditionals, if possible.
	ReloadFromOrigin() IWKNavigation
	// Reloads the current webpage, and performs end-to-end revalidation of the content using cache-validating conditionals, if possible.
	ReloadFromOriginWithSender(sender objectivec.IObject)
	// Stops loading all resources on the current page.
	StopLoading()
	// Stops loading all resources on the current page.
	StopLoadingWithSender(sender objectivec.IObject)

	// Starts to download the resource at the URL in the request.
	StartDownloadUsingRequestCompletionHandler(request foundation.NSURLRequest, completionHandler WKDownloadHandler)
	// Resumes a failed or canceled download.
	ResumeDownloadFromResumeDataCompletionHandler(resumeData foundation.NSData, completionHandler WKDownloadHandler)

	// A Boolean value that indicates whether you can inspect the view with Safari Web Inspector.
	IsInspectable() bool
	SetInspectable(value bool)

	// The page title.
	Title() string
	// The URL for the current webpage.
	URL() foundation.NSURL
	// The media type for the contents of the web view.
	MediaType() string
	SetMediaType(value string)
	// The custom user agent string.
	CustomUserAgent() string
	SetCustomUserAgent(value string)
	// The trust management object you use to evaluate trust for the current webpage.
	ServerTrust() security.SecTrustRef
	// A Boolean value that indicates whether the web view loaded all resources on the page through securely encrypted connections.
	HasOnlySecureContent() bool
	// The theme color that the system gets from the first valid meta tag in the webpage.
	ThemeColor() appkit.NSColor
	// The color the web view displays behind the active page, visible when the user scrolls beyond the bounds of the page.
	UnderPageBackgroundColor() appkit.NSColor
	SetUnderPageBackgroundColor(value appkit.NSColor)

	// The scale factor by which the web view scales content relative to its bounds.
	PageZoom() float64
	SetPageZoom(value float64)
	// A Boolean value that indicates whether magnify gestures change the web view’s magnification.
	AllowsMagnification() bool
	SetAllowsMagnification(value bool)
	// The factor by which the page content is currently scaled.
	Magnification() float64
	SetMagnification(value float64)
	// Scales the page content and centers the result on the specified point.
	SetMagnificationCenteredAtPoint(magnification float64, point corefoundation.CGPoint)

	// Pauses playback of all media in the web view.
	PauseAllMediaPlaybackWithCompletionHandler(completionHandler VoidHandler)
	// Requests the playback status of media in the web view.
	RequestMediaPlaybackStateWithCompletionHandler(completionHandler WKMediaPlaybackStateHandler)
	// Changes whether the webpage is suspending playback of all media in the page.
	SetAllMediaPlaybackSuspendedCompletionHandler(suspended bool, completionHandler VoidHandler)
	// Closes all media the web view is presenting, including picture-in-picture video and fullscreen video.
	CloseAllMediaPresentationsWithCompletionHandler(completionHandler VoidHandler)

	// An enumeration case that indicates whether the webpage is using the camera to capture images or video.
	CameraCaptureState() WKMediaCaptureState
	// An enumeration case that indicates whether the webpage is using the microphone to capture audio.
	MicrophoneCaptureState() WKMediaCaptureState
	// Changes whether the webpage is using the camera to capture images or video.
	SetCameraCaptureStateCompletionHandler(state WKMediaCaptureState, completionHandler VoidHandler)
	// Changes whether the webpage is using the microphone to capture audio.
	SetMicrophoneCaptureStateCompletionHandler(state WKMediaCaptureState, completionHandler VoidHandler)

	// A Boolean value that indicates whether horizontal swipe gestures trigger backward and forward page navigation.
	AllowsBackForwardNavigationGestures() bool
	SetAllowsBackForwardNavigationGestures(value bool)
	// The web view’s back-forward list.
	BackForwardList() IWKBackForwardList
	// Navigates to the back item in the back-forward list.
	GoBackWithSender(sender objectivec.IObject)
	// Navigates to the back item in the back-forward list.
	GoBack() IWKNavigation
	// Navigates to the forward item in the back-forward list.
	GoForwardWithSender(sender objectivec.IObject)
	// Navigates to the forward item in the back-forward list.
	GoForward() IWKNavigation
	// Navigates to an item from the back-forward list and sets it as the current item.
	GoToBackForwardListItem(item IWKBackForwardListItem) IWKNavigation
	// A Boolean value that indicates whether there is a valid back item in the back-forward list.
	CanGoBack() bool
	// A Boolean value that indicates whether there is a valid forward item in the back-forward list.
	CanGoForward() bool
	// A Boolean value that determines whether pressing a link displays a preview of the destination for the link.
	AllowsLinkPreview() bool
	SetAllowsLinkPreview(value bool)
	// An object you use to capture the current state of interaction in a web view so that you can restore that state later to another web view.
	InteractionState() objectivec.IObject
	SetInteractionState(value objectivec.IObject)

	// Evaluates the specified JavaScript string.
	EvaluateJavaScriptCompletionHandler(javaScriptString string, completionHandler ObjectErrorHandler)

	// Generates a platform-native image from the web view’s contents asynchronously.
	TakeSnapshotWithConfigurationCompletionHandler(snapshotConfiguration IWKSnapshotConfiguration, completionHandler ImageErrorHandler)
	// Returns the print operation object to use when printing the contents of the web view.
	PrintOperationWithPrintInfo(printInfo appkit.NSPrintInfo) appkit.NSPrintOperation

	FullscreenState() WKFullscreenState

	SetMinimumViewportInsetMaximumViewportInset(minimumViewportInset foundation.NSEdgeInsets, maximumViewportInset foundation.NSEdgeInsets)
	MinimumViewportInset() foundation.NSEdgeInsets
	MaximumViewportInset() foundation.NSEdgeInsets

	IsBlockedByScreenTime() bool
	IsWritingToolsActive() bool
	ObscuredContentInsets() foundation.NSEdgeInsets
	SetObscuredContentInsets(value foundation.NSEdgeInsets)

	FetchDataOfTypesCompletionHandler(dataTypes WKWebViewDataType, completionHandler DataErrorHandler)
	RestoreDataCompletionHandler(data foundation.NSData, completionHandler ErrorHandler)

	// An array of objects forming the certificate chain for the currently committed navigation.
	CertificateChain() foundation.INSArray
	// Generates PDF data from the web view’s contents asynchronously.
	CreatePDFWithConfigurationCompletionHandler(pdfConfiguration IWKPDFConfiguration, completionHandler DataErrorHandler)
	// Creates a web archive of the web view’s contents asynchronously.
	CreateWebArchiveDataWithCompletionHandler(completionHandler DataErrorHandler)
	// Searches for the specified string in the web view’s content.
	FindStringWithConfigurationCompletionHandler(string_ string, configuration IWKFindConfiguration, completionHandler WKFindResultHandler)
}

An interface definition for the WKWebView class.

Creating a web view

Displaying native user interface elements

Managing navigation between webpages

Loading web content

Managing the loading process

Managing downloads

Making web content inspectable

Inspecting the view information

Scaling content

Interacting with media

Managing the microphone and camera

Navigating between webpages

Executing JavaScript

Capturing the web view’s content

Handling full-screen transitions

Configuring viewport insets

Instance Properties

Instance Methods

See: https://developer.apple.com/documentation/WebKit/WKWebView

type IWKWebViewConfiguration

type IWKWebViewConfiguration interface {
	objectivec.IObject

	// The object you use to get and set the site’s cookies and to track the cached data objects.
	WebsiteDataStore() IWKWebsiteDataStore
	SetWebsiteDataStore(value IWKWebsiteDataStore)
	// The object that coordinates interactions between your app’s native code and the webpage’s scripts and other content.
	UserContentController() IWKUserContentController
	SetUserContentController(value IWKUserContentController)
	// The object that coordinates the processes the web view uses to render its web content and execute scripts.
	ProcessPool() IWKProcessPool
	SetProcessPool(value IWKProcessPool)
	// The app name that appears in the user agent string.
	ApplicationNameForUserAgent() string
	SetApplicationNameForUserAgent(value string)
	// A Boolean value that indicates whether the web view limits navigation to pages within the app’s domain.
	LimitsNavigationsToAppBoundDomains() bool
	SetLimitsNavigationsToAppBoundDomains(value bool)
	// A Boolean value that indicates whether the web view should automatically upgrade supported HTTP requests to HTTPS.
	UpgradeKnownHostsToHTTPS() bool
	SetUpgradeKnownHostsToHTTPS(value bool)

	// The object that manages the preference-related settings for the web view.
	Preferences() IWKPreferences
	SetPreferences(value IWKPreferences)
	// The default preferences to use when loading and rendering content.
	DefaultWebpagePreferences() IWKWebpagePreferences
	SetDefaultWebpagePreferences(value IWKWebpagePreferences)

	// Registers an object to load resources associated with the specified URL scheme.
	SetURLSchemeHandlerForURLScheme(urlSchemeHandler WKURLSchemeHandler, urlScheme string)
	// Returns the currently registered handler object for the specified URL scheme.
	UrlSchemeHandlerForURLScheme(urlScheme string) WKURLSchemeHandler

	// A Boolean value that indicates whether the web view suppresses content rendering until the content is fully loaded into memory.
	SuppressesIncrementalRendering() bool
	SetSuppressesIncrementalRendering(value bool)

	// A Boolean value that indicates whether the web view allows media playback over AirPlay.
	AllowsAirPlayForMediaPlayback() bool
	SetAllowsAirPlayForMediaPlayback(value bool)
	// The media types that require a user gesture to begin playing.
	MediaTypesRequiringUserActionForPlayback() WKAudiovisualMediaTypes
	SetMediaTypesRequiringUserActionForPlayback(value WKAudiovisualMediaTypes)

	// The directionality of user interface elements.
	UserInterfaceDirectionPolicy() WKUserInterfaceDirectionPolicy
	SetUserInterfaceDirectionPolicy(value WKUserInterfaceDirectionPolicy)

	AllowsInlinePredictions() bool
	SetAllowsInlinePredictions(value bool)
	ShowsSystemScreenTimeBlockingView() bool
	SetShowsSystemScreenTimeBlockingView(value bool)
	SupportsAdaptiveImageGlyph() bool
	SetSupportsAdaptiveImageGlyph(value bool)
	WebExtensionController() IWKWebExtensionController
	SetWebExtensionController(value IWKWebExtensionController)
	WritingToolsBehavior() appkit.NSWritingToolsBehavior
	SetWritingToolsBehavior(value appkit.NSWritingToolsBehavior)

	InitWithCoder(coder foundation.INSCoder) WKWebViewConfiguration
	EncodeWithCoder(coder foundation.INSCoder)
}

An interface definition for the WKWebViewConfiguration class.

Configuring the web view’s behavior

Configuring the web view’s preferences

Adding handlers for custom URL schemes

Configuring the rendering behavior

Setting media playback preferences

Selecting user interface directionality

Instance Properties

See: https://developer.apple.com/documentation/WebKit/WKWebViewConfiguration

type IWKWebpagePreferences

type IWKWebpagePreferences interface {
	objectivec.IObject

	// A Boolean value that indicates whether JavaScript from web content is allowed to run.
	AllowsContentJavaScript() bool
	SetAllowsContentJavaScript(value bool)

	// The content mode for the web view to use when it loads and renders a webpage.
	PreferredContentMode() WKContentMode
	SetPreferredContentMode(value WKContentMode)

	// A Boolean value that indicates whether to use Lockdown Mode in the web view.
	IsLockdownModeEnabled() bool
	SetLockdownModeEnabled(value bool)

	PreferredHTTPSNavigationPolicy() WKWebpagePreferencesUpgradeToHTTPSPolicy
	SetPreferredHTTPSNavigationPolicy(value WKWebpagePreferencesUpgradeToHTTPSPolicy)

	SecurityRestrictionMode() WKSecurityRestrictionMode
	SetSecurityRestrictionMode(value WKSecurityRestrictionMode)
}

An interface definition for the WKWebpagePreferences class.

Setting the JavaScript preferences

Setting the preferred content mode

Getting Lockdown Mode info

Instance Properties

See: https://developer.apple.com/documentation/WebKit/WKWebpagePreferences

type IWKWebsiteDataRecord

type IWKWebsiteDataRecord interface {
	objectivec.IObject

	// The display name for the data record.
	DisplayName() string

	// The types of data associated with the record.
	DataTypes() foundation.INSSet
}

An interface definition for the WKWebsiteDataRecord class.

Getting the Record Information

Getting the Data Type

See: https://developer.apple.com/documentation/WebKit/WKWebsiteDataRecord

type IWKWebsiteDataStore

type IWKWebsiteDataStore interface {
	objectivec.IObject

	// An identifier that uniquely identifies a data store.
	Identifier() foundation.NSUUID
	// A Boolean value that indicates whether this object stores data to disk.
	IsPersistent() bool

	// The object that manages the HTTP cookies for your website.
	HttpCookieStore() IWKHTTPCookieStore

	// Fetches the specified types of records from the data store.
	FetchDataRecordsOfTypesCompletionHandler(dataTypes foundation.INSSet, completionHandler WKWebsiteDataRecordArrayHandler)

	// Removes the specified types of website data from one or more data records.
	RemoveDataOfTypesForDataRecordsCompletionHandler(dataTypes foundation.INSSet, dataRecords []WKWebsiteDataRecord, completionHandler VoidHandler)
	// Removes website data that changed after the specified date.
	RemoveDataOfTypesModifiedSinceCompletionHandler(dataTypes foundation.INSSet, date foundation.NSDate, completionHandler VoidHandler)

	ProxyConfigurations() []objectivec.Object
	SetProxyConfigurations(value []objectivec.Object)

	FetchDataOfTypesCompletionHandler(dataTypes foundation.INSSet, completionHandler DataErrorHandler)
	RestoreDataCompletionHandler(data foundation.NSData, completionHandler ErrorHandler)

	InitWithCoder(coder foundation.INSCoder) WKWebsiteDataStore
	EncodeWithCoder(coder foundation.INSCoder)
}

An interface definition for the WKWebsiteDataStore class.

Inspecting data store properties

Retrieving specific types of data

Removing specific types of data

Instance Properties

Instance Methods

See: https://developer.apple.com/documentation/WebKit/WKWebsiteDataStore

type IWKWindowFeatures

type IWKWindowFeatures interface {
	objectivec.IObject

	// A Boolean value that indicates whether to make the containing window window resizable.
	AllowsResizing() foundation.NSNumber
	// The requested height of the containing window.
	Height() foundation.NSNumber
	// The requested width of the containing window.
	Width() foundation.NSNumber
	// The requested x-coordinate of the containing window.
	X() foundation.NSNumber
	// The requested y-coordinate of the containing window.
	Y() foundation.NSNumber

	// A Boolean value that indicates whether the webpage requests a visible menu bar.
	MenuBarVisibility() foundation.NSNumber
	// A Boolean value that indicates whether the webpage requested a visible status bar.
	StatusBarVisibility() foundation.NSNumber
	// A Boolean value that indicates whether the webpage requested a visible toolbar.
	ToolbarsVisibility() foundation.NSNumber
}

An interface definition for the WKWindowFeatures class.

Inspecting Window Position and Dimensions

Inspecting Visibility Properties

See: https://developer.apple.com/documentation/WebKit/WKWindowFeatures

type IWebArchive

type IWebArchive interface {
	objectivec.IObject

	// The receiver’s main resource.
	MainResource() IWebResource
	// The receiver’s subresources, or `nil` if there are none.
	Subresources() foundation.INSArray
	// Archives representing the receiver’s subresources or `nil` if there are none.
	SubframeArchives() foundation.INSArray
	// The data representation of the receiver.
	Data() foundation.NSData

	EncodeWithCoder(coder foundation.INSCoder)
}

An interface definition for the WebArchive class.

Getting attributes

See: https://developer.apple.com/documentation/WebKit/WebArchive

type IWebBackForwardList

type IWebBackForwardList interface {
	objectivec.IObject

	// The item that precedes the current item in the back-forward list.
	BackItem() IWebHistoryItem
	// The number of items that precede the current item in the back-forward list.
	BackListCount() int32
	// The current item in the back-forward list.
	CurrentItem() IWebHistoryItem
	// The item that follows the current item in the back-forward list.
	ForwardItem() IWebHistoryItem
	// The number of items that follow the current item in the back-forward list.
	ForwardListCount() int32

	// Returns the maximum number of pages that the receiver can cache.
	PageCacheSize() uint
	// Sets the maximum number of pages the receiver can cache.
	SetPageCacheSize(size uint)

	// The maximum number of items that the back-forward list can contain.
	Capacity() int32
	SetCapacity(value int32)
}

An interface definition for the WebBackForwardList class.

Querying the Back-Forward List

Page Caching

Setting Attributes

See: https://developer.apple.com/documentation/WebKit/WebBackForwardList

type IWebDataSource

type IWebDataSource interface {
	objectivec.IObject

	// The raw data that represents the data source’s content.
	Data() foundation.NSData
	// A Boolean that indicates whether the data source is loading its content.
	IsLoading() bool
	// The title of the data source’s page.
	PageTitle() string
	// The data source’s representation depending on its MIME type.
	Representation() WebDocumentRepresentation
	// The text encoding for the data source’s web view, if set, or the text encoding of the response.
	TextEncodingName() string

	// A reference to the original request that was used to load the web content.
	InitialRequest() foundation.NSURLRequest
	// The request that was used to create the data source.
	Request() foundation.NSMutableURLRequest
	// The response for this data source.
	Response() foundation.URLResponse

	// The web frame that represents this data source.
	WebFrame() IWebFrame

	// The data source’s unreachable URL.
	UnreachableURL() foundation.NSURL

	// A web archive representing the data source, its subresources, and subframes.
	WebArchive() IWebArchive

	// A[WebResource] object representing the data source.
	MainResource() IWebResource
	// The data source’s subresources that have finished downloading.
	Subresources() foundation.INSArray
}

An interface definition for the WebDataSource class.

Querying page data and state

Getting the request and response

Getting the web frame

Getting an unreachable URL

Getting a web archive

Accessing subresources

See: https://developer.apple.com/documentation/WebKit/WebDataSource

type IWebDownload

type IWebDownload interface {
	foundation.INSURLDownload
}

An interface definition for the WebDownload class.

See: https://developer.apple.com/documentation/WebKit/WebDownload

type IWebFrame

type IWebFrame interface {
	objectivec.IObject

	// The committed data source.
	DataSource() IWebDataSource
	// The provisional data source, or `nil` if either a load request is not in progress or a load request has completed.
	ProvisionalDataSource() IWebDataSource

	// The web frame’s parent web frame.
	ParentFrame() IWebFrame
	// The frames of the web frame’s immediate children.
	ChildFrames() foundation.INSArray
	// The web frame’s view object.
	FrameView() IWebFrameView
	// The view object that manages the web frame.
	WebView() IWebView

	// The web frame’s name.
	Name() string

	// The web frame’s DOM document.
	DOMDocument() IDOMDocument
	// The web view’s DOM frame element.
	FrameElement() IDOMHTMLElement
	// The global JavaScript execution context for bridging between the WebKit and JavaScriptCore C API.
	GlobalContext() javascriptcore.JSGlobalContextRef
	// The frame’s global JavaScript execution context.
	JavaScriptContext() javascriptcore.JSContext
	// The JavaScript window object.
	WindowObject() IWebScriptObject
}

An interface definition for the WebFrame class.

Getting the Data Source

Finding Frames

Getting DOM Objects

See: https://developer.apple.com/documentation/WebKit/WebFrame

type IWebFrameView

type IWebFrameView interface {
	appkit.INSView

	// The web frame.
	WebFrame() IWebFrame

	// The subview that displays the web content.
	DocumentView() appkit.NSView

	// A Boolean that indicates whether the frame view should allow users to scroll.
	AllowsScrolling() bool
	SetAllowsScrolling(value bool)

	// A Boolean value indicating whether the receiver can print headers and footers.
	CanPrintHeadersAndFooters() bool
	// A Boolean value indicating whether the document view should handle a print operation.
	DocumentViewShouldHandlePrint() bool
}

An interface definition for the WebFrameView class.

Getting the Web Frame

Getting Subviews

Setting Scrolling Behavior

Printing Views

See: https://developer.apple.com/documentation/WebKit/WebFrameView

type IWebHistory

type IWebHistory interface {
	objectivec.IObject

	// An array of all calendar days represented in the web history.
	OrderedLastVisitedDays() foundation.INSArray

	// The maximum age of web history items that can be retrieved.
	HistoryAgeInDaysLimit() int32
	SetHistoryAgeInDaysLimit(value int32)
	// The maximum number of web history items that can be stored.
	HistoryItemLimit() int32
	SetHistoryItemLimit(value int32)
}

An interface definition for the WebHistory class.

Getting Web History Items

Getting and Setting Attributes

See: https://developer.apple.com/documentation/WebKit/WebHistory

type IWebHistoryItem

type IWebHistoryItem interface {
	objectivec.IObject

	// The string representation of the URL for the receiver’s page.
	URLString() string
	// The string representation of the original URL for the receiver’s page.
	OriginalURLString() string

	// The receiver’s original page title.
	Title() string
	// An alternate title that may be used in place of the receiver’s page title.
	AlternateTitle() string
	SetAlternateTitle(value string)

	// The icon for the receiver’s page, or `nil` if none exists.
	Icon() appkit.NSImage
	// The last time and date the receiver’s page was visited.
	LastVisitedTimeInterval() foundation.TimeInterval
}

An interface definition for the WebHistoryItem class.

Getting URL information

Getting and setting page titles

Getting other attributes

See: https://developer.apple.com/documentation/WebKit/WebHistoryItem

type IWebPreferences

type IWebPreferences interface {
	objectivec.IObject

	// The receiver’s identifier.
	Identifier() string

	// A Boolean that indicates whether or not the receiver’s attributes are automatically stored in the user defaults database.
	Autosaves() bool
	SetAutosaves(value bool)

	// A Boolean that indicates whether or not the web view allows Java.
	IsJavaEnabled() bool
	SetJavaEnabled(value bool)

	// A Boolean that indicates whether or not the web view allows JavaScript.
	IsJavaScriptEnabled() bool
	SetJavaScriptEnabled(value bool)
	// A Boolean that indicates whether or not the web view allows JavaScript to open windows automatically.
	JavaScriptCanOpenWindowsAutomatically() bool
	SetJavaScriptCanOpenWindowsAutomatically(value bool)

	// A Boolean that indicates whether or not the web view allows plug-ins.
	PlugInsEnabled() bool
	SetPlugInsEnabled(value bool)

	// A Boolean that indicates whether or not user style sheets are enabled in the web view.
	UserStyleSheetEnabled() bool
	SetUserStyleSheetEnabled(value bool)

	// The cursive font family of the web view.
	CursiveFontFamily() string
	SetCursiveFontFamily(value string)
	// The fantasy font family of the web view.
	FantasyFontFamily() string
	SetFantasyFontFamily(value string)
	// The fixed font family of the web view.
	FixedFontFamily() string
	SetFixedFontFamily(value string)
	// The sans serif font family of the web view.
	SansSerifFontFamily() string
	SetSansSerifFontFamily(value string)
	// The serif font family of the web view.
	SerifFontFamily() string
	SetSerifFontFamily(value string)
	// The standard font family of the web view.
	StandardFontFamily() string
	SetStandardFontFamily(value string)

	// The default fixed font size of the web view.
	DefaultFixedFontSize() int32
	SetDefaultFixedFontSize(value int32)
	// The default font size of the web view.
	DefaultFontSize() int32
	SetDefaultFontSize(value int32)
	// The minimum font size of the web view.
	MinimumFontSize() int32
	SetMinimumFontSize(value int32)
	// The minimum logical font size of the web view.
	MinimumLogicalFontSize() int32
	SetMinimumLogicalFontSize(value int32)

	// The default text encoding of the web view.
	DefaultTextEncodingName() string
	SetDefaultTextEncodingName(value string)

	// A Boolean that indicates whether incremental rendering should be suppressed.
	SuppressesIncrementalRendering() bool
	SetSuppressesIncrementalRendering(value bool)

	// A Boolean that indicates whether or not the receiver allows animated images to loop.
	AllowsAnimatedImageLooping() bool
	SetAllowsAnimatedImageLooping(value bool)
	// A Boolean that indicates whether or not the receiver allows animated images.
	AllowsAnimatedImages() bool
	SetAllowsAnimatedImages(value bool)
	// A Boolean that indicates whether or not the web view allows images to be loaded automatically.
	LoadsImagesAutomatically() bool
	SetLoadsImagesAutomatically(value bool)

	// A Boolean that indicates whether or not the web view should include backgrounds when printing.
	ShouldPrintBackgrounds() bool
	SetShouldPrintBackgrounds(value bool)

	// A Boolean that indicates whether or not private browsing is enabled.
	PrivateBrowsingEnabled() bool
	SetPrivateBrowsingEnabled(value bool)

	// A Boolean that indicates whether or not the tab key will focus links.
	TabsToLinks() bool
	SetTabsToLinks(value bool)

	// A Boolean that indicates whether the web views associated with the receiver should use the shared page cache.
	UsesPageCache() bool
	SetUsesPageCache(value bool)
	// The cache model for the web views associated with the receiver.
	CacheModel() WebCacheModel
	SetCacheModel(value WebCacheModel)

	AllowsAirPlayForMediaPlayback() bool
	SetAllowsAirPlayForMediaPlayback(value bool)
	UserStyleSheetLocation() foundation.NSURL
	SetUserStyleSheetLocation(value foundation.NSURL)

	EncodeWithCoder(coder foundation.INSCoder)
}

An interface definition for the WebPreferences class.

Getting the Identifier

Saving Preferences to the User Defaults Database

Enabling Java

Enabling JavaScript

Enabling Plug-ins

Enabling Style Sheets

Getting and Setting Fonts

Getting and Setting Font Sizes

Getting and Setting Text Encoding

Getting and Setting Incremental Rendering

Handling Images

Printing Backgrounds

Enabling Private Browsing

Controlling User Focus

Caching

Instance Properties

See: https://developer.apple.com/documentation/WebKit/WebPreferences

type IWebResource

type IWebResource interface {
	objectivec.IObject

	// Initializes and returns a web resource instance.
	InitWithDataURLMIMETypeTextEncodingNameFrameName(data foundation.NSData, URL foundation.NSURL, MIMEType string, textEncodingName string, frameName string) WebResource

	// The receiver’s data.
	Data() foundation.NSData
	// The receiver’s URL.
	URL() foundation.NSURL
	// The receiver’s MIME type.
	MIMEType() string
	// The receiver’s text encoding name.
	TextEncodingName() string
	// The name of the frame. If the receiver does not represent the contents of an entire HTML frame, this is `nil`.
	FrameName() string

	InitWithCoder(coder foundation.INSCoder) WebResource
	EncodeWithCoder(coder foundation.INSCoder)
}

An interface definition for the WebResource class.

Initializing

Getting attributes

See: https://developer.apple.com/documentation/WebKit/WebResource

type IWebScriptObject

type IWebScriptObject interface {
	objectivec.IObject

	// Sets the value of the property identified by the given key.
	SetValueForKey(value objectivec.IObject, key string)
	// Returns the value of the property identified by the given key.
	ValueForKey(key string) objectivec.IObject
}

An interface definition for the WebScriptObject class.

See: https://developer.apple.com/documentation/WebKit/WebScriptObject

type IWebUndefined

type IWebUndefined interface {
	objectivec.IObject

	EncodeWithCoder(coder foundation.INSCoder)
}

An interface definition for the WebUndefined class.

See: https://developer.apple.com/documentation/WebKit/WebUndefined

type IWebView

type IWebView interface {
	appkit.INSView

	// A Boolean that indicates whether the web view should close when its window or host window closes.
	ShouldCloseWithWindow() bool
	SetShouldCloseWithWindow(value bool)

	// The main frame, the root of the web frame hierarchy for this page.
	MainFrame() IWebFrame

	// An action method that stops the loading of any web frame content managed by the receiver.
	StopLoading(sender objectivec.IObject)
	// Sets the receiver’s current location by obtaining a URL string from the sender.
	TakeStringURLFrom(sender objectivec.IObject)
	// An action method that reloads the current page.
	Reload(sender objectivec.IObject)
	// Action method that performs an end-to-end revalidation using cache-validating conditionals if possible.
	ReloadFromOrigin(sender objectivec.IObject)
	// An estimate, as a percentage, of the amount of content that is currently loaded.
	EstimatedProgress() float64

	// A Boolean that indicates whether the web view draws a background.
	DrawsBackground() bool
	SetDrawsBackground(value bool)
	// A Boolean that inidicates whether the web view should update even when it is not in a window that is currently visible.
	ShouldUpdateWhileOffscreen() bool
	SetShouldUpdateWhileOffscreen(value bool)

	// The receiver’s back-forward list.
	BackForwardList() IWebBackForwardList
	// A Boolean that indicates whether the previous location can be loaded.
	CanGoBack() bool
	// An action method that loads the previous location in the back-forward list.
	GoBack(sender objectivec.IObject)
	// A Boolean that indicates whether the next location can be loaded.
	CanGoForward() bool
	// An action method that loads the next location in the back-forward list.
	GoForward(sender objectivec.IObject)

	// A Boolean that indicates whether the text can be made larger.
	CanMakeTextLarger() bool
	// Action method that increases the text size by one unit.
	MakeTextLarger(sender objectivec.IObject)
	// A Boolean that indicates whether the text can be made smaller.
	CanMakeTextSmaller() bool
	// Action method that reduces the text size by one unit.
	MakeTextSmaller(sender objectivec.IObject)

	// The receiver’s download delegate.
	DownloadDelegate() WebDownloadDelegate
	SetDownloadDelegate(value WebDownloadDelegate)
	// The receiver’s frame load delegate.
	FrameLoadDelegate() WebFrameLoadDelegate
	SetFrameLoadDelegate(value WebFrameLoadDelegate)
	// The receiver’s policy delegate.
	PolicyDelegate() WebPolicyDelegate
	SetPolicyDelegate(value WebPolicyDelegate)
	// The receiver’s resource load delegate.
	ResourceLoadDelegate() WebResourceLoadDelegate
	SetResourceLoadDelegate(value WebResourceLoadDelegate)
	// The receiver’s user interface delegate.
	UIDelegate() WebUIDelegate
	SetUIDelegate(value WebUIDelegate)

	// The receiver’s host window.
	HostWindow() appkit.NSWindow
	SetHostWindow(value appkit.NSWindow)

	// The receiver’s preferences.
	Preferences() IWebPreferences
	SetPreferences(value IWebPreferences)
	// The identifier of the receiver’s preferences.
	PreferencesIdentifier() string
	SetPreferencesIdentifier(value string)

	// A Boolean that indicates whether the web view is loading content.
	IsLoading() bool
	// The frame with the active selection.
	SelectedFrame() IWebFrame
	// The URL that the main frame loads.
	MainFrameURL() string
	SetMainFrameURL(value string)
	// The HTML title of the loaded page.
	MainFrameTitle() string
	// The site’s favicon.
	MainFrameIcon() appkit.NSImage
	// The DOM document for the main frame.
	MainFrameDocument() IDOMDocument

	// A Boolean that indicates whether the document view supports different text encodings.
	SupportsTextEncoding() bool
	// The custom text encoding name.
	CustomTextEncodingName() string
	SetCustomTextEncodingName(value string)
	// The font size multiplier for text displayed in web frame view objects managed by the receiver.
	TextSizeMultiplier() float32
	SetTextSizeMultiplier(value float32)

	// The receiver’s group name.
	GroupName() string
	SetGroupName(value string)

	// The receiver’s application name that is used in the user-agent string.
	ApplicationNameForUserAgent() string
	SetApplicationNameForUserAgent(value string)
	// The receiver’s custom user-agent string.
	CustomUserAgent() string
	SetCustomUserAgent(value string)

	// An array of pasteboard types that can be used for the current selection of the receiver.
	PasteboardTypesForSelection() foundation.INSArray

	// Action method that copies the selected content to the general pasteboard.
	Copy(sender objectivec.IObject)
	// An action method that copies font information onto the font pasteboard.
	CopyFont(sender objectivec.IObject)
	// An action method that deletes selected content and puts it on the general pasteboard.
	Cut(sender objectivec.IObject)
	// An action method that deletes the selected content.
	Delete(sender objectivec.IObject)
	// An action method that pastes content from the pasteboard at the insertion point or over the selection.
	Paste(sender objectivec.IObject)
	// An action method that pastes font information from the font pasteboard.
	PasteFont(sender objectivec.IObject)
	// An action method that pastes pasteboard content as plain text.
	PasteAsPlainText(sender objectivec.IObject)
	// An action method that pastes pasteboard content into the receiver as rich text, maintaining its attributes.
	PasteAsRichText(sender objectivec.IObject)

	// An action method that applies center alignment to selected content or all content if there’s no selection.
	AlignCenter(sender objectivec.IObject)
	// An action method that applies full justification to selected content or all content if there’s no selection.
	AlignJustified(sender objectivec.IObject)
	// An action method that applies left justification to selected content or all content if there’s no selection.
	AlignLeft(sender objectivec.IObject)
	// An action method that applies right justification to selected content or all content if there is no selection.
	AlignRight(sender objectivec.IObject)

	// An action method that changes the font of the selection, or all content if there is no selection.
	ChangeFont(sender objectivec.IObject)
	// An action method that changes the attributes of the current selection.
	ChangeAttributes(sender objectivec.IObject)
	// Sets the background color of the selected content.
	ChangeDocumentBackgroundColor(sender objectivec.IObject)
	// Sets the color of the selected content.
	ChangeColor(sender objectivec.IObject)

	// An action method that searches for a misspelled word in the receiver.
	CheckSpelling(sender objectivec.IObject)
	// An action method that shows a spelling correction panel.
	ShowGuessPanel(sender objectivec.IObject)

	// An action method that opens the Find menu and Find panel.
	PerformFindPanelAction(sender objectivec.IObject)

	// An action method that starts speaking the selected text or all text if there’s no selection.
	StartSpeaking(sender objectivec.IObject)
	// An action method that stops speaking that is in progress.
	StopSpeaking(sender objectivec.IObject)

	// A Boolean that indicates whether the user is allowed to edit the document.
	IsEditable() bool
	SetEditable(value bool)
	// A Boolean that indicates whether smart-space insertion and deletion is enabled.
	SmartInsertDeleteEnabled() bool
	SetSmartInsertDeleteEnabled(value bool)
	// A Boolean that indicates whether the web view has continuous spell-checking enabled.
	IsContinuousSpellCheckingEnabled() bool
	SetContinuousSpellCheckingEnabled(value bool)
	// The spell-checker document tag for this document.
	SpellCheckerDocumentTag() int
	// The receiver’s editing delegate.
	EditingDelegate() WebEditingDelegate
	SetEditingDelegate(value WebEditingDelegate)
	// Returns the editable DOM object located at a given point.
	EditableDOMRangeForPoint(point corefoundation.CGPoint) IDOMRange

	// Replaces the receiver’s current selection with the specified DOM node.
	ReplaceSelectionWithNode(node IDOMNode)
	// Replaces the current selection with a string of text.
	ReplaceSelectionWithText(text string)
	// Replaces the current selection with mixed text and markup.
	ReplaceSelectionWithMarkupString(markupString string)
	// Replaces the current selection with an archive’s contents.
	ReplaceSelectionWithArchive(archive IWebArchive)
	// Deletes the receiver’s current selection unless it’s collapsed.
	DeleteSelection()
	// Moves the insertion point to the beginning of the current sentence.
	MoveToBeginningOfSentence(sender objectivec.IObject)
	// Moves the insertion point and extends the selection to the beginning of the current sentence.
	MoveToBeginningOfSentenceAndModifySelection(sender objectivec.IObject)
	// Moves the insertion point to the end of the current sentence.
	MoveToEndOfSentence(sender objectivec.IObject)
	// Moves the insertion point and extends the selection to the end of the current sentence.
	MoveToEndOfSentenceAndModifySelection(sender objectivec.IObject)
	// Selects the entire sentence around the insertion point.
	SelectSentence(sender objectivec.IObject)
	// Toggles whether continuous spell checking is available.
	ToggleContinuousSpellChecking(sender objectivec.IObject)
	// Toggles whether spaces around selected words are inserted or deleted to preserve proper spacing and punctuation.
	ToggleSmartInsertDelete(sender objectivec.IObject)
	// A Boolean that indicates whether the current text size is a multiple of 1.
	CanMakeTextStandardSize() bool
	// Resets the text size to a multiple of 1.
	MakeTextStandardSize(sender objectivec.IObject)
	// A Boolean that indicates whether the selection is maintained when focus is lost.
	MaintainsInactiveSelection() bool

	// The range of the current selection.
	SelectedDOMRange() IDOMRange
	// Selects a range of nodes.
	SetSelectedDOMRangeAffinity(range_ IDOMRange, selectionAffinity appkit.NSSelectionAffinity)
	// The current selection affinity.
	SelectionAffinity() appkit.NSSelectionAffinity

	// Returns the computed style of an element and its pseudo element.
	ComputedStyleForElementPseudoElement(element IDOMElement, pseudoElement string) IDOMCSSStyleDeclaration
	// The receiver’s CSS media property.
	MediaStyle() string
	SetMediaStyle(value string)
	// The receiver’s CSS typing style.
	TypingStyle() IDOMCSSStyleDeclaration
	SetTypingStyle(value IDOMCSSStyleDeclaration)
	// Returns the CSS style declaration for the specified text.
	StyleDeclarationWithText(text string) IDOMCSSStyleDeclaration
	// Applies the CSS typing style to the current selection.
	ApplyStyle(style IDOMCSSStyleDeclaration)

	// The receiver’s window object from the scripting environment.
	WindowScriptObject() IWebScriptObject

	OverWrite(sender objectivec.IObject)
}

An interface definition for the WebView class.

Closing the View

Getting the Main Frame

Loading Content

Drawing

Moving Back and Forward

Changing the Text Size

Getting and Setting Delegates

Getting and Setting the Window

Getting and Setting Preferences

Getting and Setting Frame Contents

Getting and Setting Content Information

Getting and Setting the Group Name

Getting and Setting User-agent Strings

Using the Pasteboard

Cut, Copy and Paste Action Methods

  • IWebView.Copy: Action method that copies the selected content to the general pasteboard.
  • IWebView.CopyFont: An action method that copies font information onto the font pasteboard.
  • IWebView.Cut: An action method that deletes selected content and puts it on the general pasteboard.
  • IWebView.Delete: An action method that deletes the selected content.
  • IWebView.Paste: An action method that pastes content from the pasteboard at the insertion point or over the selection.
  • IWebView.PasteFont: An action method that pastes font information from the font pasteboard.
  • IWebView.PasteAsPlainText: An action method that pastes pasteboard content as plain text.
  • IWebView.PasteAsRichText: An action method that pastes pasteboard content into the receiver as rich text, maintaining its attributes.

Content Alignment Action Methods

  • IWebView.AlignCenter: An action method that applies center alignment to selected content or all content if there’s no selection.
  • IWebView.AlignJustified: An action method that applies full justification to selected content or all content if there’s no selection.
  • IWebView.AlignLeft: An action method that applies left justification to selected content or all content if there’s no selection.
  • IWebView.AlignRight: An action method that applies right justification to selected content or all content if there is no selection.

Changing the Font, Color and Other Attributes When Editing

Spell-checking Action Methods

Find Panel Action Method

Controlling Speakable Text

Getting and Setting Document Editing Attributes

Editing Documents

Selecting Content in the Document

Getting and Setting CSS Properties

Using WebScript

Instance Methods

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class

type ImageErrorHandler added in v0.5.3

type ImageErrorHandler = func(*appkit.NSImage, error)

ImageErrorHandler handles The completion handler to call when the image is ready.

  • snapshotImage: A platform-native image that contains the specified portion of the web view.
  • error: An error object if a problem occurred, or `nil` on success.

The error can be type-asserted to *foundation.NSError for Domain, Code, and UserInfo.

Used by:

type IntURLCredentialHandler added in v0.6.10

type IntURLCredentialHandler = func(int, *foundation.NSURLCredential)

IntURLCredentialHandler handles A closure you must invoke to respond to the authentication challenge.

Used by:

  • [WKDownloadDelegate.DownloadDidReceiveAuthenticationChallengeCompletionHandler]
  • [WKNavigationDelegate.WebViewDidReceiveAuthenticationChallengeCompletionHandler]

type IntURLHandler added in v0.6.10

type IntURLHandler = func(int, *foundation.NSURL)

IntURLHandler handles completion with primitive and object results.

Used by:

  • [WKDownloadDelegate.DownloadDecidePlaceholderPolicy]

type IntWKWebpagePreferencesHandler added in v0.6.10

type IntWKWebpagePreferencesHandler = func(int, *WKWebpagePreferences)

IntWKWebpagePreferencesHandler handles A completion handler block to call with the results about whether to allow or cancel the navigation.

Used by:

  • [WKNavigationDelegate.WebViewDecidePolicyForNavigationActionPreferencesDecisionHandler]

type LocaleErrorHandler

type LocaleErrorHandler = func(*foundation.NSLocale, error)

LocaleErrorHandler handles A block that must be called upon completion. The error can be type-asserted to *foundation.NSError for Domain, Code, and UserInfo.

Used by:

  • [WKWebExtensionTab.DetectWebpageLocaleForWebExtensionContextCompletionHandler]

type NSHTTPCookieArrayHandler

type NSHTTPCookieArrayHandler = func(*[]foundation.NSHTTPCookie)

NSHTTPCookieArrayHandler handles A completion handler block to execute asynchronously with the results.

Used by:

type NSURLArrayHandler

type NSURLArrayHandler = func(*[]foundation.NSURL)

NSURLArrayHandler handles The completion handler the system calls after a person dismisses the open panel.

Used by:

  • [WKUIDelegate.WebViewRunOpenPanelWithParametersInitiatedByFrameCompletionHandler]

type NSUUIDArrayHandler

type NSUUIDArrayHandler = func(*[]foundation.NSUUID)

NSUUIDArrayHandler handles A block to invoke with the fetched list of unique identifiers.

Used by:

  • [WKWebsiteDataStore.FetchAllDataStoreIdentifiers]

type ObjectErrorHandler

type ObjectErrorHandler = func(objectivec.IObject, error)

ObjectErrorHandler handles A handler block to execute when script evaluation finishes.

  • object: The result of the script evaluation, or `nil` if an error occurred.
  • error: `nil` on success, or an error object with information about the problem.

The error can be type-asserted to *foundation.NSError for Domain, Code, and UserInfo.

Used by:

type StringHandler

type StringHandler = func(*string)

StringHandler handles The completion handler to call after the text input panel has been dismissed.

Used by:

  • [WKUIDelegate.WebViewRunJavaScriptTextInputPanelWithPromptDefaultTextInitiatedByFrameCompletionHandler]

type StringSetDateHandler

type StringSetDateHandler = func(*foundation.INSSet, *foundation.NSDate)

StringSetDateHandler handles A block to be called with the set of allowed permissions and an optional expiration date.

Used by:

  • [WKWebExtensionControllerDelegate.WebExtensionControllerPromptForPermissionsInTabForExtensionContextCompletionHandler]

type UIContextMenuConfigurationHandler

type UIContextMenuConfigurationHandler = func(*objectivec.Object)

UIContextMenuConfigurationHandler handles The completion handler for you to call with information about how you want to handle the interaction.

Used by:

  • [WKUIDelegate.WebViewContextMenuConfigurationForElementCompletionHandler]

type URLHandler

type URLHandler = func(*foundation.NSURL)

URLHandler handles A closure you invoke with a destination file URL to begin the download, or `nil` to cancel the download.

Used by:

type URLSetDateHandler

type URLSetDateHandler = func(*foundation.INSSet, *foundation.NSDate)

URLSetDateHandler handles A block to be called with the set of allowed URLs and an optional expiration date.

Used by:

  • [WKWebExtensionControllerDelegate.WebExtensionControllerPromptForPermissionToAccessURLsInTabForExtensionContextCompletionHandler]

type WKAudiovisualMediaTypes

type WKAudiovisualMediaTypes uint

See: https://developer.apple.com/documentation/WebKit/WKAudiovisualMediaTypes

const (
	// WKAudiovisualMediaTypeAll: All media types require a user gesture to begin playing.
	WKAudiovisualMediaTypeAll WKAudiovisualMediaTypes = 18446744073709551615
	// WKAudiovisualMediaTypeAudio: Media types that contain audio require a user gesture to begin playing.
	WKAudiovisualMediaTypeAudio WKAudiovisualMediaTypes = 1
	// WKAudiovisualMediaTypeNone: No media types require a user gesture to begin playing.
	WKAudiovisualMediaTypeNone WKAudiovisualMediaTypes = 0
	// WKAudiovisualMediaTypeVideo: Media types that contain video require a user gesture to begin playing.
	WKAudiovisualMediaTypeVideo WKAudiovisualMediaTypes = 2
)

func (WKAudiovisualMediaTypes) String

func (e WKAudiovisualMediaTypes) String() string

type WKBackForwardList

type WKBackForwardList struct {
	objectivec.Object
}

An object that manages the list of previously loaded webpages, which the web view uses for forward and backward navigation.

Overview

Use a WKBackForwardList object to retrieve a web view’s previously loaded pages. Typically, you don’t create WKBackForwardList objects directly. Each web view creates one automatically and uses it to store the history of all loaded pages. Fetch this object from your web view’s WKWebView.BackForwardList property and use its contents to facilitate programmatic navigation.

Getting the Most Recent Items

Getting Specific Items in the List

Getting Sublists

See: https://developer.apple.com/documentation/WebKit/WKBackForwardList

func NewBackForwardList deprecated

func NewBackForwardList() WKBackForwardList

Deprecated: Use NewWKBackForwardList instead.

func NewWKBackForwardList

func NewWKBackForwardList() WKBackForwardList

NewWKBackForwardList creates a new WKBackForwardList instance.

func WKBackForwardListFromID

func WKBackForwardListFromID(id objc.ID) WKBackForwardList

WKBackForwardListFromID constructs a WKBackForwardList from an objc.ID.

An object that manages the list of previously loaded webpages, which the web view uses for forward and backward navigation.

func (WKBackForwardList) Autorelease

func (b WKBackForwardList) Autorelease() WKBackForwardList

Autorelease adds the receiver to the current autorelease pool.

func (WKBackForwardList) BackItem

The item immediately preceding the current item, if any.

Discussion

If the current item is the first item in the list, the value in this property is `nil`.

See: https://developer.apple.com/documentation/WebKit/WKBackForwardList/backItem

func (WKBackForwardList) BackList

The array of items that precede the current item.

Discussion

The items are in the order in which the web view originally visited them.

See: https://developer.apple.com/documentation/WebKit/WKBackForwardList/backList

func (WKBackForwardList) ForwardItem

func (b WKBackForwardList) ForwardItem() IWKBackForwardListItem

The item immediately following the current item, if any.

Discussion

If the current item is the last item in the list, this value in this property is `nil`.

See: https://developer.apple.com/documentation/WebKit/WKBackForwardList/forwardItem

func (WKBackForwardList) ForwardList

func (b WKBackForwardList) ForwardList() []WKBackForwardListItem

The array of items that follow the current item.

Discussion

The items are in the order in which the web view originally visited them.

See: https://developer.apple.com/documentation/WebKit/WKBackForwardList/forwardList

func (WKBackForwardList) Init

Init initializes the instance.

func (WKBackForwardList) ItemAtIndex

func (b WKBackForwardList) ItemAtIndex(index int) IWKBackForwardListItem

Returns the item at the relative offset from the current item.

index: The offset of the desired item from the current item. Specify `0` for the current item, `-1` for the immediately preceding item, `1` for the immediately following item, and so on.

Return Value

The item at the specified offset from the current item, or `nil` if the `index` exceeds the limits of the list.

See: https://developer.apple.com/documentation/WebKit/WKBackForwardList/item(at:)

type WKBackForwardListClass

type WKBackForwardListClass struct {
	// contains filtered or unexported fields
}

func GetWKBackForwardListClass

func GetWKBackForwardListClass() WKBackForwardListClass

GetWKBackForwardListClass returns the class object for WKBackForwardList.

func (WKBackForwardListClass) Alloc

Alloc allocates memory for a new instance of the class.

func (WKBackForwardListClass) Class

func (wc WKBackForwardListClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type WKBackForwardListItem

type WKBackForwardListItem struct {
	objectivec.Object
}

A representation of a webpage that the web view previously visited.

Overview

Use a WKBackForwardListItem object to get information about previously visited webpages. This object identifies the page’s title and URL. It also identifes the URL that requested the webpage.

You don’t create WKBackForwardListItem objects directly. Instead, a WKBackForwardList object creates them in conjunction with its associated web view when the web view loads new pages.

Getting the Page-Specific Information

Getting the Requesting Page

See: https://developer.apple.com/documentation/WebKit/WKBackForwardListItem

func NewBackForwardListItem deprecated

func NewBackForwardListItem() WKBackForwardListItem

Deprecated: Use NewWKBackForwardListItem instead.

func NewWKBackForwardListItem

func NewWKBackForwardListItem() WKBackForwardListItem

NewWKBackForwardListItem creates a new WKBackForwardListItem instance.

func WKBackForwardListItemFromID

func WKBackForwardListItemFromID(id objc.ID) WKBackForwardListItem

WKBackForwardListItemFromID constructs a WKBackForwardListItem from an objc.ID.

A representation of a webpage that the web view previously visited.

func (WKBackForwardListItem) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (WKBackForwardListItem) Init

Init initializes the instance.

func (WKBackForwardListItem) InitialURL

func (b WKBackForwardListItem) InitialURL() foundation.NSURL

The source URL that originally asked the web view to load this page.

See: https://developer.apple.com/documentation/WebKit/WKBackForwardListItem/initialURL

func (WKBackForwardListItem) Title

func (b WKBackForwardListItem) Title() string

The title of the webpage this item represents.

See: https://developer.apple.com/documentation/WebKit/WKBackForwardListItem/title

func (WKBackForwardListItem) URL

The URL of the webpage this item represents.

See: https://developer.apple.com/documentation/WebKit/WKBackForwardListItem/url

type WKBackForwardListItemClass

type WKBackForwardListItemClass struct {
	// contains filtered or unexported fields
}

func GetWKBackForwardListItemClass

func GetWKBackForwardListItemClass() WKBackForwardListItemClass

GetWKBackForwardListItemClass returns the class object for WKBackForwardListItem.

func (WKBackForwardListItemClass) Alloc

Alloc allocates memory for a new instance of the class.

func (WKBackForwardListItemClass) Class

Class returns the underlying Objective-C class pointer.

type WKContentMode

type WKContentMode int

See: https://developer.apple.com/documentation/WebKit/WKWebpagePreferences/ContentMode

const (
	// WKContentModeDesktop: The content mode that represents a desktop experience.
	WKContentModeDesktop WKContentMode = 2
	// WKContentModeMobile: The content mode that represents a mobile experience.
	WKContentModeMobile WKContentMode = 1
	// WKContentModeRecommended: The content mode that is appropriate for the current device.
	WKContentModeRecommended WKContentMode = 0
)

func (WKContentMode) String

func (e WKContentMode) String() string

type WKContentRuleList

type WKContentRuleList struct {
	objectivec.Object
}

A compiled list of rules to apply to web content.

Overview

A WKContentRuleList object represents a compiled set of rules for modifying how a webpage loads content. You don’t create a WKContentRuleList directly. Instead, you specify your rules in JSON format and compile them using the WKContentRuleListStore.CompileContentRuleListForIdentifierEncodedContentRuleListCompletionHandler method of WKContentRuleListStore. That method compiles your rules into an efficient byte format and returns them in an instance of this class.

Content rule lists use the same syntax as content blocker extensions in Safari. For more information on how to specify the JSON for your rule lists, see Creating a content blocker.

Getting the Rules List Identifier

See: https://developer.apple.com/documentation/WebKit/WKContentRuleList

func NewContentRuleList deprecated

func NewContentRuleList() WKContentRuleList

Deprecated: Use NewWKContentRuleList instead.

func NewWKContentRuleList

func NewWKContentRuleList() WKContentRuleList

NewWKContentRuleList creates a new WKContentRuleList instance.

func WKContentRuleListFromID

func WKContentRuleListFromID(id objc.ID) WKContentRuleList

WKContentRuleListFromID constructs a WKContentRuleList from an objc.ID.

A compiled list of rules to apply to web content.

func (WKContentRuleList) Autorelease

func (c WKContentRuleList) Autorelease() WKContentRuleList

Autorelease adds the receiver to the current autorelease pool.

func (WKContentRuleList) Identifier

func (c WKContentRuleList) Identifier() string

The identifier for the rule list.

Discussion

You specify the identifier for your rule lists at compile time in the WKContentRuleListStore.CompileContentRuleListForIdentifierEncodedContentRuleListCompletionHandler method of WKContentRuleListStore. You also use this identifier to look up the rules list later.

See: https://developer.apple.com/documentation/WebKit/WKContentRuleList/identifier

func (WKContentRuleList) Init

Init initializes the instance.

type WKContentRuleListClass

type WKContentRuleListClass struct {
	// contains filtered or unexported fields
}

func GetWKContentRuleListClass

func GetWKContentRuleListClass() WKContentRuleListClass

GetWKContentRuleListClass returns the class object for WKContentRuleList.

func (WKContentRuleListClass) Alloc

Alloc allocates memory for a new instance of the class.

func (WKContentRuleListClass) Class

func (wc WKContentRuleListClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type WKContentRuleListErrorHandler

type WKContentRuleListErrorHandler = func(*WKContentRuleList, error)

WKContentRuleListErrorHandler handles A completion handler block to call after compilation finishes.

The error can be type-asserted to *foundation.NSError for Domain, Code, and UserInfo.

Used by:

type WKContentRuleListStore

type WKContentRuleListStore struct {
	objectivec.Object
}

An object that contains the rules for how to load and filter content in the web view.

Overview

Use a WKContentRuleListStore to compile and manage rules for filtering content in a web view. Rule lists act as content blockers inside your app. You use them to prevent the web view from loading specific content, either based on the original location of that content or other criteria you specify. For example, a corporate app might use rules to prevent the web view from loading content that originates from outside the corporate network.

Fetch the default WKContentRuleListStore object or create a custom store object and use it to compile or access the available rules. Each store object stores its existing rules persistently in the file system and loads those rules at creation time. A store object doesn’t automatically apply any of its rules to a particular web view. To apply a rule to a web view, add it to the WKUserContentController object of the web view’s configuration object.

Creating and Deleting Content Rule Lists

Accessing the Current Rule Lists

See: https://developer.apple.com/documentation/WebKit/WKContentRuleListStore

func NewContentRuleListStore deprecated

func NewContentRuleListStore() WKContentRuleListStore

Deprecated: Use NewWKContentRuleListStore instead.

func NewContentRuleListStoreWithURL deprecated

func NewContentRuleListStoreWithURL(url foundation.NSURL) WKContentRuleListStore

Deprecated: Use NewWKContentRuleListStoreWithURL instead.

func NewWKContentRuleListStore

func NewWKContentRuleListStore() WKContentRuleListStore

NewWKContentRuleListStore creates a new WKContentRuleListStore instance.

func NewWKContentRuleListStoreWithURL

func NewWKContentRuleListStoreWithURL(url foundation.NSURL) WKContentRuleListStore

Creates a new content rule list store in the specified directory.

url: A URL that specifies a directory. The returned object uses this directory to store its content rules persistently. For example, you might store your app-specific rules in your app’s container directory.

Return Value

A content rule store associated with the specified directory.

Discussion

If the specified directory already contains compiled rule lists, this method loads those rules and adds them to the returned object. If you change any rules after creating this object, the store saves those changes to the same directory.

See: https://developer.apple.com/documentation/WebKit/WKContentRuleListStore/init(url:)

func WKContentRuleListStoreFromID

func WKContentRuleListStoreFromID(id objc.ID) WKContentRuleListStore

WKContentRuleListStoreFromID constructs a WKContentRuleListStore from an objc.ID.

An object that contains the rules for how to load and filter content in the web view.

func (WKContentRuleListStore) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (WKContentRuleListStore) CompileContentRuleListForIdentifierEncodedContentRuleList

func (c WKContentRuleListStore) CompileContentRuleListForIdentifierEncodedContentRuleList(ctx context.Context, identifier string, encodedContentRuleList string) (*WKContentRuleList, error)

CompileContentRuleListForIdentifierEncodedContentRuleList is a synchronous wrapper around WKContentRuleListStore.CompileContentRuleListForIdentifierEncodedContentRuleListCompletionHandler. It blocks until the completion handler fires or the context is cancelled.

func (WKContentRuleListStore) CompileContentRuleListForIdentifierEncodedContentRuleListCompletionHandler

func (c WKContentRuleListStore) CompileContentRuleListForIdentifierEncodedContentRuleListCompletionHandler(identifier string, encodedContentRuleList string, completionHandler WKContentRuleListErrorHandler)

Compiles the specified JSON content into a new rule list and adds it to the current data store.

identifier: A unique identifier for the new list. If a list with the specified identifier already exists in the store, this method overwrites the old rule list with the new content.

encodedContentRuleList: The JSON source for the new rule list. For information about how to format the JSON content, see Creating a content blocker.

completionHandler: A completion handler block to call after compilation finishes. This block has no return value and takes the following parameters:

ruleList: The WKContentRuleList object that encapsulates the compiled rules derived from the `encodedContentRuleList` parameter. This parameter is `nil` if an error occurs during compilation. error: `nil` on success, or an error object if a problem occurred.

See: https://developer.apple.com/documentation/WebKit/WKContentRuleListStore/compileContentRuleList(forIdentifier:encodedContentRuleList:completionHandler:)

func (WKContentRuleListStore) GetAvailableContentRuleListIdentifiers

func (c WKContentRuleListStore) GetAvailableContentRuleListIdentifiers(completionHandler stringArrayHandler)

Fetches the identifiers for all rule lists in the store asynchronously.

completionHandler: A completion handler block to call with the results. This block has no return value and takes the following parameter:

identifierArray: An array of strings, each of which corresponds to an identifier for a rule list in the data store. Use each string to look up the associated WKContentRuleList object. If the data store has no rule lists, the array is empty.

See: https://developer.apple.com/documentation/WebKit/WKContentRuleListStore/getAvailableContentRuleListIdentifiers(_:)

func (WKContentRuleListStore) GetAvailableContentRuleListIdentifiersSync

func (c WKContentRuleListStore) GetAvailableContentRuleListIdentifiersSync(ctx context.Context) ([]string, error)

GetAvailableContentRuleListIdentifiersSync is a synchronous wrapper around WKContentRuleListStore.GetAvailableContentRuleListIdentifiers. It blocks until the completion handler fires or the context is cancelled.

func (WKContentRuleListStore) Init

Init initializes the instance.

func (WKContentRuleListStore) LookUpContentRuleListForIdentifier

func (c WKContentRuleListStore) LookUpContentRuleListForIdentifier(ctx context.Context, identifier string) (*WKContentRuleList, error)

LookUpContentRuleListForIdentifier is a synchronous wrapper around WKContentRuleListStore.LookUpContentRuleListForIdentifierCompletionHandler. It blocks until the completion handler fires or the context is cancelled.

func (WKContentRuleListStore) LookUpContentRuleListForIdentifierCompletionHandler

func (c WKContentRuleListStore) LookUpContentRuleListForIdentifierCompletionHandler(identifier string, completionHandler WKContentRuleListErrorHandler)

Searches asynchronously for a specific rule list in the data store.

identifier: The identifier of the list you want.

completionHandler: A completion handler block to call with the results of the search. This block has no return value and takes the following parameters:

ruleList: The WKContentRuleList object with the specified identifier. This parameter is `nil` if the error occurs during the search. error: `nil` on success, or an error object if an error occurs during the search.

See: https://developer.apple.com/documentation/WebKit/WKContentRuleListStore/lookUpContentRuleList(forIdentifier:completionHandler:)

func (WKContentRuleListStore) RemoveContentRuleListForIdentifier

func (c WKContentRuleListStore) RemoveContentRuleListForIdentifier(ctx context.Context, identifier string) error

RemoveContentRuleListForIdentifier is a synchronous wrapper around WKContentRuleListStore.RemoveContentRuleListForIdentifierCompletionHandler. It blocks until the completion handler fires or the context is cancelled.

func (WKContentRuleListStore) RemoveContentRuleListForIdentifierCompletionHandler

func (c WKContentRuleListStore) RemoveContentRuleListForIdentifierCompletionHandler(identifier string, completionHandler ErrorHandler)

Removes a rule list from the current data store asynchronously.

identifier: The unique identifier for the rule list.

completionHandler: A completion handler block to call after the removal of the content rule list. This block has no return value and takes the following parameter:

error: `nil` on success, or an error object if the store encountered an error when deleting the rule list.

Discussion

This method also removes the persistent copy of the rules stored on disk.

See: https://developer.apple.com/documentation/WebKit/WKContentRuleListStore/removeContentRuleList(forIdentifier:completionHandler:)

type WKContentRuleListStoreClass

type WKContentRuleListStoreClass struct {
	// contains filtered or unexported fields
}

func GetWKContentRuleListStoreClass

func GetWKContentRuleListStoreClass() WKContentRuleListStoreClass

GetWKContentRuleListStoreClass returns the class object for WKContentRuleListStore.

func (WKContentRuleListStoreClass) Alloc

Alloc allocates memory for a new instance of the class.

func (WKContentRuleListStoreClass) Class

Class returns the underlying Objective-C class pointer.

func (WKContentRuleListStoreClass) DefaultStore

func (_WKContentRuleListStoreClass WKContentRuleListStoreClass) DefaultStore() WKContentRuleListStore

Returns the default content rule list store.

Return Value

The default rule list store.

Discussion

The default store contains the rules that your app created specifically for the current user.

See: https://developer.apple.com/documentation/WebKit/WKContentRuleListStore/default()

type WKContentWorld

type WKContentWorld struct {
	objectivec.Object
}

An object that defines a scope of execution for JavaScript code, and which you use to prevent conflicts between different scripts.

Overview

Use a WKContentWorld object as a namespace to separate your app’s web environment from the environment of individual webpages or scripts you execute. Content worlds help prevent issues that occur when two scripts modify environment variables in conflicting ways. Executing a script in its own content world effectively gives it a separate copy of the environment variables to modify. You might use this support in the following scenarios:

- You have complex script logic to bridge your web content to your app, but your web content has complex script libraries of its own. In that scenario, use one content world for your app-specific scripts and a separate content world for your content-specific scripts. - You implement a web browser that supports JavaScript extensions. In that scenario, create a unique content world for each extension to prevent conflicts between the extensions.

A WKContentWorld object is a namespace and doesn’t persist data outside of the current web view or webpage. If you use the same content world in two WKWebView objects, variables in one web view’s content world don’t appear in the other web view. Similarly, when the user or your app navigates to a new webpage, variables from the previous page are gone, even if both pages share the same content world.

Use the methods and properties of this class to fetch the content world you need. WKContentWorld provides a default content world for your app and a content world for the current web page. You can also create new content worlds. For example, you might create a custom content world for each JavaScript extension you manage. Specify the content world object when configuring or executing scripts associated with your content.

Retrieving a Custom Content World

See: https://developer.apple.com/documentation/WebKit/WKContentWorld

func NewContentWorld deprecated

func NewContentWorld() WKContentWorld

Deprecated: Use NewWKContentWorld instead.

func NewWKContentWorld

func NewWKContentWorld() WKContentWorld

NewWKContentWorld creates a new WKContentWorld instance.

func WKContentWorldFromID

func WKContentWorldFromID(id objc.ID) WKContentWorld

WKContentWorldFromID constructs a WKContentWorld from an objc.ID.

An object that defines a scope of execution for JavaScript code, and which you use to prevent conflicts between different scripts.

func (WKContentWorld) Autorelease

func (c WKContentWorld) Autorelease() WKContentWorld

Autorelease adds the receiver to the current autorelease pool.

func (WKContentWorld) Init

func (c WKContentWorld) Init() WKContentWorld

Init initializes the instance.

func (WKContentWorld) Name

func (c WKContentWorld) Name() string

The name of a custom content world.

Discussion

This property contains a valid string only for content worlds you retrieve using the WKContentWorldClass.WorldWithName function. The value of this property is `nil` for the content worlds in the WKContentWorldClass.DefaultClientWorld and WKContentWorldClass.PageWorld properties.

See: https://developer.apple.com/documentation/WebKit/WKContentWorld/name

type WKContentWorldClass

type WKContentWorldClass struct {
	// contains filtered or unexported fields
}

func GetWKContentWorldClass

func GetWKContentWorldClass() WKContentWorldClass

GetWKContentWorldClass returns the class object for WKContentWorld.

func (WKContentWorldClass) Alloc

Alloc allocates memory for a new instance of the class.

func (WKContentWorldClass) Class

func (wc WKContentWorldClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

func (WKContentWorldClass) DefaultClientWorld

func (_WKContentWorldClass WKContentWorldClass) DefaultClientWorld() WKContentWorld

The default world for clients.

See: https://developer.apple.com/documentation/WebKit/WKContentWorld/defaultClient

func (WKContentWorldClass) PageWorld

func (_WKContentWorldClass WKContentWorldClass) PageWorld() WKContentWorld

The content world for the current webpage’s content.

Discussion

This property contains the content world for scripts that the current webpage executes. Be careful when manipulating variables in this content world. If you modify a variable with the same name as one the webpage uses, you may unintentionally disrupt the normal operation of that page.

See: https://developer.apple.com/documentation/WebKit/WKContentWorld/page

func (WKContentWorldClass) WorldWithName

func (_WKContentWorldClass WKContentWorldClass) WorldWithName(name string) WKContentWorld

Returns the custom content world with the specified name.

name: The name of the content world you want. If no content world with that name exists, this method creates a new WKContentWorld object and returns it. The next time you request a content world with the same name, this method returns the object it previously created.

Return Value

The content world with the specified name.

Discussion

Use this method to create unique content worlds for your script code. For example, if you execute scripts from multiple JavaScript extensions, you might use this method to create a content world based on a unique string associated with that extension.

See: https://developer.apple.com/documentation/WebKit/WKContentWorld/world(name:)

type WKCookiePolicy

type WKCookiePolicy int

See: https://developer.apple.com/documentation/WebKit/WKHTTPCookieStore/CookiePolicy

const (
	// WKCookiePolicyAllow: A case that indicates the cookie store allows cookie storage.
	WKCookiePolicyAllow WKCookiePolicy = 0
	// WKCookiePolicyDisallow: A case that indicates the cookie store does not allow cookie storage.
	WKCookiePolicyDisallow WKCookiePolicy = 1
)

func (WKCookiePolicy) String

func (e WKCookiePolicy) String() string

type WKCookiePolicyHandler

type WKCookiePolicyHandler = func(int)

WKCookiePolicyHandler handles The completion handler block to execute asynchronously with the cookie policy.

Used by:

type WKDialogResult

type WKDialogResult int

See: https://developer.apple.com/documentation/WebKit/WKDialogResult

const (
	// WKDialogResultAskAgain: A result that indicates the delegate didn’t display a message, so other web views should check again.
	WKDialogResultAskAgain WKDialogResult = 2
	// WKDialogResultHandled: A result that indicates the delegate displayed the first use message.
	WKDialogResultHandled WKDialogResult = 3
	// WKDialogResultShowDefault: A result that indicates the delegate didn’t display a message, so the web view should show the default Lockdown Mode message.
	WKDialogResultShowDefault WKDialogResult = 1
)

func (WKDialogResult) String

func (e WKDialogResult) String() string

type WKDialogResultHandler

type WKDialogResultHandler = func(int)

WKDialogResultHandler handles A block you must invoke to resume after the web view displays the first use dialog.

  • dialogResult: A display result case that indicates how the method handled the display request.

Used by:

  • [WKUIDelegate.WebViewShowLockdownModeFirstUseMessageCompletionHandler]

type WKDownload

type WKDownload struct {
	objectivec.Object
}

An object that represents the download of a web resource.

Managing the download

Inspecting the download

Instance Properties

See: https://developer.apple.com/documentation/WebKit/WKDownload

func NewDownload deprecated

func NewDownload() WKDownload

Deprecated: Use NewWKDownload instead.

func NewWKDownload

func NewWKDownload() WKDownload

NewWKDownload creates a new WKDownload instance.

func WKDownloadFromID

func WKDownloadFromID(id objc.ID) WKDownload

WKDownloadFromID constructs a WKDownload from an objc.ID.

An object that represents the download of a web resource.

func (WKDownload) Autorelease

func (d WKDownload) Autorelease() WKDownload

Autorelease adds the receiver to the current autorelease pool.

func (WKDownload) Cancel

func (d WKDownload) Cancel(completionHandler DataHandler)

Cancels the download, and optionally captures data so that you can resume the download later.

completionHandler: A closure you provide to capture and store data so that you can resume the download later.

See: https://developer.apple.com/documentation/WebKit/WKDownload/cancel(_:)

func (WKDownload) CancelSync

func (d WKDownload) CancelSync(ctx context.Context) (*foundation.NSData, error)

CancelSync is a synchronous wrapper around WKDownload.Cancel. It blocks until the completion handler fires or the context is cancelled.

func (WKDownload) Delegate

func (d WKDownload) Delegate() WKDownloadDelegate

An object you use to track download progress and handle redirects, authentication challenges, and failures.

See: https://developer.apple.com/documentation/WebKit/WKDownload/delegate

func (WKDownload) Init

func (d WKDownload) Init() WKDownload

Init initializes the instance.

func (WKDownload) IsUserInitiated added in v0.6.5

func (d WKDownload) IsUserInitiated() bool

See: https://developer.apple.com/documentation/WebKit/WKDownload/isUserInitiated

func (WKDownload) OriginalRequest

func (d WKDownload) OriginalRequest() foundation.NSURLRequest

An object that represents the request that initiated the download.

See: https://developer.apple.com/documentation/WebKit/WKDownload/originalRequest

func (WKDownload) SetDelegate

func (d WKDownload) SetDelegate(value WKDownloadDelegate)

func (WKDownload) WebView

func (d WKDownload) WebView() IWKWebView

The web view where the download initiated.

See: https://developer.apple.com/documentation/WebKit/WKDownload/webView

type WKDownloadClass

type WKDownloadClass struct {
	// contains filtered or unexported fields
}

func GetWKDownloadClass

func GetWKDownloadClass() WKDownloadClass

GetWKDownloadClass returns the class object for WKDownload.

func (WKDownloadClass) Alloc

func (wc WKDownloadClass) Alloc() WKDownload

Alloc allocates memory for a new instance of the class.

func (WKDownloadClass) Class

func (wc WKDownloadClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type WKDownloadDelegate

type WKDownloadDelegate interface {
	objectivec.IObject

	// Asks the delegate to provide a file destination where the system should write the download data.
	//
	// See: https://developer.apple.com/documentation/WebKit/WKDownloadDelegate/download(_:decideDestinationUsing:suggestedFilename:completionHandler:)
	DownloadDecideDestinationUsingResponseSuggestedFilenameCompletionHandler(download IWKDownload, response foundation.NSURLResponse, suggestedFilename string, completionHandler URLHandler)
}

A protocol you implement to track download progress and handle redirects, authentication challenges, and failures.

See: https://developer.apple.com/documentation/WebKit/WKDownloadDelegate

type WKDownloadDelegateConfig

type WKDownloadDelegateConfig struct {

	// Tracking Download Progress
	// DownloadDidFinish — Tells the delegate that the download finished.
	DownloadDidFinish func(download WKDownload)
	// DownloadDidFailWithErrorResumeData — Tells the delegate that the download failed, with error information and data you can use to restart the download.
	DownloadDidFailWithErrorResumeData func(download WKDownload, error_ foundation.NSError, resumeData foundation.NSData)

	// Instance Methods
	DownloadDidReceiveFinalURL func(download WKDownload, url foundation.NSURL)
}

WKDownloadDelegateConfig holds optional typed callbacks for WKDownloadDelegate methods. Set non-nil fields to register the corresponding Objective-C delegate method. Methods with nil callbacks are not registered, so [NSObject.RespondsToSelector] returns false for them — matching the Objective-C delegate pattern exactly.

See Apple Documentation for protocol details.

type WKDownloadDelegateObject

type WKDownloadDelegateObject struct {
	objectivec.Object
}

WKDownloadDelegateObject wraps an existing Objective-C object that conforms to the WKDownloadDelegate protocol.

func NewWKDownloadDelegate

func NewWKDownloadDelegate(config WKDownloadDelegateConfig) WKDownloadDelegateObject

NewWKDownloadDelegate creates an Objective-C object implementing the WKDownloadDelegate protocol.

The object implements only the methods set in config, so [NSObject.RespondsToSelector] reports optional delegate methods accurately. Objects with the same set of methods share one Objective-C class, registered on first use, so creating many of them costs no class or callback registration. The caller owns the returned object; config is dropped when it deallocates.

The returned WKDownloadDelegateObject satisfies the WKDownloadDelegate interface and can be passed directly to SetDelegate and similar methods.

See Apple Documentation for protocol details.

func WKDownloadDelegateObjectFromID

func WKDownloadDelegateObjectFromID(id objc.ID) WKDownloadDelegateObject

WKDownloadDelegateObjectFromID constructs a WKDownloadDelegateObject from an objc.ID. The object is determined to conform to the protocol at runtime.

func (WKDownloadDelegateObject) BaseObject

func (WKDownloadDelegateObject) DownloadDecideDestinationUsingResponseSuggestedFilenameCompletionHandler

func (o WKDownloadDelegateObject) DownloadDecideDestinationUsingResponseSuggestedFilenameCompletionHandler(download IWKDownload, response foundation.NSURLResponse, suggestedFilename string, completionHandler URLHandler)

Asks the delegate to provide a file destination where the system should write the download data.

download: The download that needs a file destination where the systems should write the download data.

response: A response from the server for an HTTP request, or a synthesized response for a blob download.

suggestedFilename: A string with a filename suggestion to use in creating the file destination.

completionHandler: A closure you invoke with a destination file URL to begin the download, or `nil` to cancel the download.

Discussion

The suggested filename can come from the response or from the web content.

The destination file URL must meet the following requirements:

- It’s a file that doesn’t exist. - It’s in a directory that exists. - It’s in a directory that WebKit can write to.

See: https://developer.apple.com/documentation/WebKit/WKDownloadDelegate/download(_:decideDestinationUsing:suggestedFilename:completionHandler:)

func (WKDownloadDelegateObject) DownloadDidFailWithErrorResumeData

func (o WKDownloadDelegateObject) DownloadDidFailWithErrorResumeData(download IWKDownload, error_ foundation.NSError, resumeData foundation.NSData)

Tells the delegate that the download failed, with error information and data you can use to restart the download.

download: The download that failed.

error: An error describing what caused the download to fail.

resumeData: A data object you use to restart the download.

Discussion

To restart a failed download, call WKWebView.ResumeDownloadFromResumeDataCompletionHandler with `resumeData`.

See: https://developer.apple.com/documentation/WebKit/WKDownloadDelegate/download(_:didFailWithError:resumeData:)

func (WKDownloadDelegateObject) DownloadDidFinish

func (o WKDownloadDelegateObject) DownloadDidFinish(download IWKDownload)

Tells the delegate that the download finished.

download: The download that finished.

See: https://developer.apple.com/documentation/WebKit/WKDownloadDelegate/downloadDidFinish(_:)

func (WKDownloadDelegateObject) DownloadDidReceiveAuthenticationChallengeCompletionHandler

func (o WKDownloadDelegateObject) DownloadDidReceiveAuthenticationChallengeCompletionHandler(download IWKDownload, challenge foundation.NSURLAuthenticationChallenge, completionHandler IntURLCredentialHandler)

Asks the delegate to respond to an authentication challenge.

download: The download that received the authentication challenge.

challenge: The authentication challenge.

completionHandler: A closure you must invoke to respond to the authentication challenge. Provide the closure with a disposition that describes how to respond to the authorization challenge, and optional credentials.

Discussion

Determine how to respond to the authentication challenge in this method. Then invoke `completionHandler` with a disposition that describes how to respond to the authorization challenge, and optional credentials.

If you don’t implement this method, the web view responds to the challenge with URLSession.AuthChallengeDisposition.rejectProtectionSpace.

See: https://developer.apple.com/documentation/WebKit/WKDownloadDelegate/download(_:didReceive:completionHandler:)

func (WKDownloadDelegateObject) DownloadWillPerformHTTPRedirectionNewRequestDecisionHandler

func (o WKDownloadDelegateObject) DownloadWillPerformHTTPRedirectionNewRequestDecisionHandler(download IWKDownload, response foundation.NSHTTPURLResponse, request foundation.NSURLRequest, decisionHandler WKDownloadRedirectPolicyHandler)

Asks the delegate to respond to the download’s redirect response.

download: The download that receives the redirect response.

response: The redirect response.

request: The new request the web view sends as a result of the redirect response.

decisionHandler: A closure you must invoke, providing a download redirect policy that indicates whether to proceed with the redirect.

Discussion

Determine whether to proceed with the redirect. Then invoke the decisionHandler closure, providing a download redirect policy that indicates whether to proceed with the redirect.

If you don’t implement this method, the web view proceeds with all redirects.

See: https://developer.apple.com/documentation/WebKit/WKDownloadDelegate/download(_:willPerformHTTPRedirection:newRequest:decisionHandler:)

type WKDownloadHandler

type WKDownloadHandler = func(*WKDownload)

WKDownloadHandler handles A closure the system executes when it has started to download the resource.

Used by:

type WKDownloadPlaceholderPolicy

type WKDownloadPlaceholderPolicy int

See: https://developer.apple.com/documentation/WebKit/WKDownload/PlaceholderPolicy

const (
	WKDownloadPlaceholderPolicyDisable WKDownloadPlaceholderPolicy = 0
	WKDownloadPlaceholderPolicyEnable  WKDownloadPlaceholderPolicy = 1
)

func (WKDownloadPlaceholderPolicy) String

type WKDownloadRedirectPolicy

type WKDownloadRedirectPolicy int

See: https://developer.apple.com/documentation/WebKit/WKDownload/RedirectPolicy

const (
	// WKDownloadRedirectPolicyAllow: Allow a redirect to proceed.
	WKDownloadRedirectPolicyAllow WKDownloadRedirectPolicy = 1
	// WKDownloadRedirectPolicyCancel: Cancel the redirect action.
	WKDownloadRedirectPolicyCancel WKDownloadRedirectPolicy = 0
)

func (WKDownloadRedirectPolicy) String

func (e WKDownloadRedirectPolicy) String() string

type WKDownloadRedirectPolicyHandler

type WKDownloadRedirectPolicyHandler = func(int)

WKDownloadRedirectPolicyHandler handles A closure you must invoke, providing a download redirect policy that indicates whether to proceed with the redirect.

Used by:

  • [WKDownloadDelegate.DownloadWillPerformHTTPRedirectionNewRequestDecisionHandler]

type WKErrorCode

type WKErrorCode int

See: https://developer.apple.com/documentation/WebKit/WKError/Code

const (
	// WKErrorAttributedStringContentFailedToLoad: An error that indicates the failure to navigate to web content from an attributed string.
	WKErrorAttributedStringContentFailedToLoad WKErrorCode = 10
	// WKErrorAttributedStringContentLoadTimedOut: An error that indicates a timeout occurred while trying to load web content from an attributed string.
	WKErrorAttributedStringContentLoadTimedOut WKErrorCode = 11
	// WKErrorContentRuleListStoreCompileFailed: An error that indicates the compilation of a rule list failed.
	WKErrorContentRuleListStoreCompileFailed WKErrorCode = 6
	// WKErrorContentRuleListStoreLookUpFailed: An error that indicates a content rule list data store didn’t find a rule list with the specified identifier.
	WKErrorContentRuleListStoreLookUpFailed WKErrorCode = 7
	// WKErrorContentRuleListStoreRemoveFailed: An error that indicates a failure to remove a content rule list from the rule list data store object.
	WKErrorContentRuleListStoreRemoveFailed WKErrorCode = 8
	// WKErrorContentRuleListStoreVersionMismatch: An error that indicates the rule list version is outdated and cannot be read.
	WKErrorContentRuleListStoreVersionMismatch WKErrorCode = 9
	// WKErrorCredentialNotFound: An error that indicates the system could not find a passkey during an export.
	WKErrorCredentialNotFound WKErrorCode = 17
	// WKErrorDuplicateCredential: An error that indicates the system found a duplicate passkey during an import.
	WKErrorDuplicateCredential WKErrorCode = 15
	// WKErrorJavaScriptAppBoundDomain: An error that indicates JavaScript execution failed due to an app-bound domain restriction.
	WKErrorJavaScriptAppBoundDomain WKErrorCode = 14
	// WKErrorJavaScriptExceptionOccurred: An error that indicates a JavaScript exception occurred.
	WKErrorJavaScriptExceptionOccurred WKErrorCode = 4
	// WKErrorJavaScriptInvalidFrameTarget: An error that indicates your content referenced an invalid web frame.
	WKErrorJavaScriptInvalidFrameTarget WKErrorCode = 12
	// WKErrorJavaScriptResultTypeIsUnsupported: An error that indicates the result of JavaScript execution could not be returned.
	WKErrorJavaScriptResultTypeIsUnsupported WKErrorCode = 5
	// WKErrorMalformedCredential: An error that indicates the system could not parse passkey data during an import.
	WKErrorMalformedCredential WKErrorCode = 16
	// WKErrorNavigationAppBoundDomain: An error that indicates navigation failed due to an app-bound domain restriction.
	WKErrorNavigationAppBoundDomain WKErrorCode = 13
	// WKErrorUnknown: An error that indicates an unknown issue occurred.
	WKErrorUnknown WKErrorCode = 1
	// WKErrorWebContentProcessTerminated: An error that indicates the web process that contains the content is no longer running.
	WKErrorWebContentProcessTerminated WKErrorCode = 2
	// WKErrorWebViewInvalidated: An error that indicates the web view was invalidated.
	WKErrorWebViewInvalidated WKErrorCode = 3
)

func (WKErrorCode) String

func (e WKErrorCode) String() string

type WKFindConfiguration

type WKFindConfiguration struct {
	objectivec.Object
}

The configuration parameters to use when searching the contents of the web view.

Overview

Create a WKFindConfiguration object and configure its attributes to specify how to perform searches within the web view’s contents. To initiate a search, call the appropriate method of WKWebView and pass this object along with the search string.

Configuring the Search Parameters

See: https://developer.apple.com/documentation/WebKit/WKFindConfiguration

func NewFindConfiguration deprecated

func NewFindConfiguration() WKFindConfiguration

Deprecated: Use NewWKFindConfiguration instead.

func NewWKFindConfiguration

func NewWKFindConfiguration() WKFindConfiguration

NewWKFindConfiguration creates a new WKFindConfiguration instance.

func WKFindConfigurationFromID

func WKFindConfigurationFromID(id objc.ID) WKFindConfiguration

WKFindConfigurationFromID constructs a WKFindConfiguration from an objc.ID.

The configuration parameters to use when searching the contents of the web view.

func (WKFindConfiguration) Autorelease

func (f WKFindConfiguration) Autorelease() WKFindConfiguration

Autorelease adds the receiver to the current autorelease pool.

func (WKFindConfiguration) Backwards

func (f WKFindConfiguration) Backwards() bool

A Boolean value that indicates the search direction, relative to the current selection.

Discussion

When the value of this property is true, searches proceed backward from the current selection. When the value is false, searches proceed forward from the current selection. The default value of this property is false.

The web view respects the writing direction of its content. For example, a forward search moves right-to-left and top-to-bottom for a right-to-left language.

See: https://developer.apple.com/documentation/WebKit/WKFindConfiguration/backwards

func (WKFindConfiguration) CaseSensitive

func (f WKFindConfiguration) CaseSensitive() bool

A Boolean value that indicates whether to consider case when matching the search string.

Discussion

When the value of this property is true, the web view takes case into account when matching the search string. The default value of this property is false.

See: https://developer.apple.com/documentation/WebKit/WKFindConfiguration/caseSensitive

func (WKFindConfiguration) Init

Init initializes the instance.

func (WKFindConfiguration) SetBackwards

func (f WKFindConfiguration) SetBackwards(value bool)

func (WKFindConfiguration) SetCaseSensitive

func (f WKFindConfiguration) SetCaseSensitive(value bool)

func (WKFindConfiguration) SetWraps

func (f WKFindConfiguration) SetWraps(value bool)

func (WKFindConfiguration) Wraps

func (f WKFindConfiguration) Wraps() bool

A Boolean value that indicates whether the search wraps around to the other side of the page.

Discussion

When the value of this property is true, the search wraps and continues at the other end of the page. For example, when a forward search reaches the bottom of the page, the search wraps back to the top of the page and continues. When a backward search reaches the top of the page, the search wraps back to the bottom of the page. The default value of this property is true.

See: https://developer.apple.com/documentation/WebKit/WKFindConfiguration/wraps

type WKFindConfigurationClass

type WKFindConfigurationClass struct {
	// contains filtered or unexported fields
}

func GetWKFindConfigurationClass

func GetWKFindConfigurationClass() WKFindConfigurationClass

GetWKFindConfigurationClass returns the class object for WKFindConfiguration.

func (WKFindConfigurationClass) Alloc

Alloc allocates memory for a new instance of the class.

func (WKFindConfigurationClass) Class

func (wc WKFindConfigurationClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type WKFindResult

type WKFindResult struct {
	objectivec.Object
}

An object that contains the results of searching the web view’s contents.

Overview

When you perform a search using the methods of WKWebView, the web view creates a WKFindResult object and delivers it to your completion handler. You don’t create instances of this class directly. Use the objects that the web view provides to determine whether it found a match for the content.

Getting the Search Result

See: https://developer.apple.com/documentation/WebKit/WKFindResult

func NewFindResult deprecated

func NewFindResult() WKFindResult

Deprecated: Use NewWKFindResult instead.

func NewWKFindResult

func NewWKFindResult() WKFindResult

NewWKFindResult creates a new WKFindResult instance.

func WKFindResultFromID

func WKFindResultFromID(id objc.ID) WKFindResult

WKFindResultFromID constructs a WKFindResult from an objc.ID.

An object that contains the results of searching the web view’s contents.

func (WKFindResult) Autorelease

func (f WKFindResult) Autorelease() WKFindResult

Autorelease adds the receiver to the current autorelease pool.

func (WKFindResult) Init

func (f WKFindResult) Init() WKFindResult

Init initializes the instance.

func (WKFindResult) MatchFound

func (f WKFindResult) MatchFound() bool

A Boolean value that indicates whether the web view found a match during the search.

Discussion

The value of this property is true if the web view found a match, or false if it didn’t.

See: https://developer.apple.com/documentation/WebKit/WKFindResult/matchFound

type WKFindResultClass

type WKFindResultClass struct {
	// contains filtered or unexported fields
}

func GetWKFindResultClass

func GetWKFindResultClass() WKFindResultClass

GetWKFindResultClass returns the class object for WKFindResult.

func (WKFindResultClass) Alloc

func (wc WKFindResultClass) Alloc() WKFindResult

Alloc allocates memory for a new instance of the class.

func (WKFindResultClass) Class

func (wc WKFindResultClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type WKFindResultHandler

type WKFindResultHandler = func(*WKFindResult)

WKFindResultHandler handles The completion handler to call with the results of the search.

  • result: The object that contains the results of the search.

Used by:

type WKFrameInfo

type WKFrameInfo struct {
	objectivec.Object
}

An object that contains information about a frame on a webpage.

Overview

An instance of this class is a transient, data-only object; it does not uniquely identify a frame across multiple delegate method calls.

Inspecting frame information

See: https://developer.apple.com/documentation/WebKit/WKFrameInfo

func NewFrameInfo deprecated

func NewFrameInfo() WKFrameInfo

Deprecated: Use NewWKFrameInfo instead.

func NewWKFrameInfo

func NewWKFrameInfo() WKFrameInfo

NewWKFrameInfo creates a new WKFrameInfo instance.

func WKFrameInfoFromID

func WKFrameInfoFromID(id objc.ID) WKFrameInfo

WKFrameInfoFromID constructs a WKFrameInfo from an objc.ID.

An object that contains information about a frame on a webpage.

func (WKFrameInfo) Autorelease

func (f WKFrameInfo) Autorelease() WKFrameInfo

Autorelease adds the receiver to the current autorelease pool.

func (WKFrameInfo) Init

func (f WKFrameInfo) Init() WKFrameInfo

Init initializes the instance.

func (WKFrameInfo) IsMainFrame added in v0.6.5

func (f WKFrameInfo) IsMainFrame() bool

A Boolean value indicating whether the frame is the web site’s main frame or a subframe.

See: https://developer.apple.com/documentation/WebKit/WKFrameInfo/isMainFrame

func (WKFrameInfo) Request

func (f WKFrameInfo) Request() foundation.NSURLRequest

The frame’s current request.

See: https://developer.apple.com/documentation/WebKit/WKFrameInfo/request

func (WKFrameInfo) SecurityOrigin

func (f WKFrameInfo) SecurityOrigin() IWKSecurityOrigin

The frame’s security origin.

Discussion

The WKSecurityOrigin object consists of a host name, a protocol, and a port number.

See: https://developer.apple.com/documentation/WebKit/WKFrameInfo/securityOrigin

func (WKFrameInfo) WebView

func (f WKFrameInfo) WebView() IWKWebView

The web view that contains this frame and the containing webpage.

See: https://developer.apple.com/documentation/WebKit/WKFrameInfo/webView

type WKFrameInfoClass

type WKFrameInfoClass struct {
	// contains filtered or unexported fields
}

func GetWKFrameInfoClass

func GetWKFrameInfoClass() WKFrameInfoClass

GetWKFrameInfoClass returns the class object for WKFrameInfo.

func (WKFrameInfoClass) Alloc

func (wc WKFrameInfoClass) Alloc() WKFrameInfo

Alloc allocates memory for a new instance of the class.

func (WKFrameInfoClass) Class

func (wc WKFrameInfoClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type WKFullscreenState

type WKFullscreenState int

See: https://developer.apple.com/documentation/WebKit/WKWebView/FullscreenState-swift.enum

const (
	WKFullscreenStateEnteringFullscreen WKFullscreenState = 1
	WKFullscreenStateExitingFullscreen  WKFullscreenState = 3
	WKFullscreenStateInFullscreen       WKFullscreenState = 2
	WKFullscreenStateNotInFullscreen    WKFullscreenState = 0
)

func (WKFullscreenState) String

func (e WKFullscreenState) String() string

type WKHTTPCookieStore

type WKHTTPCookieStore struct {
	objectivec.Object
}

An object that manages the HTTP cookies associated with a particular web view.

Overview

Use a WKHTTPCookieStore to specify the initial cookies for your webpages, and to manage cookies for your web content. For example, you might use this object to delete the cookie for the current session when the user logs out. To detect when the webpage changes a cookie, install a cookie observer using the WKHTTPCookieStore.AddObserver method.

You don’t create a WKHTTPCookieStore object directly. Instead, retrieve this object from the WKWebsiteDataStore object in your web view’s configuration object.

Managing cookies

Instance Methods

See: https://developer.apple.com/documentation/WebKit/WKHTTPCookieStore

func NewHTTPCookieStore deprecated

func NewHTTPCookieStore() WKHTTPCookieStore

Deprecated: Use NewWKHTTPCookieStore instead.

func NewWKHTTPCookieStore

func NewWKHTTPCookieStore() WKHTTPCookieStore

NewWKHTTPCookieStore creates a new WKHTTPCookieStore instance.

func WKHTTPCookieStoreFromID

func WKHTTPCookieStoreFromID(id objc.ID) WKHTTPCookieStore

WKHTTPCookieStoreFromID constructs a WKHTTPCookieStore from an objc.ID.

An object that manages the HTTP cookies associated with a particular web view.

func (WKHTTPCookieStore) AddObserver

func (h WKHTTPCookieStore) AddObserver(observer WKHTTPCookieStoreObserver)

Adds an observer to the cookie store.

observer: The observer object to add. The cookie store doesn’t maintain a strong reference to the object you specify. You are responsible for removing your observer object before it becomes invalid.

See: https://developer.apple.com/documentation/WebKit/WKHTTPCookieStore/add(_:)

func (WKHTTPCookieStore) Autorelease

func (h WKHTTPCookieStore) Autorelease() WKHTTPCookieStore

Autorelease adds the receiver to the current autorelease pool.

func (WKHTTPCookieStore) DeleteCookie

func (h WKHTTPCookieStore) DeleteCookie(ctx context.Context, cookie foundation.NSHTTPCookie) error

DeleteCookie is a synchronous wrapper around WKHTTPCookieStore.DeleteCookieCompletionHandler. It blocks until the completion handler fires or the context is cancelled.

func (WKHTTPCookieStore) DeleteCookieCompletionHandler

func (h WKHTTPCookieStore) DeleteCookieCompletionHandler(cookie foundation.NSHTTPCookie, completionHandler VoidHandler)

Deletes the specified cookie.

cookie: The cookie to delete.

completionHandler: A completion handler block to execute asynchronously after the method successfully deletes the cookie. This block has no return value and no parameters.

See: https://developer.apple.com/documentation/WebKit/WKHTTPCookieStore/delete(_:completionHandler:)

func (WKHTTPCookieStore) GetAllCookies added in v0.6.10

func (h WKHTTPCookieStore) GetAllCookies(completionHandler NSHTTPCookieArrayHandler)

Fetches all stored cookies asynchronously and delivers them to the specified completion handler.

completionHandler: A completion handler block to execute asynchronously with the results. This block has no return value and takes the following parameter:

cookieArray: An array of HTTPCookie objects. If the store contains no cookies, this parameter contains an empty array.

Discussion

Use this method to get the set of cookies currently associated with your web view. Iterate over the contents of the provided array to retrieve the specific cookie you need for your code.

See: https://developer.apple.com/documentation/WebKit/WKHTTPCookieStore/getAllCookies(_:)

func (WKHTTPCookieStore) GetAllCookiesSync added in v0.6.10

func (h WKHTTPCookieStore) GetAllCookiesSync(ctx context.Context) ([]foundation.NSHTTPCookie, error)

GetAllCookiesSync is a synchronous wrapper around WKHTTPCookieStore.GetAllCookies. It blocks until the completion handler fires or the context is cancelled.

func (WKHTTPCookieStore) GetCookiePolicy

func (h WKHTTPCookieStore) GetCookiePolicy(completionHandler WKCookiePolicyHandler)

Returns a cookie policy that indicates whether the cookie store allows cookie storage.

completionHandler: The completion handler block to execute asynchronously with the cookie policy. This block has no return value, and takes the following parameter:

cookiePolicy: A WKHTTPCookieStore.CookiePolicy case that indicates whether the cookie store allows cookie storage.

See: https://developer.apple.com/documentation/WebKit/WKHTTPCookieStore/getCookiePolicy(_:)

func (WKHTTPCookieStore) GetCookiePolicySync

func (h WKHTTPCookieStore) GetCookiePolicySync(ctx context.Context) (int, error)

GetCookiePolicySync is a synchronous wrapper around WKHTTPCookieStore.GetCookiePolicy. It blocks until the completion handler fires or the context is cancelled.

func (WKHTTPCookieStore) Init

Init initializes the instance.

func (WKHTTPCookieStore) RemoveObserver

func (h WKHTTPCookieStore) RemoveObserver(observer WKHTTPCookieStoreObserver)

Removes an observer from the cookie store.

observer: The observer object to remove.

See: https://developer.apple.com/documentation/WebKit/WKHTTPCookieStore/remove(_:)

func (WKHTTPCookieStore) SetCookie

func (h WKHTTPCookieStore) SetCookie(ctx context.Context, cookie foundation.NSHTTPCookie) error

SetCookie is a synchronous wrapper around WKHTTPCookieStore.SetCookieCompletionHandler. It blocks until the completion handler fires or the context is cancelled.

func (WKHTTPCookieStore) SetCookieCompletionHandler

func (h WKHTTPCookieStore) SetCookieCompletionHandler(cookie foundation.NSHTTPCookie, completionHandler VoidHandler)

Adds a cookie to the cookie store.

cookie: The cookie to add.

completionHandler: A completion handler block to execute asynchronously after the method successfully stores the cookie. This block has no return value and no parameters.

See: https://developer.apple.com/documentation/WebKit/WKHTTPCookieStore/setCookie(_:completionHandler:)

func (WKHTTPCookieStore) SetCookiePolicy

func (h WKHTTPCookieStore) SetCookiePolicy(ctx context.Context, policy WKCookiePolicy) error

SetCookiePolicy is a synchronous wrapper around WKHTTPCookieStore.SetCookiePolicyCompletionHandler. It blocks until the completion handler fires or the context is cancelled.

func (WKHTTPCookieStore) SetCookiePolicyCompletionHandler

func (h WKHTTPCookieStore) SetCookiePolicyCompletionHandler(policy WKCookiePolicy, completionHandler VoidHandler)

Sets a cookie policy that indicates whether the cookie store allows cookie storage.

policy: A cookie policy that indicates whether the cookie store allows cookie storage.

completionHandler: A block the system invokes after it sets the cookie policy.

See: https://developer.apple.com/documentation/WebKit/WKHTTPCookieStore/setCookiePolicy(_:completionHandler:)

func (WKHTTPCookieStore) SetCookiesCompletionHandler

func (h WKHTTPCookieStore) SetCookiesCompletionHandler(cookies []foundation.NSHTTPCookie, completionHandler VoidHandler)

cookies: An array of cookies to set.

completionHandler: A block to invoke once the cookies have been stored.

Discussion

Set multiple cookies.

See: https://developer.apple.com/documentation/WebKit/WKHTTPCookieStore/setCookies(_:completionHandler:)

type WKHTTPCookieStoreClass

type WKHTTPCookieStoreClass struct {
	// contains filtered or unexported fields
}

func GetWKHTTPCookieStoreClass

func GetWKHTTPCookieStoreClass() WKHTTPCookieStoreClass

GetWKHTTPCookieStoreClass returns the class object for WKHTTPCookieStore.

func (WKHTTPCookieStoreClass) Alloc

Alloc allocates memory for a new instance of the class.

func (WKHTTPCookieStoreClass) Class

func (wc WKHTTPCookieStoreClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type WKHTTPCookieStoreObserver

type WKHTTPCookieStoreObserver interface {
	objectivec.IObject
}

The methods to adopt in an object that monitors changes to a webpage’s cookies.

See: https://developer.apple.com/documentation/WebKit/WKHTTPCookieStoreObserver

type WKHTTPCookieStoreObserverObject

type WKHTTPCookieStoreObserverObject struct {
	objectivec.Object
}

WKHTTPCookieStoreObserverObject wraps an existing Objective-C object that conforms to the WKHTTPCookieStoreObserver protocol.

func WKHTTPCookieStoreObserverObjectFromID

func WKHTTPCookieStoreObserverObjectFromID(id objc.ID) WKHTTPCookieStoreObserverObject

WKHTTPCookieStoreObserverObjectFromID constructs a WKHTTPCookieStoreObserverObject from an objc.ID. The object is determined to conform to the protocol at runtime.

func (WKHTTPCookieStoreObserverObject) BaseObject

func (WKHTTPCookieStoreObserverObject) CookiesDidChangeInCookieStore

func (o WKHTTPCookieStoreObserverObject) CookiesDidChangeInCookieStore(cookieStore IWKHTTPCookieStore)

Tells the delegate that the cookies in the specified cookie store changed.

cookieStore: The cookie store that contains the modified cookies.

Discussion

When the value of a cookie changes, the cookie store calls this method on all registered observer objects. Use this method to fetch the new cookie values and update any app-specific data structures or JavaScript environment variables that use those values.

See: https://developer.apple.com/documentation/WebKit/WKHTTPCookieStoreObserver/cookiesDidChange(in:)

type WKInactiveSchedulingPolicy

type WKInactiveSchedulingPolicy int

See: https://developer.apple.com/documentation/WebKit/WKPreferences/InactiveSchedulingPolicy-swift.enum

const (
	// WKInactiveSchedulingPolicyNone: A policy where a web view that’s not in a window runs tasks normally.
	WKInactiveSchedulingPolicyNone WKInactiveSchedulingPolicy = 2
	// WKInactiveSchedulingPolicySuspend: A policy where a web view that’s not in a window fully suspends tasks.
	WKInactiveSchedulingPolicySuspend WKInactiveSchedulingPolicy = 0
	// WKInactiveSchedulingPolicyThrottle: A policy where a web view that’s not in a window limits processing, but does not fully suspend tasks.
	WKInactiveSchedulingPolicyThrottle WKInactiveSchedulingPolicy = 1
)

func (WKInactiveSchedulingPolicy) String

type WKMediaCaptureState

type WKMediaCaptureState int

See: https://developer.apple.com/documentation/WebKit/WKMediaCaptureState

const (
	// WKMediaCaptureStateActive: The media device is actively capturing audio or video.
	WKMediaCaptureStateActive WKMediaCaptureState = 1
	// WKMediaCaptureStateMuted: The media device is muted, and not actively capturing audio or video.
	WKMediaCaptureStateMuted WKMediaCaptureState = 2
	// WKMediaCaptureStateNone: The media device is off.
	WKMediaCaptureStateNone WKMediaCaptureState = 0
)

func (WKMediaCaptureState) String

func (e WKMediaCaptureState) String() string

type WKMediaCaptureType

type WKMediaCaptureType int

See: https://developer.apple.com/documentation/WebKit/WKMediaCaptureType

const (
	// WKMediaCaptureTypeCamera: A media device that can capture video.
	WKMediaCaptureTypeCamera WKMediaCaptureType = 0
	// WKMediaCaptureTypeCameraAndMicrophone: A media device or devices that can capture audio and video.
	WKMediaCaptureTypeCameraAndMicrophone WKMediaCaptureType = 2
	// WKMediaCaptureTypeMicrophone: A media device that can capture audio.
	WKMediaCaptureTypeMicrophone WKMediaCaptureType = 1
)

func (WKMediaCaptureType) String

func (e WKMediaCaptureType) String() string

type WKMediaPlaybackState

type WKMediaPlaybackState int

See: https://developer.apple.com/documentation/WebKit/WKMediaPlaybackState

const (
	// WKMediaPlaybackStateNone: There is no media to play back.
	WKMediaPlaybackStateNone WKMediaPlaybackState = 0
	// WKMediaPlaybackStatePaused: The media playback is paused.
	WKMediaPlaybackStatePaused WKMediaPlaybackState = 2
	// WKMediaPlaybackStatePlaying: The media is playing.
	WKMediaPlaybackStatePlaying WKMediaPlaybackState = 1
	// WKMediaPlaybackStateSuspended: The media is not playing, and cannot be resumed until the user revokes the suspension.
	WKMediaPlaybackStateSuspended WKMediaPlaybackState = 3
)

func (WKMediaPlaybackState) String

func (e WKMediaPlaybackState) String() string

type WKMediaPlaybackStateHandler

type WKMediaPlaybackStateHandler = func(int)

WKMediaPlaybackStateHandler handles A closure the system executes after the web view determines the current state of media playback.

Used by:

type WKNavigation

type WKNavigation struct {
	objectivec.Object
}

An object that tracks the loading progress of a webpage.

Overview

A WKNavigation object uniquely identifies a load request for a webpage. When you ask a web view to load content or navigate to a page, the web view returns a WKNavigation object that identifies your request. As the load operation progresses, the web view reports progress of that operation to various methods of its navigation delegate, passing them the matching WKNavigation object.

Getting the Content Mode

See: https://developer.apple.com/documentation/WebKit/WKNavigation

func NewNavigation deprecated

func NewNavigation() WKNavigation

Deprecated: Use NewWKNavigation instead.

func NewWKNavigation

func NewWKNavigation() WKNavigation

NewWKNavigation creates a new WKNavigation instance.

func WKNavigationFromID

func WKNavigationFromID(id objc.ID) WKNavigation

WKNavigationFromID constructs a WKNavigation from an objc.ID.

An object that tracks the loading progress of a webpage.

func (WKNavigation) Autorelease

func (n WKNavigation) Autorelease() WKNavigation

Autorelease adds the receiver to the current autorelease pool.

func (WKNavigation) EffectiveContentMode

func (n WKNavigation) EffectiveContentMode() WKContentMode

The content mode WebKit uses to load the webpage.

See: https://developer.apple.com/documentation/WebKit/WKNavigation/effectiveContentMode

func (WKNavigation) Init

func (n WKNavigation) Init() WKNavigation

Init initializes the instance.

type WKNavigationAction

type WKNavigationAction struct {
	objectivec.Object
}

An object that contains information about an action that causes navigation to occur.

Overview

Use a WKNavigationAction object to make policy decisions about whether to allow navigation within your app’s web view. You don’t create WKNavigationAction objects directly. Instead, the web view creates them and delivers them to the appropriate delegate objects. Use the methods of your delegate to analyze the action and determine whether to allow the resulting navigation to occur.

Getting the navigation type

Inspecting navigation information

Inspecting user actions

Instance Properties

See: https://developer.apple.com/documentation/WebKit/WKNavigationAction

func NewNavigationAction deprecated

func NewNavigationAction() WKNavigationAction

Deprecated: Use NewWKNavigationAction instead.

func NewWKNavigationAction

func NewWKNavigationAction() WKNavigationAction

NewWKNavigationAction creates a new WKNavigationAction instance.

func WKNavigationActionFromID

func WKNavigationActionFromID(id objc.ID) WKNavigationAction

WKNavigationActionFromID constructs a WKNavigationAction from an objc.ID.

An object that contains information about an action that causes navigation to occur.

func (WKNavigationAction) Autorelease

func (n WKNavigationAction) Autorelease() WKNavigationAction

Autorelease adds the receiver to the current autorelease pool.

func (WKNavigationAction) ButtonNumber

func (n WKNavigationAction) ButtonNumber() int

The number of the mouse button that caused the navigation request.

See: https://developer.apple.com/documentation/WebKit/WKNavigationAction/buttonNumber

func (WKNavigationAction) Init

Init initializes the instance.

func (WKNavigationAction) IsContentRuleListRedirect

func (n WKNavigationAction) IsContentRuleListRedirect() bool

Discussion

Whether or not the navigation is a redirect from a content rule list.

See: https://developer.apple.com/documentation/WebKit/WKNavigationAction/isContentRuleListRedirect

func (WKNavigationAction) ModifierFlags

The modifier keys that were pressed at the time of the navigation request.

See: https://developer.apple.com/documentation/WebKit/WKNavigationAction/modifierFlags

func (WKNavigationAction) NavigationType

func (n WKNavigationAction) NavigationType() WKNavigationType

The type of action that triggered the navigation.

Discussion

The value is one of the constants of the enumerated type WKNavigationType.

See: https://developer.apple.com/documentation/WebKit/WKNavigationAction/navigationType

func (WKNavigationAction) Request

The URL request object associated with the navigation action.

See: https://developer.apple.com/documentation/WebKit/WKNavigationAction/request

func (WKNavigationAction) ShouldPerformDownload

func (n WKNavigationAction) ShouldPerformDownload() bool

A Boolean value that indicates whether the web content provided an attribute that indicates a download.

See: https://developer.apple.com/documentation/WebKit/WKNavigationAction/shouldPerformDownload

func (WKNavigationAction) SourceFrame

func (n WKNavigationAction) SourceFrame() IWKFrameInfo

The frame that requested the navigation.

See: https://developer.apple.com/documentation/WebKit/WKNavigationAction/sourceFrame

func (WKNavigationAction) TargetFrame

func (n WKNavigationAction) TargetFrame() IWKFrameInfo

The frame in which to display the new content.

Discussion

If the target of the navigation is a new window, this property is `nil`.

See: https://developer.apple.com/documentation/WebKit/WKNavigationAction/targetFrame

type WKNavigationActionClass

type WKNavigationActionClass struct {
	// contains filtered or unexported fields
}

func GetWKNavigationActionClass

func GetWKNavigationActionClass() WKNavigationActionClass

GetWKNavigationActionClass returns the class object for WKNavigationAction.

func (WKNavigationActionClass) Alloc

Alloc allocates memory for a new instance of the class.

func (WKNavigationActionClass) Class

func (wc WKNavigationActionClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type WKNavigationActionPolicy

type WKNavigationActionPolicy int

See: https://developer.apple.com/documentation/WebKit/WKNavigationActionPolicy

const (
	// WKNavigationActionPolicyAllow: Allow the navigation to continue.
	WKNavigationActionPolicyAllow WKNavigationActionPolicy = 1
	// WKNavigationActionPolicyCancel: Cancel the navigation.
	WKNavigationActionPolicyCancel WKNavigationActionPolicy = 0
	// WKNavigationActionPolicyDownload: Allow the download to proceed.
	WKNavigationActionPolicyDownload WKNavigationActionPolicy = 2
)

func (WKNavigationActionPolicy) String

func (e WKNavigationActionPolicy) String() string

type WKNavigationActionPolicyHandler

type WKNavigationActionPolicyHandler = func(int)

WKNavigationActionPolicyHandler handles A completion handler block to call with the results about whether to allow or cancel the navigation.

Used by:

  • [WKNavigationDelegate.WebViewDecidePolicyForNavigationActionDecisionHandler]

type WKNavigationClass

type WKNavigationClass struct {
	// contains filtered or unexported fields
}

func GetWKNavigationClass

func GetWKNavigationClass() WKNavigationClass

GetWKNavigationClass returns the class object for WKNavigation.

func (WKNavigationClass) Alloc

func (wc WKNavigationClass) Alloc() WKNavigation

Alloc allocates memory for a new instance of the class.

func (WKNavigationClass) Class

func (wc WKNavigationClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type WKNavigationDelegate

type WKNavigationDelegate interface {
	objectivec.IObject
}

Methods for accepting or rejecting navigation changes, and for tracking the progress of navigation requests.

See: https://developer.apple.com/documentation/WebKit/WKNavigationDelegate

type WKNavigationDelegateConfig

type WKNavigationDelegateConfig struct {

	// Tracking the load progress of a request
	// WebViewDidStartProvisionalNavigation — Tells the delegate that navigation from the main frame has started.
	WebViewDidStartProvisionalNavigation func(webView WKWebView, navigation WKNavigation)
	// WebViewDidReceiveServerRedirectForProvisionalNavigation — Tells the delegate that the web view received a server redirect for a request.
	WebViewDidReceiveServerRedirectForProvisionalNavigation func(webView WKWebView, navigation WKNavigation)

	// Responding to navigation errors
	// WebViewDidFailProvisionalNavigationWithError — Tells the delegate that an error occurred during the early navigation process.
	WebViewDidFailProvisionalNavigationWithError func(webView WKWebView, navigation WKNavigation, error_ foundation.NSError)
	// WebViewWebContentProcessDidTerminate — Tells the delegate that the web view’s content process was terminated.
	WebViewWebContentProcessDidTerminate func(webView WKWebView)

	// Other Methods
	// WebViewDidCommitNavigation — Tells the delegate that the web view has started to receive content for the main frame.
	WebViewDidCommitNavigation func(webView WKWebView, navigation WKNavigation)
	// WebViewDidFinishNavigation — Tells the delegate that navigation is complete.
	WebViewDidFinishNavigation func(webView WKWebView, navigation WKNavigation)
	// WebViewDidFailNavigationWithError — Tells the delegate that an error occurred during navigation.
	WebViewDidFailNavigationWithError func(webView WKWebView, navigation WKNavigation, error_ foundation.NSError)
	// WebViewNavigationResponseDidBecomeDownload — Tells the delegate that a navigation response became a download.
	WebViewNavigationResponseDidBecomeDownload func(webView WKWebView, navigationResponse WKNavigationResponse, download WKDownload)
	// WebViewNavigationActionDidBecomeDownload — Tells the delegate that a navigation action became a download.
	WebViewNavigationActionDidBecomeDownload func(webView WKWebView, navigationAction WKNavigationAction, download WKDownload)
}

WKNavigationDelegateConfig holds optional typed callbacks for WKNavigationDelegate methods. Set non-nil fields to register the corresponding Objective-C delegate method. Methods with nil callbacks are not registered, so [NSObject.RespondsToSelector] returns false for them — matching the Objective-C delegate pattern exactly.

See Apple Documentation for protocol details.

type WKNavigationDelegateObject

type WKNavigationDelegateObject struct {
	objectivec.Object
}

WKNavigationDelegateObject wraps an existing Objective-C object that conforms to the WKNavigationDelegate protocol.

func NewWKNavigationDelegate

func NewWKNavigationDelegate(config WKNavigationDelegateConfig) WKNavigationDelegateObject

NewWKNavigationDelegate creates an Objective-C object implementing the WKNavigationDelegate protocol.

The object implements only the methods set in config, so [NSObject.RespondsToSelector] reports optional delegate methods accurately. Objects with the same set of methods share one Objective-C class, registered on first use, so creating many of them costs no class or callback registration. The caller owns the returned object; config is dropped when it deallocates.

The returned WKNavigationDelegateObject satisfies the WKNavigationDelegate interface and can be passed directly to SetDelegate and similar methods.

See Apple Documentation for protocol details.

func WKNavigationDelegateObjectFromID

func WKNavigationDelegateObjectFromID(id objc.ID) WKNavigationDelegateObject

WKNavigationDelegateObjectFromID constructs a WKNavigationDelegateObject from an objc.ID. The object is determined to conform to the protocol at runtime.

func (WKNavigationDelegateObject) BaseObject

func (WKNavigationDelegateObject) WebViewAuthenticationChallengeShouldAllowDeprecatedTLS

func (o WKNavigationDelegateObject) WebViewAuthenticationChallengeShouldAllowDeprecatedTLS(webView IWKWebView, challenge foundation.NSURLAuthenticationChallenge, decisionHandler BoolHandler)

Asks the delegate whether to continue with a connection that uses a deprecated version of TLS.

webView: The web view that receives the authentication challenge.

challenge: The authentication challenge.

decisionHandler: The completion handler block to execute with the decision. This handler has no return value and takes the following parameter:

decision: A Boolean value that indicates whether to continue to use a deprecated version of TLS. Specify true to continue, or false to reject the connection.

Discussion

If you don’t implement this method, the web view uses system settings to determine whether to allow the use of deprecated versions of TLS.

See: https://developer.apple.com/documentation/WebKit/WKNavigationDelegate/webView(_:authenticationChallenge:shouldAllowDeprecatedTLS:)

func (WKNavigationDelegateObject) WebViewDecidePolicyForNavigationActionDecisionHandler

func (o WKNavigationDelegateObject) WebViewDecidePolicyForNavigationActionDecisionHandler(webView IWKWebView, navigationAction IWKNavigationAction, decisionHandler WKNavigationActionPolicyHandler)

Asks the delegate for permission to navigate to new content based on the specified action information.

webView: The web view from which the navigation request began.

navigationAction: Details about the action that triggered the navigation request.

decisionHandler: A completion handler block to call with the results about whether to allow or cancel the navigation. This handler has no return value and takes the following parameter:

policy: A constant that indicates whether to cancel or allow the navigation. For a list of possible values, see WKNavigationActionPolicy.

Discussion

Use this method to allow or deny a navigation request that originated with the specified action. The web view calls this method after the interaction occurs but before it attempts to load any content. If you implement this method, always execute the `decisionHandler` block at some point. You may execute it synchronously from your delegate method’s implementation, or execute it asynchronously after your method returns.

If your delegate object implements the [WebViewDecidePolicyForNavigationActionPreferencesDecisionHandler] method, the web view doesn’t call this method.

See: https://developer.apple.com/documentation/WebKit/WKNavigationDelegate/webView(_:decidePolicyFor:decisionHandler:)-2ni62

func (WKNavigationDelegateObject) WebViewDecidePolicyForNavigationActionPreferencesDecisionHandler

func (o WKNavigationDelegateObject) WebViewDecidePolicyForNavigationActionPreferencesDecisionHandler(webView IWKWebView, navigationAction IWKNavigationAction, preferences IWKWebpagePreferences, decisionHandler IntWKWebpagePreferencesHandler)

Asks the delegate for permission to navigate to new content based on the specified preferences and action information.

webView: The web view from which the navigation request began.

navigationAction: Details about the action that triggered the navigation request.

preferences: The default preferences to use when displaying the new webpage. Specify the default preferences for pages using the WKWebViewConfiguration.DefaultWebpagePreferences property of WKWebViewConfiguration when you create your web view.

decisionHandler: A completion handler block to call with the results about whether to allow or cancel the navigation. This handler has no return value and takes the following parameters:

policy: A constant that indicates whether to cancel or allow the navigation. For a list of possible values, see WKNavigationActionPolicy. preferences: The set of preferences to apply to the page if the navigation is allowed. You may pass the object from the `preferences` parameter or configure a new preferences object and pass it instead.

Discussion

Use this method to allow or deny a navigation request that originated with the specified action. The web view calls this method after the interaction occurs but before it attempts to load any content. If you implement this method, always execute the `decisionHandler` block at some point. You may execute it synchronously from your delegate method’s implementation, or execute it asynchronously after your method returns.

If your delegate object implements this method, the web view doesn’t call the [WebViewDecidePolicyForNavigationResponseDecisionHandler] method.

See: https://developer.apple.com/documentation/WebKit/WKNavigationDelegate/webView(_:decidePolicyFor:preferences:decisionHandler:)

func (WKNavigationDelegateObject) WebViewDecidePolicyForNavigationResponseDecisionHandler

func (o WKNavigationDelegateObject) WebViewDecidePolicyForNavigationResponseDecisionHandler(webView IWKWebView, navigationResponse IWKNavigationResponse, decisionHandler WKNavigationResponsePolicyHandler)

Asks the delegate for permission to navigate to new content after the response to the navigation request is known.

webView: The web view from which the navigation request began.

navigationResponse: Descriptive information about the navigation response.

decisionHandler: A completion handler block to call with the results about whether to allow or cancel the navigation. This handler has no return value and takes the following parameter:

policy: A constant that indicates whether to cancel or allow the navigation. For a list of possible values, see WKNavigationResponsePolicy.

Discussion

Use this method to allow or deny a navigation request after the web view receives the response to its original URL request. The `navigationResponse` parameter contains the details of the response, including the type of data that the response contains. If you implement this method, always execute the `decisionHandler` block at some point. You may execute it synchronously from your delegate method’s implementation, or execute it asynchronously after your method returns.

See: https://developer.apple.com/documentation/WebKit/WKNavigationDelegate/webView(_:decidePolicyFor:decisionHandler:)-19mn2

func (WKNavigationDelegateObject) WebViewDidCommitNavigation

func (o WKNavigationDelegateObject) WebViewDidCommitNavigation(webView IWKWebView, navigation IWKNavigation)

Tells the delegate that the web view has started to receive content for the main frame.

webView: The web view that is loading the content.

navigation: The navigation object that uniquely identifies the load request.

Discussion

After the navigation delegate’s [WebViewDecidePolicyForNavigationResponseDecisionHandler] method approves the navigation response, the web view begins processing it. As changes become ready, the web view calls this method immediately before it starts to update the main frame.

See: https://developer.apple.com/documentation/WebKit/WKNavigationDelegate/webView(_:didCommit:)

func (WKNavigationDelegateObject) WebViewDidFailNavigationWithError

func (o WKNavigationDelegateObject) WebViewDidFailNavigationWithError(webView IWKWebView, navigation IWKNavigation, error_ foundation.NSError)

Tells the delegate that an error occurred during navigation.

webView: The web view that reported the error.

navigation: The navigation object for the operation. This object corresponds to a WKNavigation object that WebKit returned when the load operation began. You use it to track the progress of that operation.

error: The error that occurred.

See: https://developer.apple.com/documentation/WebKit/WKNavigationDelegate/webView(_:didFail:withError:)

func (WKNavigationDelegateObject) WebViewDidFailProvisionalNavigationWithError

func (o WKNavigationDelegateObject) WebViewDidFailProvisionalNavigationWithError(webView IWKWebView, navigation IWKNavigation, error_ foundation.NSError)

Tells the delegate that an error occurred during the early navigation process.

webView: The web view that called the delegate method.

navigation: The navigation object for the operation. This object corresponds to a WKNavigation object that WebKit returned when the load operation began. You use it to track the progress of that operation.

error: The error that occurred.

See: https://developer.apple.com/documentation/WebKit/WKNavigationDelegate/webView(_:didFailProvisionalNavigation:withError:)

func (WKNavigationDelegateObject) WebViewDidFinishNavigation

func (o WKNavigationDelegateObject) WebViewDidFinishNavigation(webView IWKWebView, navigation IWKNavigation)

Tells the delegate that navigation is complete.

webView: The web view that loaded the content.

navigation: The navigation object that finished.

See: https://developer.apple.com/documentation/WebKit/WKNavigationDelegate/webView(_:didFinish:)

func (WKNavigationDelegateObject) WebViewDidReceiveAuthenticationChallengeCompletionHandler

func (o WKNavigationDelegateObject) WebViewDidReceiveAuthenticationChallengeCompletionHandler(webView IWKWebView, challenge foundation.NSURLAuthenticationChallenge, completionHandler IntURLCredentialHandler)

Asks the delegate to respond to an authentication challenge.

webView: The web view that receives the authentication challenge.

challenge: The authentication challenge.

completionHandler: A completion handler block to execute with the response. This handler has no return value and takes the following parameters:

disposition: The option to use to handle the challenge. For a list of options, see URLSession.AuthChallengeDisposition. credential: The credential to use for authentication when the `disposition` parameter contains the value URLSession.AuthChallengeDisposition.useCredential. Specify `nil` to continue without a credential.

Discussion

If you don’t implement this method, the web view responds to the authentication challenge with the URLSession.AuthChallengeDisposition.rejectProtectionSpace disposition.

See: https://developer.apple.com/documentation/WebKit/WKNavigationDelegate/webView(_:didReceive:completionHandler:)

func (WKNavigationDelegateObject) WebViewDidReceiveServerRedirectForProvisionalNavigation

func (o WKNavigationDelegateObject) WebViewDidReceiveServerRedirectForProvisionalNavigation(webView IWKWebView, navigation IWKNavigation)

Tells the delegate that the web view received a server redirect for a request.

webView: The web view that is loading the content.

navigation: The navigation object that received a server redirect.

See: https://developer.apple.com/documentation/WebKit/WKNavigationDelegate/webView(_:didReceiveServerRedirectForProvisionalNavigation:)

func (WKNavigationDelegateObject) WebViewDidStartProvisionalNavigation

func (o WKNavigationDelegateObject) WebViewDidStartProvisionalNavigation(webView IWKWebView, navigation IWKNavigation)

Tells the delegate that navigation from the main frame has started.

webView: The web view that is loading the content.

navigation: The navigation object associated with the load request.

Discussion

The web view calls this method after it receives provisional approval to process a navigation request, but before it receives a response to that request.

See: https://developer.apple.com/documentation/WebKit/WKNavigationDelegate/webView(_:didStartProvisionalNavigation:)

func (WKNavigationDelegateObject) WebViewNavigationActionDidBecomeDownload

func (o WKNavigationDelegateObject) WebViewNavigationActionDidBecomeDownload(webView IWKWebView, navigationAction IWKNavigationAction, download IWKDownload)

Tells the delegate that a navigation action became a download.

webView: The web view in which the navigation action took place.

navigationAction: Descriptive information about the navigation response that turned into a download.

download: An object that represents the download of a web resource.

Discussion

Implement this method to begin tracking download progress.

See: https://developer.apple.com/documentation/WebKit/WKNavigationDelegate/webView(_:navigationAction:didBecome:)

func (WKNavigationDelegateObject) WebViewNavigationResponseDidBecomeDownload

func (o WKNavigationDelegateObject) WebViewNavigationResponseDidBecomeDownload(webView IWKWebView, navigationResponse IWKNavigationResponse, download IWKDownload)

Tells the delegate that a navigation response became a download.

webView: The web view in which the navigation response took place.

navigationResponse: Descriptive information about the navigation response that turned into a download.

download: An object that represents the download of a web resource.

Discussion

Implement this method to begin tracking download progress.

See: https://developer.apple.com/documentation/WebKit/WKNavigationDelegate/webView(_:navigationResponse:didBecome:)

func (WKNavigationDelegateObject) WebViewShouldGoToBackForwardListItemWillUseInstantBackCompletionHandler

func (o WKNavigationDelegateObject) WebViewShouldGoToBackForwardListItemWillUseInstantBackCompletionHandler(webView IWKWebView, backForwardListItem IWKBackForwardListItem, willUseInstantBack bool, completionHandler BoolHandler)

See: https://developer.apple.com/documentation/WebKit/WKNavigationDelegate/webView(_:shouldGoTo:willUseInstantBack:completionHandler:)

func (WKNavigationDelegateObject) WebViewWebContentProcessDidTerminate

func (o WKNavigationDelegateObject) WebViewWebContentProcessDidTerminate(webView IWKWebView)

Tells the delegate that the web view’s content process was terminated.

webView: The web view whose underlying web content process was terminated.

Discussion

Web views use a separate process to render and manage web content. WebKit calls this method when the process for the specified web view terminates for any reason.

See: https://developer.apple.com/documentation/WebKit/WKNavigationDelegate/webViewWebContentProcessDidTerminate(_:)

type WKNavigationResponse

type WKNavigationResponse struct {
	objectivec.Object
}

An object that contains the response to a navigation request, and which you use to make navigation-related policy decisions.

Overview

Use a WKNavigationResponse object to make policy decisions about whether to allow navigation within your app’s web view. You don’t create WKNavigationResponse objects directly. Instead, the web view creates them and delivers them to the appropriate delegate objects. Use the methods of your delegate to analyze the response and determine whether to allow the resulting navigation to occur.

Getting the Response Details

Getting Additional Response Information

See: https://developer.apple.com/documentation/WebKit/WKNavigationResponse

func NewNavigationResponse deprecated

func NewNavigationResponse() WKNavigationResponse

Deprecated: Use NewWKNavigationResponse instead.

func NewWKNavigationResponse

func NewWKNavigationResponse() WKNavigationResponse

NewWKNavigationResponse creates a new WKNavigationResponse instance.

func WKNavigationResponseFromID

func WKNavigationResponseFromID(id objc.ID) WKNavigationResponse

WKNavigationResponseFromID constructs a WKNavigationResponse from an objc.ID.

An object that contains the response to a navigation request, and which you use to make navigation-related policy decisions.

func (WKNavigationResponse) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (WKNavigationResponse) CanShowMIMEType

func (n WKNavigationResponse) CanShowMIMEType() bool

A Boolean value that indicates whether WebKit is capable of displaying the response’s MIME type natively.

Discussion

The value of this property is true if WebKit is able to display the MIME type.

See: https://developer.apple.com/documentation/WebKit/WKNavigationResponse/canShowMIMEType

func (WKNavigationResponse) Init

Init initializes the instance.

func (WKNavigationResponse) IsForMainFrame added in v0.6.5

func (n WKNavigationResponse) IsForMainFrame() bool

A Boolean value that indicates whether the response targets the web view’s main frame.

Discussion

The value of this property is true if the response targets the main frame. The value is false if the response targets a different frame, such as the frame in a new window.

See: https://developer.apple.com/documentation/WebKit/WKNavigationResponse/isForMainFrame

func (WKNavigationResponse) Response

The frame’s response.

Discussion

Allowing a navigation response with a MIME type that WebKit can’t display causes the navigation to fail.

See: https://developer.apple.com/documentation/WebKit/WKNavigationResponse/response

type WKNavigationResponseClass

type WKNavigationResponseClass struct {
	// contains filtered or unexported fields
}

func GetWKNavigationResponseClass

func GetWKNavigationResponseClass() WKNavigationResponseClass

GetWKNavigationResponseClass returns the class object for WKNavigationResponse.

func (WKNavigationResponseClass) Alloc

Alloc allocates memory for a new instance of the class.

func (WKNavigationResponseClass) Class

Class returns the underlying Objective-C class pointer.

type WKNavigationResponsePolicy

type WKNavigationResponsePolicy int

See: https://developer.apple.com/documentation/WebKit/WKNavigationResponsePolicy

const (
	// WKNavigationResponsePolicyAllow: Allow the navigation to continue.
	WKNavigationResponsePolicyAllow WKNavigationResponsePolicy = 1
	// WKNavigationResponsePolicyCancel: Cancel the navigation.
	WKNavigationResponsePolicyCancel WKNavigationResponsePolicy = 0
	// WKNavigationResponsePolicyDownload: Allow the download to proceed.
	WKNavigationResponsePolicyDownload WKNavigationResponsePolicy = 2
)

func (WKNavigationResponsePolicy) String

type WKNavigationResponsePolicyHandler

type WKNavigationResponsePolicyHandler = func(int)

WKNavigationResponsePolicyHandler handles A completion handler block to call with the results about whether to allow or cancel the navigation.

Used by:

  • [WKNavigationDelegate.WebViewDecidePolicyForNavigationResponseDecisionHandler]

type WKNavigationType

type WKNavigationType int

See: https://developer.apple.com/documentation/WebKit/WKNavigationType

const (
	// WKNavigationTypeBackForward: A request for the frame’s next or previous item.
	WKNavigationTypeBackForward WKNavigationType = 2
	// WKNavigationTypeFormResubmitted: A request to resubmit a form.
	WKNavigationTypeFormResubmitted WKNavigationType = 4
	// WKNavigationTypeFormSubmitted: A request to submit a form.
	WKNavigationTypeFormSubmitted WKNavigationType = 1
	// WKNavigationTypeLinkActivated: A link activation.
	WKNavigationTypeLinkActivated WKNavigationType = 0
	// WKNavigationTypeOther: A navigation request that originates for some other reason.
	WKNavigationTypeOther WKNavigationType = -1
	// WKNavigationTypeReload: A request to reload the webpage.
	WKNavigationTypeReload WKNavigationType = 3
)

func (WKNavigationType) String

func (e WKNavigationType) String() string

type WKOpenPanelParameters

type WKOpenPanelParameters struct {
	objectivec.Object
}

The configuration details of a file upload control in your web content.

Overview

Use a WKOpenPanelParameters to determine the configuration of a file upload control. You don’t create this object directly. Instead, a web view creates one and passes it to the [WebViewRunOpenPanelWithParametersInitiatedByFrameCompletionHandler] method of its UI delegate object when it displays a file upload control.

Configuring the panel parameters

See: https://developer.apple.com/documentation/WebKit/WKOpenPanelParameters

func NewOpenPanelParameters deprecated

func NewOpenPanelParameters() WKOpenPanelParameters

Deprecated: Use NewWKOpenPanelParameters instead.

func NewWKOpenPanelParameters

func NewWKOpenPanelParameters() WKOpenPanelParameters

NewWKOpenPanelParameters creates a new WKOpenPanelParameters instance.

func WKOpenPanelParametersFromID

func WKOpenPanelParametersFromID(id objc.ID) WKOpenPanelParameters

WKOpenPanelParametersFromID constructs a WKOpenPanelParameters from an objc.ID.

The configuration details of a file upload control in your web content.

func (WKOpenPanelParameters) AllowsDirectories

func (o WKOpenPanelParameters) AllowsDirectories() bool

A Boolean value that indicates whether the file upload control supports the selection of directories.

See: https://developer.apple.com/documentation/WebKit/WKOpenPanelParameters/allowsDirectories

func (WKOpenPanelParameters) AllowsMultipleSelection

func (o WKOpenPanelParameters) AllowsMultipleSelection() bool

A Boolean value that indicates whether the file upload control supports multiple files.

See: https://developer.apple.com/documentation/WebKit/WKOpenPanelParameters/allowsMultipleSelection

func (WKOpenPanelParameters) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (WKOpenPanelParameters) Init

Init initializes the instance.

type WKOpenPanelParametersClass

type WKOpenPanelParametersClass struct {
	// contains filtered or unexported fields
}

func GetWKOpenPanelParametersClass

func GetWKOpenPanelParametersClass() WKOpenPanelParametersClass

GetWKOpenPanelParametersClass returns the class object for WKOpenPanelParameters.

func (WKOpenPanelParametersClass) Alloc

Alloc allocates memory for a new instance of the class.

func (WKOpenPanelParametersClass) Class

Class returns the underlying Objective-C class pointer.

type WKPDFConfiguration

type WKPDFConfiguration struct {
	objectivec.Object
}

The configuration data to use when generating a PDF representation of a web view’s contents.

Overview

Create a WKPDFConfiguration object when you want to generate a PDF version of your web view’s content. Use this object to specify the portion of the web view to capture. To generate the PDF content, pass the configuration object to the createPDF(configuration:completionHandler:) method of WKWebView, which returns the PDF data for you to use.

Specifying the snapshot dimensions

Specifying snapshot properties

See: https://developer.apple.com/documentation/WebKit/WKPDFConfiguration

func NewPDFConfiguration deprecated

func NewPDFConfiguration() WKPDFConfiguration

Deprecated: Use NewWKPDFConfiguration instead.

func NewWKPDFConfiguration

func NewWKPDFConfiguration() WKPDFConfiguration

NewWKPDFConfiguration creates a new WKPDFConfiguration instance.

func WKPDFConfigurationFromID

func WKPDFConfigurationFromID(id objc.ID) WKPDFConfiguration

WKPDFConfigurationFromID constructs a WKPDFConfiguration from an objc.ID.

The configuration data to use when generating a PDF representation of a web view’s contents.

func (WKPDFConfiguration) AllowTransparentBackground

func (p WKPDFConfiguration) AllowTransparentBackground() bool

A Boolean value that indicates whether the PDF may have a transparent background.

See: https://developer.apple.com/documentation/WebKit/WKPDFConfiguration/allowTransparentBackground

func (WKPDFConfiguration) Autorelease

func (p WKPDFConfiguration) Autorelease() WKPDFConfiguration

Autorelease adds the receiver to the current autorelease pool.

func (WKPDFConfiguration) Init

Init initializes the instance.

func (WKPDFConfiguration) Rect

The portion of your web view to capture, specified as a rectangle in the view’s coordinate system.

Discussion

The default value of this property is CGRectNull, which captures everything in the view’s bounds rectangle. If you specify a custom rectangle, it must lie within the bounds rectangle of the WKWebView object.

See: https://developer.apple.com/documentation/WebKit/WKPDFConfiguration/rect-3xww9

func (WKPDFConfiguration) SetAllowTransparentBackground

func (p WKPDFConfiguration) SetAllowTransparentBackground(value bool)

func (WKPDFConfiguration) SetRect

func (p WKPDFConfiguration) SetRect(value corefoundation.CGRect)

type WKPDFConfigurationClass

type WKPDFConfigurationClass struct {
	// contains filtered or unexported fields
}

func GetWKPDFConfigurationClass

func GetWKPDFConfigurationClass() WKPDFConfigurationClass

GetWKPDFConfigurationClass returns the class object for WKPDFConfiguration.

func (WKPDFConfigurationClass) Alloc

Alloc allocates memory for a new instance of the class.

func (WKPDFConfigurationClass) Class

func (wc WKPDFConfigurationClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type WKPermissionDecision

type WKPermissionDecision int

See: https://developer.apple.com/documentation/WebKit/WKPermissionDecision

const (
	// WKPermissionDecisionDeny: Deny permission for the requested resource.
	WKPermissionDecisionDeny WKPermissionDecision = 2
	// WKPermissionDecisionGrant: Grant permission for the requested resource.
	WKPermissionDecisionGrant WKPermissionDecision = 1
	// WKPermissionDecisionPrompt: Prompt the user for permission for the requested resource.
	WKPermissionDecisionPrompt WKPermissionDecision = 0
)

func (WKPermissionDecision) String

func (e WKPermissionDecision) String() string

type WKPermissionDecisionHandler

type WKPermissionDecisionHandler = func(int)

WKPermissionDecisionHandler handles A closure that you call from your delegate method.

Used by:

  • [WKUIDelegate.WebViewRequestDeviceOrientationAndMotionPermissionForOriginInitiatedByFrameDecisionHandler]
  • [WKUIDelegate.WebViewRequestMediaCapturePermissionForOriginInitiatedByFrameTypeDecisionHandler]

type WKPreferences

type WKPreferences struct {
	objectivec.Object
}

An object that encapsulates the standard behaviors to apply to websites.

Overview

Use a WKPreferences object to specify the preferences for your website, including the minimum font size, the JavaScript behavior, and the behavior for handling fraudulent websites. Create this object and assign it to the WKWebViewConfiguration.Preferences property of the WKWebViewConfiguration object you use to create your web view.

Setting Rendering Preferences

Setting Behavior Preferences

Setting Java and JavaScript Preferences

Setting Fraud Warning Preferences

Deprecated

See: https://developer.apple.com/documentation/WebKit/WKPreferences

func NewPreferences deprecated

func NewPreferences() WKPreferences

Deprecated: Use NewWKPreferences instead.

func NewPreferencesWithCoder deprecated added in v0.6.10

func NewPreferencesWithCoder(coder foundation.INSCoder) WKPreferences

Deprecated: Use NewWKPreferencesWithCoder instead.

func NewWKPreferences

func NewWKPreferences() WKPreferences

NewWKPreferences creates a new WKPreferences instance.

func WKPreferencesFromID

func WKPreferencesFromID(id objc.ID) WKPreferences

WKPreferencesFromID constructs a WKPreferences from an objc.ID.

An object that encapsulates the standard behaviors to apply to websites.

func (WKPreferences) Autorelease

func (p WKPreferences) Autorelease() WKPreferences

Autorelease adds the receiver to the current autorelease pool.

func (WKPreferences) EncodeWithCoder

func (p WKPreferences) EncodeWithCoder(coder foundation.INSCoder)

func (WKPreferences) InactiveSchedulingPolicy

func (p WKPreferences) InactiveSchedulingPolicy() WKInactiveSchedulingPolicy

A policy you set to specify how a web view that’s not in a window handles tasks.

Discussion

Set this to indicate how a web view that’s not in a window handles tasks; for example, when the web view is in a background tab in a browser. The default value is WKInactiveSchedulingPolicySuspend.

A web view that’s not in a window is exempted from this policy if it is playing media, performing media capture, or performing another user-interactive activity.

See: https://developer.apple.com/documentation/WebKit/WKPreferences/inactiveSchedulingPolicy-swift.property

func (WKPreferences) Init

func (p WKPreferences) Init() WKPreferences

Init initializes the instance.

func (WKPreferences) IsElementFullscreenEnabled added in v0.6.5

func (p WKPreferences) IsElementFullscreenEnabled() bool

A Boolean value that indicates whether a web view can display content full screen.

Discussion

The default value for this preference is false.

See: https://developer.apple.com/documentation/WebKit/WKPreferences/isElementFullscreenEnabled

func (WKPreferences) IsFraudulentWebsiteWarningEnabled added in v0.6.5

func (p WKPreferences) IsFraudulentWebsiteWarningEnabled() bool

A Boolean value that indicates whether the web view shows warnings for suspected fraudulent content, such as malware or phishing attemps.

Discussion

The default value of this property is true.

See: https://developer.apple.com/documentation/WebKit/WKPreferences/isFraudulentWebsiteWarningEnabled

func (WKPreferences) IsSiteSpecificQuirksModeEnabled added in v0.6.5

func (p WKPreferences) IsSiteSpecificQuirksModeEnabled() bool

A Boolean that indicates whether to apply site-specific compatibility workarounds.

Discussion

The default value for this preference is true.

See: https://developer.apple.com/documentation/WebKit/WKPreferences/isSiteSpecificQuirksModeEnabled

func (WKPreferences) IsTextInteractionEnabled added in v0.6.5

func (p WKPreferences) IsTextInteractionEnabled() bool

A Boolean value that indicates whether to allow people to select or otherwise interact with text.

Discussion

The default value for this preference is true on macOS and iOS. On watchOS, the default value is false.

See: https://developer.apple.com/documentation/WebKit/WKPreferences/isTextInteractionEnabled

func (WKPreferences) JavaEnabled

func (p WKPreferences) JavaEnabled() bool

A Boolean value that indicates whether Java is enabled.

Discussion

The default value is false.

See: https://developer.apple.com/documentation/WebKit/WKPreferences/javaEnabled

func (WKPreferences) JavaScriptCanOpenWindowsAutomatically

func (p WKPreferences) JavaScriptCanOpenWindowsAutomatically() bool

A Boolean value that indicates whether JavaScript can open windows without user interaction.

Discussion

The default value is false in iOS and true in macOS.

See: https://developer.apple.com/documentation/WebKit/WKPreferences/javaScriptCanOpenWindowsAutomatically

func (WKPreferences) JavaScriptEnabled

func (p WKPreferences) JavaScriptEnabled() bool

A Boolean value that indicates whether JavaScript is enabled.

Discussion

The default value is true. Setting this property to false disables JavaScripts that are loaded or executed by the webpage. This setting does not affect user scripts. See WKUserContentController.

See: https://developer.apple.com/documentation/WebKit/WKPreferences/javaScriptEnabled

func (WKPreferences) MinimumFontSize

func (p WKPreferences) MinimumFontSize() float64

The minimum font size, in points.

Discussion

The default value is `0`.

See: https://developer.apple.com/documentation/WebKit/WKPreferences/minimumFontSize

func (WKPreferences) PlugInsEnabled

func (p WKPreferences) PlugInsEnabled() bool

A Boolean value that indicates whether plug-ins are enabled.

Discussion

The default value is false.

See: https://developer.apple.com/documentation/WebKit/WKPreferences/plugInsEnabled

func (WKPreferences) SetElementFullscreenEnabled

func (p WKPreferences) SetElementFullscreenEnabled(value bool)

func (WKPreferences) SetFraudulentWebsiteWarningEnabled

func (p WKPreferences) SetFraudulentWebsiteWarningEnabled(value bool)

func (WKPreferences) SetInactiveSchedulingPolicy

func (p WKPreferences) SetInactiveSchedulingPolicy(value WKInactiveSchedulingPolicy)

func (WKPreferences) SetJavaEnabled

func (p WKPreferences) SetJavaEnabled(value bool)

func (WKPreferences) SetJavaScriptCanOpenWindowsAutomatically

func (p WKPreferences) SetJavaScriptCanOpenWindowsAutomatically(value bool)

func (WKPreferences) SetJavaScriptEnabled

func (p WKPreferences) SetJavaScriptEnabled(value bool)

func (WKPreferences) SetMinimumFontSize

func (p WKPreferences) SetMinimumFontSize(value float64)

func (WKPreferences) SetPlugInsEnabled

func (p WKPreferences) SetPlugInsEnabled(value bool)

func (WKPreferences) SetShouldPrintBackgrounds

func (p WKPreferences) SetShouldPrintBackgrounds(value bool)

func (WKPreferences) SetSiteSpecificQuirksModeEnabled

func (p WKPreferences) SetSiteSpecificQuirksModeEnabled(value bool)
func (p WKPreferences) SetTabFocusesLinks(value bool)

func (WKPreferences) SetTextInteractionEnabled

func (p WKPreferences) SetTextInteractionEnabled(value bool)

func (WKPreferences) ShouldPrintBackgrounds

func (p WKPreferences) ShouldPrintBackgrounds() bool

A Boolean value that indicates whether to include any background color or graphics when printing content.

Discussion

The default value for this preference is false.

See: https://developer.apple.com/documentation/WebKit/WKPreferences/shouldPrintBackgrounds

func (p WKPreferences) TabFocusesLinks() bool

A Boolean value that indicates whether pressing the tab key changes the focus to links and form controls.

When the value of this property is true, the web view includes links and form controls in the set of items that may receive focus. Pressing the Option key temporarily reverses this preference.

See: https://developer.apple.com/documentation/WebKit/WKPreferences/tabFocusesLinks

type WKPreferencesClass

type WKPreferencesClass struct {
	// contains filtered or unexported fields
}

func GetWKPreferencesClass

func GetWKPreferencesClass() WKPreferencesClass

GetWKPreferencesClass returns the class object for WKPreferences.

func (WKPreferencesClass) Alloc

func (wc WKPreferencesClass) Alloc() WKPreferences

Alloc allocates memory for a new instance of the class.

func (WKPreferencesClass) Class

func (wc WKPreferencesClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type WKProcessPool

type WKProcessPool struct {
	objectivec.Object
}

An opaque token that you use to run multiple web views in a single process.

Overview

A WKProcessPool object represents a single process that WebKit uses to manage web content. To provide a more secure and stable experience, WebKit renders the content of web views in separate processes, rather than in your app’s process space. By default, WebKit gives each web view its own process space until it reaches an implementation-defined process limit. After that, web views with the same WKProcessPool object share the same web content process.

If your app creates multiple web views, assign the same WKProcessPool object to web views that may safely share a process space. Instantiate an instance of this class and assign it to the WKWebViewConfiguration.ProcessPool property of each web view’s WKWebViewConfiguration object.

See: https://developer.apple.com/documentation/WebKit/WKProcessPool

func NewProcessPool deprecated

func NewProcessPool() WKProcessPool

Deprecated: Use NewWKProcessPool instead.

func NewProcessPoolWithCoder deprecated

func NewProcessPoolWithCoder(coder foundation.INSCoder) WKProcessPool

Deprecated: Use NewWKProcessPoolWithCoder instead.

func NewWKProcessPool

func NewWKProcessPool() WKProcessPool

NewWKProcessPool creates a new WKProcessPool instance.

func WKProcessPoolFromID

func WKProcessPoolFromID(id objc.ID) WKProcessPool

WKProcessPoolFromID constructs a WKProcessPool from an objc.ID.

An opaque token that you use to run multiple web views in a single process.

func (WKProcessPool) Autorelease

func (p WKProcessPool) Autorelease() WKProcessPool

Autorelease adds the receiver to the current autorelease pool.

func (WKProcessPool) EncodeWithCoder

func (p WKProcessPool) EncodeWithCoder(coder foundation.INSCoder)

func (WKProcessPool) Init

func (p WKProcessPool) Init() WKProcessPool

Init initializes the instance.

type WKProcessPoolClass

type WKProcessPoolClass struct {
	// contains filtered or unexported fields
}

func GetWKProcessPoolClass

func GetWKProcessPoolClass() WKProcessPoolClass

GetWKProcessPoolClass returns the class object for WKProcessPool.

func (WKProcessPoolClass) Alloc

func (wc WKProcessPoolClass) Alloc() WKProcessPool

Alloc allocates memory for a new instance of the class.

func (WKProcessPoolClass) Class

func (wc WKProcessPoolClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type WKScriptMessage

type WKScriptMessage struct {
	objectivec.Object
}

An object that encapsulates a message sent by JavaScript code from a webpage.

Overview

Use a WKScriptMessage object to get details about a JavaScript message sent to a custom message handler in your app. You don’t create WKScriptMessage objects directly. When JavaScript code targets one of your app’s message handlers, the WKUserContentController object of the web view creates a WKScriptMessage object and delivers it to the message handler’s delegate method. Use the object you’re provided to process the message and provide an appropriate response.

For more information about handling script messages, see the WKScriptMessageHandler and WKScriptMessageHandlerWithReply protocols. For information about how to register message handlers, see the methods of WKUserContentController.

Getting the Message Contents

Getting the Message Handler’s Name

See: https://developer.apple.com/documentation/WebKit/WKScriptMessage

func NewScriptMessage deprecated

func NewScriptMessage() WKScriptMessage

Deprecated: Use NewWKScriptMessage instead.

func NewWKScriptMessage

func NewWKScriptMessage() WKScriptMessage

NewWKScriptMessage creates a new WKScriptMessage instance.

func WKScriptMessageFromID

func WKScriptMessageFromID(id objc.ID) WKScriptMessage

WKScriptMessageFromID constructs a WKScriptMessage from an objc.ID.

An object that encapsulates a message sent by JavaScript code from a webpage.

func (WKScriptMessage) Autorelease

func (s WKScriptMessage) Autorelease() WKScriptMessage

Autorelease adds the receiver to the current autorelease pool.

func (WKScriptMessage) Body

The body of the message.

Discussion

Allowed types are NSNumber, NSString, NSDate, NSArray, NSDictionary, and NSNull.

See: https://developer.apple.com/documentation/WebKit/WKScriptMessage/body

func (WKScriptMessage) FrameInfo

func (s WKScriptMessage) FrameInfo() IWKFrameInfo

The frame that sent the message.

See: https://developer.apple.com/documentation/WebKit/WKScriptMessage/frameInfo

func (WKScriptMessage) Init

Init initializes the instance.

func (WKScriptMessage) Name

func (s WKScriptMessage) Name() string

The name of the message handler to which the message is sent.

See: https://developer.apple.com/documentation/WebKit/WKScriptMessage/name

func (WKScriptMessage) WebView

func (s WKScriptMessage) WebView() IWKWebView

The web view that sent the message.

See: https://developer.apple.com/documentation/WebKit/WKScriptMessage/webView

func (WKScriptMessage) World

func (s WKScriptMessage) World() IWKContentWorld

The namespace in which the JavaScript code executes.

Discussion

For more information about content worlds, see WKContentWorld.

See: https://developer.apple.com/documentation/WebKit/WKScriptMessage/world

type WKScriptMessageClass

type WKScriptMessageClass struct {
	// contains filtered or unexported fields
}

func GetWKScriptMessageClass

func GetWKScriptMessageClass() WKScriptMessageClass

GetWKScriptMessageClass returns the class object for WKScriptMessage.

func (WKScriptMessageClass) Alloc

Alloc allocates memory for a new instance of the class.

func (WKScriptMessageClass) Class

func (wc WKScriptMessageClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type WKScriptMessageHandler

type WKScriptMessageHandler interface {
	objectivec.IObject

	// Tells the handler that a webpage sent a script message.
	//
	// See: https://developer.apple.com/documentation/WebKit/WKScriptMessageHandler/userContentController(_:didReceive:)
	UserContentControllerDidReceiveScriptMessage(userContentController IWKUserContentController, message IWKScriptMessage)
}

An interface for receiving messages from JavaScript code running in a webpage.

See: https://developer.apple.com/documentation/WebKit/WKScriptMessageHandler

type WKScriptMessageHandlerObject

type WKScriptMessageHandlerObject struct {
	objectivec.Object
}

WKScriptMessageHandlerObject wraps an existing Objective-C object that conforms to the WKScriptMessageHandler protocol.

func WKScriptMessageHandlerObjectFromID

func WKScriptMessageHandlerObjectFromID(id objc.ID) WKScriptMessageHandlerObject

WKScriptMessageHandlerObjectFromID constructs a WKScriptMessageHandlerObject from an objc.ID. The object is determined to conform to the protocol at runtime.

func (WKScriptMessageHandlerObject) BaseObject

func (WKScriptMessageHandlerObject) UserContentControllerDidReceiveScriptMessage

func (o WKScriptMessageHandlerObject) UserContentControllerDidReceiveScriptMessage(userContentController IWKUserContentController, message IWKScriptMessage)

Tells the handler that a webpage sent a script message.

userContentController: The user content controller that delivered the message to your handler.

message: An object that contains the message details.

Discussion

Use this method to respond to a message sent from the webpage’s JavaScript code. Use the message parameter to get the message contents and to determine the originating web view.

See: https://developer.apple.com/documentation/WebKit/WKScriptMessageHandler/userContentController(_:didReceive:)

type WKScriptMessageHandlerWithReply

type WKScriptMessageHandlerWithReply interface {
	objectivec.IObject

	// Tells the handler that a webpage sent a script message that included a reply.
	//
	// See: https://developer.apple.com/documentation/WebKit/WKScriptMessageHandlerWithReply/userContentController(_:didReceive:replyHandler:)
	UserContentControllerDidReceiveScriptMessageReplyHandler(userContentController IWKUserContentController, message IWKScriptMessage, replyHandler IObjectStringHandler)
}

An interface for responding to messages from JavaScript code running in a webpage.

See: https://developer.apple.com/documentation/WebKit/WKScriptMessageHandlerWithReply

type WKScriptMessageHandlerWithReplyObject

type WKScriptMessageHandlerWithReplyObject struct {
	objectivec.Object
}

WKScriptMessageHandlerWithReplyObject wraps an existing Objective-C object that conforms to the WKScriptMessageHandlerWithReply protocol.

func WKScriptMessageHandlerWithReplyObjectFromID

func WKScriptMessageHandlerWithReplyObjectFromID(id objc.ID) WKScriptMessageHandlerWithReplyObject

WKScriptMessageHandlerWithReplyObjectFromID constructs a WKScriptMessageHandlerWithReplyObject from an objc.ID. The object is determined to conform to the protocol at runtime.

func (WKScriptMessageHandlerWithReplyObject) BaseObject

func (WKScriptMessageHandlerWithReplyObject) UserContentControllerDidReceiveScriptMessageReplyHandler added in v0.6.10

func (o WKScriptMessageHandlerWithReplyObject) UserContentControllerDidReceiveScriptMessageReplyHandler(userContentController IWKUserContentController, message IWKScriptMessage, replyHandler IObjectStringHandler)

Tells the handler that a webpage sent a script message that included a reply.

userContentController: The user content controller that delivered the message to your handler.

message: An object that contains the message details.

replyHandler: A reply handler block to execute with the response to send back to the webpage. This block has no return value and takes the following parameters:

reply: An object that contains the data to return to the webpage. Allowed types for this parameter are NSNumber, NSString, NSDate, NSArray, NSDictionary, and NSNull. Specify `nil` if an error occurred. errorMessage: `nil` on success, or a string that describes the error that occurred.

Discussion

Use this method to handle a message from the webpage and provide an appropriate response.

See: https://developer.apple.com/documentation/WebKit/WKScriptMessageHandlerWithReply/userContentController(_:didReceive:replyHandler:)

type WKSecurityOrigin

type WKSecurityOrigin struct {
	objectivec.Object
}

An object that identifies the origin of a particular resource.

Overview

A WKSecurityOrigin object is a transient, data-only object that identifies the host name, protocol, and port number associated with a particular resource. You don’t create WKSecurityOrigin objects directly. Instead, WebKit creates them for the resources it loads. A first-party load is any load URL has the same security origin as the requesting web site. First-party webpages can access each other’s resources, such as scripts and databases.

Because a WKSecurityOrigin object is transient, it doesn’t uniquely identify a security origin across multiple delegate method calls.

Getting the Host Information

Getting the Host Protocol

See: https://developer.apple.com/documentation/WebKit/WKSecurityOrigin

func NewSecurityOrigin deprecated

func NewSecurityOrigin() WKSecurityOrigin

Deprecated: Use NewWKSecurityOrigin instead.

func NewWKSecurityOrigin

func NewWKSecurityOrigin() WKSecurityOrigin

NewWKSecurityOrigin creates a new WKSecurityOrigin instance.

func WKSecurityOriginFromID

func WKSecurityOriginFromID(id objc.ID) WKSecurityOrigin

WKSecurityOriginFromID constructs a WKSecurityOrigin from an objc.ID.

An object that identifies the origin of a particular resource.

func (WKSecurityOrigin) Autorelease

func (s WKSecurityOrigin) Autorelease() WKSecurityOrigin

Autorelease adds the receiver to the current autorelease pool.

func (WKSecurityOrigin) Host

func (s WKSecurityOrigin) Host() string

The security origin’s host.

See: https://developer.apple.com/documentation/WebKit/WKSecurityOrigin/host

func (WKSecurityOrigin) Init

Init initializes the instance.

func (WKSecurityOrigin) Port

func (s WKSecurityOrigin) Port() int

The security origin’s port.

See: https://developer.apple.com/documentation/WebKit/WKSecurityOrigin/port

func (WKSecurityOrigin) Protocol

func (s WKSecurityOrigin) Protocol() string

The security origin’s protocol.

See: https://developer.apple.com/documentation/WebKit/WKSecurityOrigin/protocol

type WKSecurityOriginClass

type WKSecurityOriginClass struct {
	// contains filtered or unexported fields
}

func GetWKSecurityOriginClass

func GetWKSecurityOriginClass() WKSecurityOriginClass

GetWKSecurityOriginClass returns the class object for WKSecurityOrigin.

func (WKSecurityOriginClass) Alloc

Alloc allocates memory for a new instance of the class.

func (WKSecurityOriginClass) Class

func (wc WKSecurityOriginClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type WKSecurityRestrictionMode

type WKSecurityRestrictionMode int

See: https://developer.apple.com/documentation/WebKit/WKSecurityRestrictionMode

const (
	WKSecurityRestrictionModeLockdown              WKSecurityRestrictionMode = 2
	WKSecurityRestrictionModeMaximizeCompatibility WKSecurityRestrictionMode = 1
	WKSecurityRestrictionModeNone                  WKSecurityRestrictionMode = 0
)

func (WKSecurityRestrictionMode) String

func (e WKSecurityRestrictionMode) String() string

type WKSnapshotConfiguration

type WKSnapshotConfiguration struct {
	objectivec.Object
}

The configuration data to use when generating an image from a web view’s contents.

Overview

Create a WKSnapshotConfiguration object when you want to generate an image based on your web view’s content. Use this object to specify the portion of the web view to capture and the capture behavior. To generate the snapshot, pass the configuration object to the WKWebView.TakeSnapshotWithConfigurationCompletionHandler method of WKWebView, which returns a platform-native image for you to use.

Specifying the snapshot dimensions

Configuring the capture behavior

See: https://developer.apple.com/documentation/WebKit/WKSnapshotConfiguration

func NewSnapshotConfiguration deprecated

func NewSnapshotConfiguration() WKSnapshotConfiguration

Deprecated: Use NewWKSnapshotConfiguration instead.

func NewWKSnapshotConfiguration

func NewWKSnapshotConfiguration() WKSnapshotConfiguration

NewWKSnapshotConfiguration creates a new WKSnapshotConfiguration instance.

func WKSnapshotConfigurationFromID

func WKSnapshotConfigurationFromID(id objc.ID) WKSnapshotConfiguration

WKSnapshotConfigurationFromID constructs a WKSnapshotConfiguration from an objc.ID.

The configuration data to use when generating an image from a web view’s contents.

func (WKSnapshotConfiguration) AfterScreenUpdates

func (s WKSnapshotConfiguration) AfterScreenUpdates() bool

A Boolean value that indicates whether to take the snapshot after incorporating any pending screen updates.

Discussion

The default value of this property is true, which causes the web view to incorporate any recent changes to the view’s content and then generate the snapshot. If you change the value to false, the web view takes the snapshot immediately, and before incorporating any new changes.

See: https://developer.apple.com/documentation/WebKit/WKSnapshotConfiguration/afterScreenUpdates

func (WKSnapshotConfiguration) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (WKSnapshotConfiguration) Init

Init initializes the instance.

func (WKSnapshotConfiguration) Rect

The portion of your web view to capture, specified as a rectangle in the view’s coordinate system.

Discussion

The default value of this property is CGRectNull, which captures everything in the view’s bounds rectangle. If you specify a custom rectangle, it must lie within the bounds rectangle of the WKWebView object.

See: https://developer.apple.com/documentation/WebKit/WKSnapshotConfiguration/rect

func (WKSnapshotConfiguration) SetAfterScreenUpdates

func (s WKSnapshotConfiguration) SetAfterScreenUpdates(value bool)

func (WKSnapshotConfiguration) SetRect

func (WKSnapshotConfiguration) SetSnapshotWidth

func (s WKSnapshotConfiguration) SetSnapshotWidth(value foundation.NSNumber)

func (WKSnapshotConfiguration) SnapshotWidth

func (s WKSnapshotConfiguration) SnapshotWidth() foundation.NSNumber

The width of the captured image, in points.

Discussion

Use this property to scale the generated image to the specified width. The web view maintains the aspect ratio of the captured content, but scales it to match the width you specify.

The default value of this property is `nil`, which returns an image whose size matches the original size of the captured rectangle.

See: https://developer.apple.com/documentation/WebKit/WKSnapshotConfiguration/snapshotWidth

type WKSnapshotConfigurationClass

type WKSnapshotConfigurationClass struct {
	// contains filtered or unexported fields
}

func GetWKSnapshotConfigurationClass

func GetWKSnapshotConfigurationClass() WKSnapshotConfigurationClass

GetWKSnapshotConfigurationClass returns the class object for WKSnapshotConfiguration.

func (WKSnapshotConfigurationClass) Alloc

Alloc allocates memory for a new instance of the class.

func (WKSnapshotConfigurationClass) Class

Class returns the underlying Objective-C class pointer.

type WKUIDelegate

type WKUIDelegate interface {
	objectivec.IObject
}

The methods for presenting native user interface elements on behalf of a webpage.

See: https://developer.apple.com/documentation/WebKit/WKUIDelegate

type WKUIDelegateConfig

type WKUIDelegateConfig struct {

	// Creating and closing the web view
	// WebViewDidClose — Notifies your app that the DOM window closed successfully.
	WebViewDidClose func(webView WKWebView)

	// Other Methods
	// WebViewCreateWebViewWithConfigurationForNavigationActionWindowFeatures — Creates a new web view.
	WebViewCreateWebViewWithConfigurationForNavigationActionWindowFeatures func(webView WKWebView, configuration WKWebViewConfiguration, navigationAction WKNavigationAction, windowFeatures WKWindowFeatures) WKWebView
}

WKUIDelegateConfig holds optional typed callbacks for WKUIDelegate methods. Set non-nil fields to register the corresponding Objective-C delegate method. Methods with nil callbacks are not registered, so [NSObject.RespondsToSelector] returns false for them — matching the Objective-C delegate pattern exactly.

See Apple Documentation for protocol details.

type WKUIDelegateObject

type WKUIDelegateObject struct {
	objectivec.Object
}

WKUIDelegateObject wraps an existing Objective-C object that conforms to the WKUIDelegate protocol.

func NewWKUIDelegate

func NewWKUIDelegate(config WKUIDelegateConfig) WKUIDelegateObject

NewWKUIDelegate creates an Objective-C object implementing the WKUIDelegate protocol.

The object implements only the methods set in config, so [NSObject.RespondsToSelector] reports optional delegate methods accurately. Objects with the same set of methods share one Objective-C class, registered on first use, so creating many of them costs no class or callback registration. The caller owns the returned object; config is dropped when it deallocates.

The returned WKUIDelegateObject satisfies the WKUIDelegate interface and can be passed directly to SetDelegate and similar methods.

See Apple Documentation for protocol details.

func WKUIDelegateObjectFromID

func WKUIDelegateObjectFromID(id objc.ID) WKUIDelegateObject

WKUIDelegateObjectFromID constructs a WKUIDelegateObject from an objc.ID. The object is determined to conform to the protocol at runtime.

func (WKUIDelegateObject) BaseObject

func (o WKUIDelegateObject) BaseObject() objectivec.Object

func (WKUIDelegateObject) WebViewCommitPreviewingViewController added in v0.6.17

func (o WKUIDelegateObject) WebViewCommitPreviewingViewController(webView IWKWebView, previewingViewController objectivec.IObject)

Called when the user performs a pop action on the preview.

webView: The web view invoking the delegate method.

previewingViewController: The view controller that is popped.

Discussion

You must display the previewed view controller inside of your app.

See: https://developer.apple.com/documentation/WebKit/WKUIDelegate/webView(_:commitPreviewingViewController:)

func (WKUIDelegateObject) WebViewContextMenuConfigurationForElementCompletionHandler

func (o WKUIDelegateObject) WebViewContextMenuConfigurationForElementCompletionHandler(webView IWKWebView, elementInfo *uintptr, completionHandler UIContextMenuConfigurationHandler)

Tells the delegate that a contextual menu interaction began.

webView: The web view in which the interaction occurred.

elementInfo: An object that contains information about the element involved in the interaction.

completionHandler: The completion handler for you to call with information about how you want to handle the interaction. This handler block has no return value and takes the following parameter:

configuration: The UIContextMenuConfiguration object that contains the details of how you want to handle the interaction. Specify `nil` for this parameter if you don’t want to show a contextual menu.

See: https://developer.apple.com/documentation/WebKit/WKUIDelegate/webView(_:contextMenuConfigurationForElement:completionHandler:)

func (WKUIDelegateObject) WebViewContextMenuDidEndForElement

func (o WKUIDelegateObject) WebViewContextMenuDidEndForElement(webView IWKWebView, elementInfo *uintptr)

Tells the delegate that the web view dismissed the contextual menu for the specified element.

webView: The web view in which the interaction occurred.

elementInfo: An object that contains information about the element involved in the interaction.

See: https://developer.apple.com/documentation/WebKit/WKUIDelegate/webView(_:contextMenuDidEndForElement:)

func (WKUIDelegateObject) WebViewContextMenuForElementWillCommitWithAnimator

func (o WKUIDelegateObject) WebViewContextMenuForElementWillCommitWithAnimator(webView IWKWebView, elementInfo *uintptr, animator objectivec.IObject)

Provides the delegate with the animator object that the web view uses to display the contextual menu.

webView: The web view in which the interaction occurred.

elementInfo: An object that contains information about the element involved in the interaction.

animator: The animator object to use to commit additional animations related to the appearance of the contextual menu.

See: https://developer.apple.com/documentation/WebKit/WKUIDelegate/webView(_:contextMenuForElement:willCommitWithAnimator:)

func (WKUIDelegateObject) WebViewContextMenuWillPresentForElement

func (o WKUIDelegateObject) WebViewContextMenuWillPresentForElement(webView IWKWebView, elementInfo *uintptr)

Tells the delegate that the web view is about to present the contextual menu for the specified element.

webView: The web view in which the interaction occurred.

elementInfo: An object that contains information about the element involved in the interaction.

See: https://developer.apple.com/documentation/WebKit/WKUIDelegate/webView(_:contextMenuWillPresentForElement:)

func (WKUIDelegateObject) WebViewCreateWebViewWithConfigurationForNavigationActionWindowFeatures

func (o WKUIDelegateObject) WebViewCreateWebViewWithConfigurationForNavigationActionWindowFeatures(webView IWKWebView, configuration IWKWebViewConfiguration, navigationAction IWKNavigationAction, windowFeatures IWKWindowFeatures) IWKWebView

Creates a new web view.

webView: The web view invoking the delegate method.

configuration: The configuration to use when creating the new web view.

navigationAction: The navigation action causing the new web view to be created.

windowFeatures: Window features requested by the webpage.

Return Value

A new web view or `nil`.

Discussion

The web view returned must be created with the specified configuration. WebKit loads the request in the returned web view.

See: https://developer.apple.com/documentation/WebKit/WKUIDelegate/webView(_:createWebViewWith:for:windowFeatures:)

func (WKUIDelegateObject) WebViewDidClose

func (o WKUIDelegateObject) WebViewDidClose(webView IWKWebView)

Notifies your app that the DOM window closed successfully.

webView: The web view invoking the delegate method.

Discussion

Your app should remove the web view from the view hierarchy and update the UI as needed, for instance by closing the containing browser tab or window.

See: https://developer.apple.com/documentation/WebKit/WKUIDelegate/webViewDidClose(_:)

func (WKUIDelegateObject) WebViewPreviewingViewControllerForElementDefaultActions added in v0.6.17

func (o WKUIDelegateObject) WebViewPreviewingViewControllerForElementDefaultActions(webView IWKWebView, elementInfo *uintptr, previewActions []objectivec.IObject) objc.ID

Called when the user performs a peek action.

webView: The web view invoking the delegate method.

elementInfo: The information associated with the element.

previewActions: An array of default actions used by the element.

Return Value

Return `nil` to use Webkit’s default preview behavior. Returning a view controller allows [WebViewCommitPreviewingViewController] to be invoked when the user performs a pop action.

Discussion

To use the default actions, your app must return the actions to be run in your view controller’s implementation of previewActionItems.

See: https://developer.apple.com/documentation/WebKit/WKUIDelegate/webView(_:previewingViewControllerForElement:defaultActions:)

func (WKUIDelegateObject) WebViewRequestDeviceOrientationAndMotionPermissionForOriginInitiatedByFrameDecisionHandler

func (o WKUIDelegateObject) WebViewRequestDeviceOrientationAndMotionPermissionForOriginInitiatedByFrameDecisionHandler(webView IWKWebView, origin IWKSecurityOrigin, frame IWKFrameInfo, decisionHandler WKPermissionDecisionHandler)

Determines whether a web resource, which the security origin object describes, can access the device’s orientation and motion.

webView: The web view requesting permission for orientation and motion information.

origin: An object that identifies the host name, protocol, and port number for a web resource.

frame: The frame that initiates the request in the web view.

decisionHandler: A closure that you call from your delegate method. Pass the permission decision you determine to the closure.

Discussion

If you don’t implement this method in your delegate, the system returns WKPermissionDecisionPrompt.

See: https://developer.apple.com/documentation/WebKit/WKUIDelegate/webView(_:requestDeviceOrientationAndMotionPermissionFor:initiatedByFrame:decisionHandler:)

func (WKUIDelegateObject) WebViewRequestMediaCapturePermissionForOriginInitiatedByFrameTypeDecisionHandler

func (o WKUIDelegateObject) WebViewRequestMediaCapturePermissionForOriginInitiatedByFrameTypeDecisionHandler(webView IWKWebView, origin IWKSecurityOrigin, frame IWKFrameInfo, type_ WKMediaCaptureType, decisionHandler WKPermissionDecisionHandler)

Determines whether a web resource, which the security origin object describes, can access to the device’s microphone audio and camera video.

webView: The web view requesting permission for microphone audio and camera video.

origin: An object that identifies the host name, protocol, and port number for a web resource.

frame: The frame that initiates the request in the web view.

type: An enumeration case representing a type of media capture device, like a microphone or camera.

decisionHandler: A closure that you call from your delegate method. Pass the permission decision you determine to the closure.

Discussion

If you don’t implement this method in your delegate, the system returns WKPermissionDecisionPrompt.

See: https://developer.apple.com/documentation/WebKit/WKUIDelegate/webView(_:requestMediaCapturePermissionFor:initiatedByFrame:type:decisionHandler:)

func (WKUIDelegateObject) WebViewRunJavaScriptAlertPanelWithMessageInitiatedByFrameCompletionHandler

func (o WKUIDelegateObject) WebViewRunJavaScriptAlertPanelWithMessageInitiatedByFrameCompletionHandler(webView IWKWebView, message string, frame IWKFrameInfo, completionHandler VoidHandler)

Displays a JavaScript alert panel.

webView: The web view invoking the delegate method.

message: The message to be displayed.

frame: Information about the frame whose JavaScript process initiated this call.

completionHandler: The completion handler to call after the alert panel has been dismissed.

Discussion

For user security, implementations of this method should call attention to the fact that a specific website controls the content in this panel. A simple formula for identifying the controlling website is `frame.Request().URL.Host()`. The panel should have a single OK button.

See: https://developer.apple.com/documentation/WebKit/WKUIDelegate/webView(_:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)

func (WKUIDelegateObject) WebViewRunJavaScriptConfirmPanelWithMessageInitiatedByFrameCompletionHandler

func (o WKUIDelegateObject) WebViewRunJavaScriptConfirmPanelWithMessageInitiatedByFrameCompletionHandler(webView IWKWebView, message string, frame IWKFrameInfo, completionHandler BoolHandler)

Displays a JavaScript confirm panel.

webView: The web view invoking the delegate method.

message: The message to be displayed.

frame: Information about the frame whose JavaScript process initiated this call.

completionHandler: The completion handler to call after the confirm panel has been dismissed. Pass true if the user chose OK, and pass false if the user chose Cancel.

Discussion

For user security, implementations of this method should call attention to the fact that a specific website controls the content in this panel. A simple formula for identifying the controlling website is `frame.Request().URL.Host()`. The panel should have two buttons, typically OK and Cancel.

See: https://developer.apple.com/documentation/WebKit/WKUIDelegate/webView(_:runJavaScriptConfirmPanelWithMessage:initiatedByFrame:completionHandler:)

func (WKUIDelegateObject) WebViewRunJavaScriptTextInputPanelWithPromptDefaultTextInitiatedByFrameCompletionHandler added in v0.6.16

func (o WKUIDelegateObject) WebViewRunJavaScriptTextInputPanelWithPromptDefaultTextInitiatedByFrameCompletionHandler(webView IWKWebView, prompt string, defaultText string, frame IWKFrameInfo, completionHandler StringHandler)

Displays a JavaScript text input panel.

webView: The web view invoking the delegate method.

prompt: The message to be displayed.

defaultText: The initial text to display in the text entry field.

frame: Information about the frame whose JavaScript process initiated this call.

completionHandler: The completion handler to call after the text input panel has been dismissed. Pass the entered text if the user chose OK, otherwise `nil`.

Discussion

For user security, implementations of this method should call attention to the fact that a specific website controls the content in this panel. A simple formula for identifying the controlling website is `frame.Request().URL.Host()`. The panel should have two buttons (typically OK and Cancel) and a field in which to enter text.

See: https://developer.apple.com/documentation/WebKit/WKUIDelegate/webView(_:runJavaScriptTextInputPanelWithPrompt:defaultText:initiatedByFrame:completionHandler:)

func (WKUIDelegateObject) WebViewRunOpenPanelWithParametersInitiatedByFrameCompletionHandler added in v0.6.10

func (o WKUIDelegateObject) WebViewRunOpenPanelWithParametersInitiatedByFrameCompletionHandler(webView IWKWebView, parameters IWKOpenPanelParameters, frame IWKFrameInfo, completionHandler NSURLArrayHandler)

Displays a file upload panel.

webView: The web view that invokes the delegate method.

parameters: The parameters that describe the file upload control.

frame: The frame with the file upload control that initiates the call.

completionHandler: The completion handler the system calls after a person dismisses the open panel. Pass the selected URLs if the person selects “OK”, otherwise pass `nil`.

Discussion

Implement this method to customize the upload panel. To disable file uploads, implement this method to return `nil`.

- By default on macOS, file uploads are disabled if you don’t implement this method. - By default on iOS, file uploads are enabled if you don’t implement this method.

See: https://developer.apple.com/documentation/WebKit/WKUIDelegate/webView(_:runOpenPanelWith:initiatedByFrame:completionHandler:)

func (WKUIDelegateObject) WebViewShouldPreviewElement added in v0.6.17

func (o WKUIDelegateObject) WebViewShouldPreviewElement(webView IWKWebView, elementInfo *uintptr) bool

Determines whether the given element should show a preview.

webView: The web view invoking the delegate method.

elementInfo: The information associated with the element.

Return Value

Return [NO] to disable previews for the given element.

Discussion

This method is only invoked for elements that have a default preview in WebKit.

See: https://developer.apple.com/documentation/WebKit/WKUIDelegate/webView(_:shouldPreviewElement:)

func (WKUIDelegateObject) WebViewShowLockdownModeFirstUseMessageCompletionHandler

func (o WKUIDelegateObject) WebViewShowLockdownModeFirstUseMessageCompletionHandler(webView IWKWebView, message string, completionHandler WKDialogResultHandler)

Displays a custom Lockdown Mode first use message.

webView: The web view that is requesting to display the Lockdown Mode first use dialog.

message: The message for the web view to display if the delegate does not display the first use dialog.

completionHandler: A block you must invoke to resume after the web view displays the first use dialog. The block does not return a value, and accepts the following parameter:

dialogResult: A display result case that indicates how the method handled the display request.

Discussion

Implement this method to display a custom Lockdown Mode message, or to suppress the message. Return, or call the completion handler, with a WKDialogResult case that indicates how your method handled the display request. For more information about Lockdown Mode, see About Lockdown Mode.

If you don’t implement this method, the web view displays the default message.

See: https://developer.apple.com/documentation/WebKit/WKUIDelegate/webView(_:showLockdownModeFirstUseMessage:completionHandler:)

func (WKUIDelegateObject) WebViewWillDismissEditMenuWithAnimator

func (o WKUIDelegateObject) WebViewWillDismissEditMenuWithAnimator(webView IWKWebView, animator objectivec.IObject)

Tells the delegate that the web view is about to dismiss an edit menu.

See: https://developer.apple.com/documentation/WebKit/WKUIDelegate/webView(_:willDismissEditMenuWithAnimator:)

func (WKUIDelegateObject) WebViewWillPresentEditMenuWithAnimator

func (o WKUIDelegateObject) WebViewWillPresentEditMenuWithAnimator(webView IWKWebView, animator objectivec.IObject)

Tells the delegate that the web view is about to present an edit menu.

See: https://developer.apple.com/documentation/WebKit/WKUIDelegate/webView(_:willPresentEditMenuWithAnimator:)

type WKURLSchemeHandler

type WKURLSchemeHandler interface {
	objectivec.IObject

	// Asks your handler to begin loading the data for the specified resource.
	//
	// See: https://developer.apple.com/documentation/WebKit/WKURLSchemeHandler/webView(_:start:)
	WebViewStartURLSchemeTask(webView IWKWebView, urlSchemeTask WKURLSchemeTask)

	// Asks your handler to stop loading the data for the specified resource.
	//
	// See: https://developer.apple.com/documentation/WebKit/WKURLSchemeHandler/webView(_:stop:)
	WebViewStopURLSchemeTask(webView IWKWebView, urlSchemeTask WKURLSchemeTask)
}

A protocol for loading resources with URL schemes that WebKit doesn’t handle.

See: https://developer.apple.com/documentation/WebKit/WKURLSchemeHandler

type WKURLSchemeHandlerObject

type WKURLSchemeHandlerObject struct {
	objectivec.Object
}

WKURLSchemeHandlerObject wraps an existing Objective-C object that conforms to the WKURLSchemeHandler protocol.

func WKURLSchemeHandlerObjectFromID

func WKURLSchemeHandlerObjectFromID(id objc.ID) WKURLSchemeHandlerObject

WKURLSchemeHandlerObjectFromID constructs a WKURLSchemeHandlerObject from an objc.ID. The object is determined to conform to the protocol at runtime.

func (WKURLSchemeHandlerObject) BaseObject

func (WKURLSchemeHandlerObject) WebViewStartURLSchemeTask

func (o WKURLSchemeHandlerObject) WebViewStartURLSchemeTask(webView IWKWebView, urlSchemeTask WKURLSchemeTask)

Asks your handler to begin loading the data for the specified resource.

webView: The web view that requires the resource.

urlSchemeTask: The task object that identifies the resource to load. You also use this object to report the progress of the load operation back to the web view.

Discussion

When a web view encounters a resource with your custom URL scheme, it calls this method on the appropriate handler object. Use your implementation of this method to begin loading the resource. Call the methods of the provided WKURLSchemeTask object to report the progress of the loading operation back to the web view. You also use that object to deliver the resource data to the web view.

See: https://developer.apple.com/documentation/WebKit/WKURLSchemeHandler/webView(_:start:)

func (WKURLSchemeHandlerObject) WebViewStopURLSchemeTask

func (o WKURLSchemeHandlerObject) WebViewStopURLSchemeTask(webView IWKWebView, urlSchemeTask WKURLSchemeTask)

Asks your handler to stop loading the data for the specified resource.

webView: The web view that asked you to stop loading the resource.

urlSchemeTask: The task object that identifies the resource the web view no longer needs.

Discussion

If WebKit determines that it no longer needs a resource that your handler is loading, it calls this method to stop the load operation. Typically, WebKit calls this method when the user navigates to another page, but may call it for other reasons.

When WebKit calls this method, stop the load operation immediately for the specified resource and free up any allocated memory for it. Don’t call any methods of the provided `urlSchemeTask` object to report your progress back to WebKit. If you do, the methods of that object raise an exception.

See: https://developer.apple.com/documentation/WebKit/WKURLSchemeHandler/webView(_:stop:)

type WKURLSchemeTask

type WKURLSchemeTask interface {
	objectivec.IObject

	// Returns a URL response to WebKit with information about the requested resource.
	//
	// See: https://developer.apple.com/documentation/WebKit/WKURLSchemeTask/didReceive(_:)-2u23r
	DidReceiveResponse(response foundation.NSURLResponse)

	// Sends some or all of the resource data to WebKit.
	//
	// See: https://developer.apple.com/documentation/WebKit/WKURLSchemeTask/didReceive(_:)-8t5f8
	DidReceiveData(data foundation.NSData)

	// Signals the successful completion of the task.
	//
	// See: https://developer.apple.com/documentation/WebKit/WKURLSchemeTask/didFinish()
	DidFinish()

	// Completes the task and reports the specified error back to WebKit.
	//
	// See: https://developer.apple.com/documentation/WebKit/WKURLSchemeTask/didFailWithError(_:)
	DidFailWithError(error_ foundation.NSError)

	// Information about the resource to load.
	//
	// See: https://developer.apple.com/documentation/WebKit/WKURLSchemeTask/request
	Request() foundation.NSURLRequest
}

An interface that WebKit uses to request custom resources from your app.

See: https://developer.apple.com/documentation/WebKit/WKURLSchemeTask

type WKURLSchemeTaskObject

type WKURLSchemeTaskObject struct {
	objectivec.Object
}

WKURLSchemeTaskObject wraps an existing Objective-C object that conforms to the WKURLSchemeTask protocol.

func WKURLSchemeTaskObjectFromID

func WKURLSchemeTaskObjectFromID(id objc.ID) WKURLSchemeTaskObject

WKURLSchemeTaskObjectFromID constructs a WKURLSchemeTaskObject from an objc.ID. The object is determined to conform to the protocol at runtime.

func (WKURLSchemeTaskObject) BaseObject

func (o WKURLSchemeTaskObject) BaseObject() objectivec.Object

func (WKURLSchemeTaskObject) DidFailWithError

func (o WKURLSchemeTaskObject) DidFailWithError(error_ foundation.NSError)

Completes the task and reports the specified error back to WebKit.

error: The error that caused the task to fail.

Discussion

This method signals to WebKit that the task is complete, but failed with the specified error. Use this method to report any errors during the load process.

After calling this method, it’s a programmer error to call other methods of the task object, and those methods raise an exception if you do. This method raises an exception if you call it after WebKit calls the [WebViewStopURLSchemeTask] method of the corresponding handler object.

See: https://developer.apple.com/documentation/WebKit/WKURLSchemeTask/didFailWithError(_:)

func (WKURLSchemeTaskObject) DidFinish

func (o WKURLSchemeTaskObject) DidFinish()

Signals the successful completion of the task.

Discussion

This method signals to WebKit that it has all of the resource’s data and the task is now complete. Call this method after sending a response and the resource data to WebKit using the [DidReceiveData] and [DidReceiveData] methods.

This method raises an exception if you call it before the [DidReceiveData] method, or if the task is already complete. It also raises an exception if you call it after WebKit calls the [WebViewStopURLSchemeTask] method of the corresponding handler object.

See: https://developer.apple.com/documentation/WebKit/WKURLSchemeTask/didFinish()

func (WKURLSchemeTaskObject) DidReceiveData

func (o WKURLSchemeTaskObject) DidReceiveData(data foundation.NSData)

Sends some or all of the resource data to WebKit.

data: Data for the resource. This object may contain all of the data or only some of it.

Discussion

Call this method to deliver any resource data back to WebKit. If you load the data incrementally, you may call this method multiple times to deliver each new portion of the data. Each time you call this method, WebKit appends the new data to any previously received data.

This method raises an exception if you call it before the [DidReceiveData] method, or after the [DidFinish] method. It also raises an exception if you call it after WebKit calls the [WebViewStopURLSchemeTask] method of the corresponding handler object.

See: https://developer.apple.com/documentation/WebKit/WKURLSchemeTask/didReceive(_:)-8t5f8

func (WKURLSchemeTaskObject) DidReceiveResponse

func (o WKURLSchemeTaskObject) DidReceiveResponse(response foundation.NSURLResponse)

Returns a URL response to WebKit with information about the requested resource.

response: The response to return to WebKit. Your response object must include the MIME type of the requested resource.

Discussion

Call this method to provide WebKit with the MIME type of the requested resource and its expected size. You must call this method at least once for each task, and you may call it multiple times if needed. Always call it before sending any data back to WebKit using the [DidReceiveData] method.

It is a programmer error to call this method after calling the [DidFinish] method of the same task object. It is also a programmer error to call this method after WebKit calls the [WebViewStopURLSchemeTask] method of the corresponding handler object. If you do, this method raises an exception in both cases.

See: https://developer.apple.com/documentation/WebKit/WKURLSchemeTask/didReceive(_:)-2u23r

func (WKURLSchemeTaskObject) Request

Information about the resource to load.

Discussion

Use the value of this property to get the URL of the requested resource, and any additional details. It is safe to retrieve the value of this property even after WebKit cancels the load request by calling your handler’s [WebViewStopURLSchemeTask] method.

See: https://developer.apple.com/documentation/WebKit/WKURLSchemeTask/request

type WKUserContentController

type WKUserContentController struct {
	objectivec.Object
}

An object for managing interactions between JavaScript code and your web view, and for filtering content in your web view.

Overview

A WKUserContentController object provides a bridge between your app and the JavaScript code running in the web view. Use this object to do the following:

- Inject JavaScript code into webpages running in your web view. - Install custom JavaScript functions that call through to your app’s native code. - Specify custom filters to prevent the webpage from loading restricted content.

Create and configure a WKUserContentController object as part of your overall web view setup. Assign the object to the WKWebViewConfiguration.UserContentController property of your WKWebViewConfiguration object before creating your web view.

Adding and Removing Custom Scripts

Adding and Removing Message Handlers

Adding and Removing Content Rules

See: https://developer.apple.com/documentation/WebKit/WKUserContentController

func NewUserContentController deprecated

func NewUserContentController() WKUserContentController

Deprecated: Use NewWKUserContentController instead.

func NewUserContentControllerWithCoder deprecated added in v0.6.10

func NewUserContentControllerWithCoder(coder foundation.INSCoder) WKUserContentController

Deprecated: Use NewWKUserContentControllerWithCoder instead.

func NewWKUserContentController

func NewWKUserContentController() WKUserContentController

NewWKUserContentController creates a new WKUserContentController instance.

func WKUserContentControllerFromID

func WKUserContentControllerFromID(id objc.ID) WKUserContentController

WKUserContentControllerFromID constructs a WKUserContentController from an objc.ID.

An object for managing interactions between JavaScript code and your web view, and for filtering content in your web view.

func (WKUserContentController) AddContentRuleList

func (u WKUserContentController) AddContentRuleList(contentRuleList IWKContentRuleList)

Adds the specified content rule list to the content controller object.

contentRuleList: The rule list to add. Create and retrieve rules lists using a [WKContentExtensionStore] object.

Discussion

Call this method to apply a set of content filtering rules to your web view’s configuration.

See: https://developer.apple.com/documentation/WebKit/WKUserContentController/add(_:)

func (WKUserContentController) AddScriptMessageHandlerContentWorldName

func (u WKUserContentController) AddScriptMessageHandlerContentWorldName(scriptMessageHandler WKScriptMessageHandler, world IWKContentWorld, name string)

Installs a message handler that you can call from the specified content world in your JavaScript code.

scriptMessageHandler: The message handler object that implements your custom code. This object must adopt the WKScriptMessageHandler protocol.

world: The content world in which to install the message handler. Use the content world to scope your message handler to specific parts of your JavaScript code.

name: The name of the message handler. This parameter must be unique within the user content controller and must not be an empty string.

The user content controller uses this parameter to define a JavaScript function for your message handler in all frames in the specified content world. The name of this function is `window.WebkitXCUIElementTypeMessageHandlers().“XCUIElementTypePostMessage()`, where corresponds to the value of this parameter. For example, if you specify the string [MyFunction], the user content controller defines the `window.WebkitXCUIElementTypeMessageHandlers().MyFunction.PostMessage()` function in JavaScript.

Discussion

To execute your handler’s code, call the JavaScript function that this method defines. You may pass a parameter value to the method. The user content controller packages that value into an appropriate type and delivers it to your content handler’s delegate method.

See: https://developer.apple.com/documentation/WebKit/WKUserContentController/add(_:contentWorld:name:)

func (WKUserContentController) AddScriptMessageHandlerName

func (u WKUserContentController) AddScriptMessageHandlerName(scriptMessageHandler WKScriptMessageHandler, name string)

Installs a message handler that you can call from your JavaScript code.

scriptMessageHandler: The message handler object that implements your custom code. This object must adopt the WKScriptMessageHandler protocol.

name: The name of the message handler. This parameter must be unique within the user content controller and must not be an empty string.

The user content controller uses this parameter to define a JavaScript function for your message handler in the page’s main content world. The name of this function is `window.WebkitXCUIElementTypeMessageHandlers().“XCUIElementTypePostMessage()`, where corresponds to the value of this parameter. For example, if you specify the string [MyFunction], the user content controller defines the `window.WebkitXCUIElementTypeMessageHandlers().MyFunction.PostMessage()` function in JavaScript.

Discussion

To execute your handler’s code, call the JavaScript function that this method defines. You may pass a parameter value to the method. The user content controller packages that value into an appropriate type and delivers it to your content handler’s delegate method.

This method uses the content world from the WKContentWorldClass.PageWorld property of WKContentWorld.

See: https://developer.apple.com/documentation/WebKit/WKUserContentController/add(_:name:)

func (WKUserContentController) AddScriptMessageHandlerWithReplyContentWorldName

func (u WKUserContentController) AddScriptMessageHandlerWithReplyContentWorldName(scriptMessageHandlerWithReply WKScriptMessageHandlerWithReply, contentWorld IWKContentWorld, name string)

Installs a message handler that returns a reply to your JavaScript code.

scriptMessageHandlerWithReply: The message handler object that implements your custom code. This object must adopt the WKScriptMessageHandlerWithReply protocol.

contentWorld: The content world in which to install the message handler. Use the content world to scope your message handler to specific parts of your JavaScript code.

name: The name of the message handler. This parameter must be unique within the user content controller and must not be an empty string.

The user content controller uses this parameter to define a JavaScript function for your message handler in all frames in the specified content world. The name of this function is `window.WebkitXCUIElementTypeMessageHandlers().“XCUIElementTypePostMessage()`, where corresponds to the value of this parameter. For example, if you specify the string [MyFunction], the user content controller defines the `window.WebkitXCUIElementTypeMessageHandlers().MyFunction.PostMessage()` function in JavaScript.

Discussion

To execute your handler’s code, call the JavaScript function that this method defines. You may pass a parameter value to the method. The user content controller packages that value into an appropriate type and delivers it to your content handler’s delegate method.

See: https://developer.apple.com/documentation/WebKit/WKUserContentController/addScriptMessageHandler(_:contentWorld:name:)

func (WKUserContentController) AddUserScript

func (u WKUserContentController) AddUserScript(userScript IWKUserScript)

Injects the specified script into the webpage’s content.

userScript: The user script to add to the web view’s current page.

See: https://developer.apple.com/documentation/WebKit/WKUserContentController/addUserScript(_:)

func (WKUserContentController) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (WKUserContentController) EncodeWithCoder

func (u WKUserContentController) EncodeWithCoder(coder foundation.INSCoder)

func (WKUserContentController) Init

Init initializes the instance.

func (WKUserContentController) RemoveAllContentRuleLists

func (u WKUserContentController) RemoveAllContentRuleLists()

Removes all rules lists from the content controller.

Discussion

This method removes the rule lists only from the user content controller object. You can still access rule lists from the WKContentRuleListStore objects you used to create them.

See: https://developer.apple.com/documentation/WebKit/WKUserContentController/removeAllContentRuleLists()

func (WKUserContentController) RemoveAllScriptMessageHandlers

func (u WKUserContentController) RemoveAllScriptMessageHandlers()

Uninstalls all custom message handlers associated with the user content controller.

Discussion

Use this method to remove all message handlers in all content worlds in your JavaScript code.

See: https://developer.apple.com/documentation/WebKit/WKUserContentController/removeAllScriptMessageHandlers()

func (WKUserContentController) RemoveAllScriptMessageHandlersFromContentWorld

func (u WKUserContentController) RemoveAllScriptMessageHandlersFromContentWorld(contentWorld IWKContentWorld)

Uninstalls all custom message handlers from the specified content world in your JavaScript code.

contentWorld: The content world from which to remove the message handler. For more information about content worlds, see WKContentWorld.

Discussion

Use this method to remove all message handlers in the specified content world. Message handlers in other content worlds are unaffected.

See: https://developer.apple.com/documentation/WebKit/WKUserContentController/removeAllScriptMessageHandlers(from:)

func (WKUserContentController) RemoveAllUserScripts

func (u WKUserContentController) RemoveAllUserScripts()

Removes all user scripts from the web view.

See: https://developer.apple.com/documentation/WebKit/WKUserContentController/removeAllUserScripts()

func (WKUserContentController) RemoveContentRuleList

func (u WKUserContentController) RemoveContentRuleList(contentRuleList IWKContentRuleList)

Removes the specified rule list from the content controller object.

contentRuleList: The rule list to remove.

Discussion

This method removes the rule list only from the user content controller object. You can still access the rule list from the WKContentRuleListStore object you used to create it.

See: https://developer.apple.com/documentation/WebKit/WKUserContentController/remove(_:)

func (WKUserContentController) RemoveScriptMessageHandlerForName

func (u WKUserContentController) RemoveScriptMessageHandlerForName(name string)

Uninstalls the custom message handler with the specified name from your JavaScript code.

name: The name of the message handler to remove. If no message handler with this name exists in the user content controller, this method does nothing.

Discussion

Use this method to remove a message handler that you previously installed using the WKUserContentController.AddScriptMessageHandlerName method. This method removes the message handler from the page content world — that is, the content world available from the WKContentWorldClass.PageWorld property of WKContentWorld. If you installed the message handler in a different content world, this method doesn’t remove it.

See: https://developer.apple.com/documentation/WebKit/WKUserContentController/removeScriptMessageHandler(forName:)

func (WKUserContentController) RemoveScriptMessageHandlerForNameContentWorld

func (u WKUserContentController) RemoveScriptMessageHandlerForNameContentWorld(name string, contentWorld IWKContentWorld)

Uninstalls a custom message handler from the specified content world in your JavaScript code.

name: The name of the message handler to remove. If no message handler with this name exists in the user content controller, this method does nothing.

contentWorld: The content world from which to remove the message handler. For more information about content worlds, see WKContentWorld.

See: https://developer.apple.com/documentation/WebKit/WKUserContentController/removeScriptMessageHandler(forName:contentWorld:)

func (WKUserContentController) UserScripts

func (u WKUserContentController) UserScripts() []WKUserScript

The user scripts associated with the user content controller.

See: https://developer.apple.com/documentation/WebKit/WKUserContentController/userScripts

type WKUserContentControllerClass

type WKUserContentControllerClass struct {
	// contains filtered or unexported fields
}

func GetWKUserContentControllerClass

func GetWKUserContentControllerClass() WKUserContentControllerClass

GetWKUserContentControllerClass returns the class object for WKUserContentController.

func (WKUserContentControllerClass) Alloc

Alloc allocates memory for a new instance of the class.

func (WKUserContentControllerClass) Class

Class returns the underlying Objective-C class pointer.

type WKUserInterfaceDirectionPolicy

type WKUserInterfaceDirectionPolicy int

See: https://developer.apple.com/documentation/WebKit/WKUserInterfaceDirectionPolicy

const (
	// WKUserInterfaceDirectionPolicyContent: The directionality follows the CSS/HTML/XHTML specifications.
	WKUserInterfaceDirectionPolicyContent WKUserInterfaceDirectionPolicy = 0
	// WKUserInterfaceDirectionPolicySystem: The directionality follows the view’s user interface layout direction.
	WKUserInterfaceDirectionPolicySystem WKUserInterfaceDirectionPolicy = 1
)

func (WKUserInterfaceDirectionPolicy) String

type WKUserScript

type WKUserScript struct {
	objectivec.Object
}

A script that the web view injects into a webpage.

Overview

Create a WKUserScript object when you want to inject custom script code into the pages of your web view. Use this object to specify the JavaScript code to inject, and parameters relating to when and how to inject that code. Before you create the web view, add this object to the WKUserContentController object associated with your web view’s configuration.

Creating a User Script Object

Inspecting Script Information

See: https://developer.apple.com/documentation/WebKit/WKUserScript

func NewUserScript deprecated

func NewUserScript() WKUserScript

Deprecated: Use NewWKUserScript instead.

func NewUserScriptWithSourceInjectionTimeForMainFrameOnly deprecated

func NewUserScriptWithSourceInjectionTimeForMainFrameOnly(source string, injectionTime WKUserScriptInjectionTime, forMainFrameOnly bool) WKUserScript

Deprecated: Use NewWKUserScriptWithSourceInjectionTimeForMainFrameOnly instead.

func NewUserScriptWithSourceInjectionTimeForMainFrameOnlyInContentWorld deprecated

func NewUserScriptWithSourceInjectionTimeForMainFrameOnlyInContentWorld(source string, injectionTime WKUserScriptInjectionTime, forMainFrameOnly bool, contentWorld IWKContentWorld) WKUserScript

Deprecated: Use NewWKUserScriptWithSourceInjectionTimeForMainFrameOnlyInContentWorld instead.

func NewWKUserScript

func NewWKUserScript() WKUserScript

NewWKUserScript creates a new WKUserScript instance.

func NewWKUserScriptWithSourceInjectionTimeForMainFrameOnly

func NewWKUserScriptWithSourceInjectionTimeForMainFrameOnly(source string, injectionTime WKUserScriptInjectionTime, forMainFrameOnly bool) WKUserScript

Creates a user script object that contains the specified source code and attributes.

source: The script’s source code.

injectionTime: The time at which to inject the script into the webpage. For a list of possible values, see WKUserScriptInjectionTime.

forMainFrameOnly: A Boolean value that indicates whether to inject the script into the main frame. Specify true to inject the script only into the main frame, or false to inject it into all frames.

Return Value

An initialized user script, or `nil` if initialization failed.

Discussion

This method sets the script’s content world to the object in the WKContentWorldClass.PageWorld property of WKContentWorld.

See: https://developer.apple.com/documentation/WebKit/WKUserScript/init(source:injectionTime:forMainFrameOnly:)

func NewWKUserScriptWithSourceInjectionTimeForMainFrameOnlyInContentWorld

func NewWKUserScriptWithSourceInjectionTimeForMainFrameOnlyInContentWorld(source string, injectionTime WKUserScriptInjectionTime, forMainFrameOnly bool, contentWorld IWKContentWorld) WKUserScript

Creates a user script object that is scoped to a particular content world.

source: The script’s source code.

injectionTime: The time at which to inject the script into the webpage. For a list of possible values, see WKUserScriptInjectionTime.

forMainFrameOnly: A Boolean value that indicates whether to inject the script into the main frame. Specify true to inject the script only into the main frame, or false to inject it into all frames.

contentWorld: The namespace in which to evaluate the script. This parameter doesn’t apply to changes your script makes to the underlying web content, such as the document’s DOM structure. Those changes remain visible to all scripts, regardless of which content world you specify. For more information about content worlds, see WKContentWorld.

Return Value

An initialized user script, or `nil` if initialization failed.

See: https://developer.apple.com/documentation/WebKit/WKUserScript/init(source:injectionTime:forMainFrameOnly:in:)

func WKUserScriptFromID

func WKUserScriptFromID(id objc.ID) WKUserScript

WKUserScriptFromID constructs a WKUserScript from an objc.ID.

A script that the web view injects into a webpage.

func (WKUserScript) Autorelease

func (u WKUserScript) Autorelease() WKUserScript

Autorelease adds the receiver to the current autorelease pool.

func (WKUserScript) Init

func (u WKUserScript) Init() WKUserScript

Init initializes the instance.

func (WKUserScript) InitWithSourceInjectionTimeForMainFrameOnly

func (u WKUserScript) InitWithSourceInjectionTimeForMainFrameOnly(source string, injectionTime WKUserScriptInjectionTime, forMainFrameOnly bool) WKUserScript

Creates a user script object that contains the specified source code and attributes.

source: The script’s source code.

injectionTime: The time at which to inject the script into the webpage. For a list of possible values, see WKUserScriptInjectionTime.

forMainFrameOnly: A Boolean value that indicates whether to inject the script into the main frame. Specify true to inject the script only into the main frame, or false to inject it into all frames.

Return Value

An initialized user script, or `nil` if initialization failed.

Discussion

This method sets the script’s content world to the object in the WKContentWorldClass.PageWorld property of WKContentWorld.

See: https://developer.apple.com/documentation/WebKit/WKUserScript/init(source:injectionTime:forMainFrameOnly:)

func (WKUserScript) InitWithSourceInjectionTimeForMainFrameOnlyInContentWorld

func (u WKUserScript) InitWithSourceInjectionTimeForMainFrameOnlyInContentWorld(source string, injectionTime WKUserScriptInjectionTime, forMainFrameOnly bool, contentWorld IWKContentWorld) WKUserScript

Creates a user script object that is scoped to a particular content world.

source: The script’s source code.

injectionTime: The time at which to inject the script into the webpage. For a list of possible values, see WKUserScriptInjectionTime.

forMainFrameOnly: A Boolean value that indicates whether to inject the script into the main frame. Specify true to inject the script only into the main frame, or false to inject it into all frames.

contentWorld: The namespace in which to evaluate the script. This parameter doesn’t apply to changes your script makes to the underlying web content, such as the document’s DOM structure. Those changes remain visible to all scripts, regardless of which content world you specify. For more information about content worlds, see WKContentWorld.

Return Value

An initialized user script, or `nil` if initialization failed.

See: https://developer.apple.com/documentation/WebKit/WKUserScript/init(source:injectionTime:forMainFrameOnly:in:)

func (WKUserScript) InjectionTime

func (u WKUserScript) InjectionTime() WKUserScriptInjectionTime

The time at which to inject the script into the webpage.

Discussion

The value is one of the constants of the enumerated type WKUserScriptInjectionTime.

See: https://developer.apple.com/documentation/WebKit/WKUserScript/injectionTime

func (WKUserScript) IsForMainFrameOnly added in v0.6.5

func (u WKUserScript) IsForMainFrameOnly() bool

A Boolean value that indicates whether to inject the script into the main frame or all frames.

Discussion

When the value of this property is true, the web view injects the script only into the main frame. When the value is false, the web view injects the script into all frames.

See: https://developer.apple.com/documentation/WebKit/WKUserScript/isForMainFrameOnly

func (WKUserScript) Source

func (u WKUserScript) Source() string

The script’s source code.

See: https://developer.apple.com/documentation/WebKit/WKUserScript/source

type WKUserScriptClass

type WKUserScriptClass struct {
	// contains filtered or unexported fields
}

func GetWKUserScriptClass

func GetWKUserScriptClass() WKUserScriptClass

GetWKUserScriptClass returns the class object for WKUserScript.

func (WKUserScriptClass) Alloc

func (wc WKUserScriptClass) Alloc() WKUserScript

Alloc allocates memory for a new instance of the class.

func (WKUserScriptClass) Class

func (wc WKUserScriptClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type WKUserScriptInjectionTime

type WKUserScriptInjectionTime int

See: https://developer.apple.com/documentation/WebKit/WKUserScriptInjectionTime

const (
	// WKUserScriptInjectionTimeAtDocumentEnd: A constant to inject the script after the document finishes loading, but before loading any other subresources.
	WKUserScriptInjectionTimeAtDocumentEnd WKUserScriptInjectionTime = 1
	// WKUserScriptInjectionTimeAtDocumentStart: A constant to inject the script after the creation of the webpage’s document element, but before loading any other content.
	WKUserScriptInjectionTimeAtDocumentStart WKUserScriptInjectionTime = 0
)

func (WKUserScriptInjectionTime) String

func (e WKUserScriptInjectionTime) String() string

type WKWebExtension

type WKWebExtension struct {
	objectivec.Object
}

An object that encapsulates a web extension’s resources that the manifest file defines.

Overview

This class reads and parses the `manifest.Json()` file along with the supporting resources like icons and localizations.

Instance Properties

Instance Methods

See: https://developer.apple.com/documentation/WebKit/WKWebExtension

func NewWKWebExtension

func NewWKWebExtension() WKWebExtension

NewWKWebExtension creates a new WKWebExtension instance.

func NewWebExtension deprecated

func NewWebExtension() WKWebExtension

Deprecated: Use NewWKWebExtension instead.

func WKWebExtensionFromID

func WKWebExtensionFromID(id objc.ID) WKWebExtension

WKWebExtensionFromID constructs a WKWebExtension from an objc.ID.

An object that encapsulates a web extension’s resources that the manifest file defines.

func (WKWebExtension) ActionIconForSize

func (w WKWebExtension) ActionIconForSize(size corefoundation.CGSize) appkit.NSImage

Returns the default action icon for the specified size.

size: The size to use when looking up the action icon.

Return Value

The action icon, or `nil` if the icon was unable to be loaded.

Discussion

This icon serves as a default and should be used to represent the extension in contexts like action sheets or toolbars prior to the extension being loaded into an extension context. Once the extension is loaded, use the WKWebExtensionContext.ActionForTab API to get the tab-specific icon.

The returned image will be the best match for the specified size that is available in the extension’s action icon set. If no matching icon is available, the method will fall back to the extension’s icon.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/actionIcon(for:)

func (WKWebExtension) AllRequestedMatchPatterns

func (w WKWebExtension) AllRequestedMatchPatterns() foundation.INSSet

The set of websites that the extension requires access to for injected content and for receiving messages from websites.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/allRequestedMatchPatterns

func (WKWebExtension) Autorelease

func (w WKWebExtension) Autorelease() WKWebExtension

Autorelease adds the receiver to the current autorelease pool.

func (WKWebExtension) DefaultLocale

func (w WKWebExtension) DefaultLocale() foundation.NSLocale

The default locale for the extension.

Discussion

Returns `nil` if there was no default locale specified.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/defaultLocale

func (WKWebExtension) DisplayActionLabel

func (w WKWebExtension) DisplayActionLabel() string

The default localized extension action label.

Discussion

Returns `nil` if there was no default action label specified.

This label serves as a default and should be used to represent the extension in contexts like action sheets or toolbars prior to the extension being loaded into an extension context. Once the extension is loaded, use the WKWebExtensionContext.ActionForTab API to get the tab-specific label.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/displayActionLabel

func (WKWebExtension) DisplayDescription

func (w WKWebExtension) DisplayDescription() string

The localized extension description.

Discussion

Returns `nil` if there was no description specified.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/displayDescription

func (WKWebExtension) DisplayName

func (w WKWebExtension) DisplayName() string

The localized extension name.

Discussion

Returns `nil` if there was no name specified.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/displayName

func (WKWebExtension) DisplayShortName

func (w WKWebExtension) DisplayShortName() string

The localized extension short name.

Discussion

Returns `nil` if there was no short name specified.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/displayShortName

func (WKWebExtension) DisplayVersion

func (w WKWebExtension) DisplayVersion() string

The localized extension display version.

Discussion

Returns `nil` if there was no display version specified.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/displayVersion

func (WKWebExtension) Errors

func (w WKWebExtension) Errors() []foundation.NSError

An array of all errors that occurred during the processing of the extension.

Discussion

Provides an array of all parse-time errors for the extension, with repeat errors consolidated into a single entry for the original occurrence only. If no errors occurred, an empty array is returned.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/errors

func (WKWebExtension) HasBackgroundContent

func (w WKWebExtension) HasBackgroundContent() bool

A Boolean value indicating whether the extension has background content that can run when needed.

Discussion

If this property is [YES], the extension can run in the background even when no webpages are open.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/hasBackgroundContent

func (WKWebExtension) HasCommands

func (w WKWebExtension) HasCommands() bool

A Boolean value indicating whether the extension includes commands that users can invoke.

Discussion

If this property is [YES], the extension contains one or more commands that can be performed by the user. These commands should be accessible via keyboard shortcuts, menu items, or other user interface elements provided by the app. The list of commands can be accessed via WKWebExtensionContext.Commands on an extension context, and invoked via WKWebExtensionContext.PerformCommand.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/hasCommands

func (WKWebExtension) HasContentModificationRules

func (w WKWebExtension) HasContentModificationRules() bool

A Boolean value indicating whether the extension includes rules used for content modification or blocking.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/hasContentModificationRules

func (WKWebExtension) HasInjectedContent

func (w WKWebExtension) HasInjectedContent() bool

A Boolean value indicating whether the extension has script or stylesheet content that can be injected into webpages.

Discussion

If this property is [YES], the extension has content that can be injected by matching against the extension’s requested match patterns.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/hasInjectedContent

func (WKWebExtension) HasOptionsPage

func (w WKWebExtension) HasOptionsPage() bool

A Boolean value indicating whether the extension has an options page.

Discussion

If this property is [YES], the extension includes a dedicated options page where users can customize settings. The app should provide access to this page through a user interface element, which can be accessed via WKWebExtensionContext.OptionsPageURL on an extension context.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/hasOptionsPage

func (WKWebExtension) HasOverrideNewTabPage

func (w WKWebExtension) HasOverrideNewTabPage() bool

A Boolean value indicating whether the extension provides an alternative to the default new tab page.

Discussion

If this property is [YES], the extension can specify a custom page that can be displayed when a new tab is opened in the app, instead of the default new tab page. The app should prompt the user for permission to use the extension’s new tab page as the default, which can be accessed via WKWebExtensionContext.OverrideNewTabPageURL on an extension context.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/hasOverrideNewTabPage

func (WKWebExtension) HasPersistentBackgroundContent

func (w WKWebExtension) HasPersistentBackgroundContent() bool

A Boolean value indicating whether the extension has background content that stays in memory as long as the extension is loaded.

Discussion

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/hasPersistentBackgroundContent

func (WKWebExtension) IconForSize

func (w WKWebExtension) IconForSize(size corefoundation.CGSize) appkit.NSImage

Returns the extension’s icon image for the specified size.

size: The size to use when looking up the icon.

Return Value

The extension’s icon image, or `nil` if the icon was unable to be loaded.

Discussion

This icon should represent the extension in settings or other areas that show the extension. The returned image will be the best match for the specified size that is available in the extension’s icon set. If no matching icon can be found, the method will return `nil`.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/icon(for:)

func (WKWebExtension) Init

func (w WKWebExtension) Init() WKWebExtension

Init initializes the instance.

func (WKWebExtension) Manifest

The parsed manifest as a dictionary.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/manifest

func (WKWebExtension) ManifestVersion

func (w WKWebExtension) ManifestVersion() float64

The parsed manifest version, or `0` if there is no version specified in the manifest.

Discussion

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/manifestVersion

func (WKWebExtension) OptionalPermissionMatchPatterns

func (w WKWebExtension) OptionalPermissionMatchPatterns() foundation.INSSet

The set of websites that the extension may need access to for optional functionality.

Discussion

These match patterns can be requested by the extension at a later time.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/optionalPermissionMatchPatterns

func (WKWebExtension) OptionalPermissions

func (w WKWebExtension) OptionalPermissions() foundation.INSSet

The set of permissions that the extension may need for optional functionality.

Discussion

These permissions can be requested by the extension at a later time.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/optionalPermissions

func (WKWebExtension) RequestedPermissionMatchPatterns

func (w WKWebExtension) RequestedPermissionMatchPatterns() foundation.INSSet

The set of websites that the extension requires access to for its base functionality.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/requestedPermissionMatchPatterns

func (WKWebExtension) RequestedPermissions

func (w WKWebExtension) RequestedPermissions() foundation.INSSet

The set of permissions that the extension requires for its base functionality.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/requestedPermissions

func (WKWebExtension) SupportsManifestVersion

func (w WKWebExtension) SupportsManifestVersion(manifestVersion float64) bool

Checks if a manifest version is supported by the extension.

manifestVersion: The version number to check.

Return Value

Returns [YES] if the extension specified a manifest version that is greater than or equal to `manifestVersion`.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/supportsManifestVersion(_:)

func (WKWebExtension) Version

func (w WKWebExtension) Version() string

The extension version.

Discussion

Returns `nil` if there was no version specified.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/version

type WKWebExtensionAction

type WKWebExtensionAction struct {
	objectivec.Object
}

An object that encapsulates the properties for an individual web extension action.

Overview

This class provides access to action properties, such as pop-up, icon, or title, with tab-specific values.

Instance Properties

Instance Methods

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/Action

func NewWKWebExtensionAction

func NewWKWebExtensionAction() WKWebExtensionAction

NewWKWebExtensionAction creates a new WKWebExtensionAction instance.

func NewWebExtensionAction deprecated

func NewWebExtensionAction() WKWebExtensionAction

Deprecated: Use NewWKWebExtensionAction instead.

func WKWebExtensionActionFromID

func WKWebExtensionActionFromID(id objc.ID) WKWebExtensionAction

WKWebExtensionActionFromID constructs a WKWebExtensionAction from an objc.ID.

An object that encapsulates the properties for an individual web extension action.

func (WKWebExtensionAction) AssociatedTab

func (w WKWebExtensionAction) AssociatedTab() WKWebExtensionTab

The tab that this action is associated with, or `nil` if it’s the default action.

Discussion

When this property is `nil`, it indicates that the action is the default action and not associated with a specific tab.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/Action/associatedTab

func (WKWebExtensionAction) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (WKWebExtensionAction) BadgeText

func (w WKWebExtensionAction) BadgeText() string

The badge text for the action.

Discussion

Provides the text that appears on the badge for the action. An empty string signifies that no badge should be shown.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/Action/badgeText

func (WKWebExtensionAction) ClosePopup

func (w WKWebExtensionAction) ClosePopup()

Triggers the dismissal process of the pop-up.

Discussion

Invoke this method to manage the pop-up’s lifecycle, ensuring the web view is unloaded and resources are released once the pop-up closes. This method is automatically called upon the dismissal of the action’s UIViewController or NSPopover. For custom scenarios where the pop-up’s lifecycle is manually managed, it must be explicitly invoked to ensure proper closure.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/Action/closePopup()

func (WKWebExtensionAction) HasUnreadBadgeText

func (w WKWebExtensionAction) HasUnreadBadgeText() bool

A Boolean value indicating whether the badge text is unread.

Discussion

This property is automatically set to [YES] when WKWebExtensionAction.BadgeText changes and is not empty. If WKWebExtensionAction.BadgeText becomes empty or the popup associated with the action is presented, this property is automatically set to [NO]. Additionally, it should be set to [NO] by the app when the badge has been presented to the user. This property is useful for higher-level notification badges when extensions might be hidden behind an action sheet.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/Action/hasUnreadBadgeText

func (WKWebExtensionAction) IconForSize

Returns the action icon for the specified size.

size: The size to use when looking up the action icon.

Return Value

The action icon, or `nil` if the icon was unable to be loaded.

Discussion

This icon should represent the extension in action sheets or toolbars. The returned image will be the best match for the specified size that is available in the extension’s action icon set. If no matching icon is available, the method will fall back to the extension’s icon.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/Action/icon(for:)

func (WKWebExtensionAction) Init

Init initializes the instance.

func (WKWebExtensionAction) InspectionName

func (w WKWebExtensionAction) InspectionName() string

The name shown when inspecting the pop-up web view.

Discussion

This is the text that will appear when inspecting the pop-up web view.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/Action/inspectionName

func (WKWebExtensionAction) IsEnabled added in v0.6.5

func (w WKWebExtensionAction) IsEnabled() bool

A Boolean value indicating whether the action is enabled.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/Action/isEnabled

func (WKWebExtensionAction) Label

func (w WKWebExtensionAction) Label() string

The localized display label for the action.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/Action/label

func (WKWebExtensionAction) MenuItems

func (w WKWebExtensionAction) MenuItems() []appkit.NSMenuItem

The menu items provided by the extension for this action.

Discussion

Provides menu items supplied by the extension, allowing the user to perform extension-defined actions.

The app is responsible for displaying these menu items, typically in a context menu or a long-press menu on the action in action sheets or toolbars.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/Action/menuItems

func (WKWebExtensionAction) PopupPopover

func (w WKWebExtensionAction) PopupPopover() appkit.NSPopover

A popover that presents a web view loaded with the pop-up page for this action, or `nil` if no popup is specified.

Discussion

This popover contains a view controller with a web view preloaded with the pop-up page. It automatically adjusts its size to fit the web view’s content size. The WKWebExtensionAction.PresentsPopup property should be checked to determine the availability of a pop-up before using this property. Dismissing the popover will close the pop-up and unload the web view.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/Action/popupPopover

func (WKWebExtensionAction) PopupWebView

func (w WKWebExtensionAction) PopupWebView() IWKWebView

A web view loaded with the pop-up page for this action, or `nil` if no pop-up is specified.

Discussion

The web view will be preloaded with the pop-up page upon first access or after it has been unloaded. Use the WKWebExtensionAction.PresentsPopup property to determine whether a pop-up should be displayed before using this property.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/Action/popupWebView

func (WKWebExtensionAction) PresentsPopup

func (w WKWebExtensionAction) PresentsPopup() bool

A Boolean value indicating whether the action has a pop-up.

Discussion

Use this property to check if the action has a pop-up before attempting to show any pop-up views.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/Action/presentsPopup

func (WKWebExtensionAction) SetHasUnreadBadgeText

func (w WKWebExtensionAction) SetHasUnreadBadgeText(value bool)

func (WKWebExtensionAction) SetInspectionName

func (w WKWebExtensionAction) SetInspectionName(value string)

func (WKWebExtensionAction) WebExtensionContext

func (w WKWebExtensionAction) WebExtensionContext() IWKWebExtensionContext

The extension context to which this action is related.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/Action/webExtensionContext

type WKWebExtensionActionClass

type WKWebExtensionActionClass struct {
	// contains filtered or unexported fields
}

func GetWKWebExtensionActionClass

func GetWKWebExtensionActionClass() WKWebExtensionActionClass

GetWKWebExtensionActionClass returns the class object for WKWebExtensionAction.

func (WKWebExtensionActionClass) Alloc

Alloc allocates memory for a new instance of the class.

func (WKWebExtensionActionClass) Class

Class returns the underlying Objective-C class pointer.

type WKWebExtensionClass

type WKWebExtensionClass struct {
	// contains filtered or unexported fields
}

func GetWKWebExtensionClass

func GetWKWebExtensionClass() WKWebExtensionClass

GetWKWebExtensionClass returns the class object for WKWebExtension.

func (WKWebExtensionClass) Alloc

Alloc allocates memory for a new instance of the class.

func (WKWebExtensionClass) Class

func (wc WKWebExtensionClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

func (WKWebExtensionClass) ExtensionWithAppExtensionBundle

func (wc WKWebExtensionClass) ExtensionWithAppExtensionBundle(ctx context.Context, appExtensionBundle foundation.NSBundle) (*WKWebExtension, error)

ExtensionWithAppExtensionBundle is a synchronous wrapper around [WKWebExtension.ExtensionWithAppExtensionBundleCompletionHandler]. It blocks until the completion handler fires or the context is cancelled.

func (WKWebExtensionClass) ExtensionWithAppExtensionBundleCompletionHandler

func (_WKWebExtensionClass WKWebExtensionClass) ExtensionWithAppExtensionBundleCompletionHandler(appExtensionBundle foundation.NSBundle, completionHandler WKWebExtensionErrorHandler)

Returns a web extension initialized with a specified app extension bundle.

appExtensionBundle: The bundle to use for the new web extension.

completionHandler: A block to be called with an initialized web extension, or `nil` if the object could not be initialized due to an error.

Discussion

The app extension bundle must contain a `manifest.Json()` file in its resources directory. If the manifest is invalid or missing, or the bundle is otherwise improperly configured, an error will be returned.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/extensionWithAppExtensionBundle:completionHandler:

func (WKWebExtensionClass) ExtensionWithResourceBaseURL

func (wc WKWebExtensionClass) ExtensionWithResourceBaseURL(ctx context.Context, resourceBaseURL foundation.NSURL) (*WKWebExtension, error)

ExtensionWithResourceBaseURL is a synchronous wrapper around [WKWebExtension.ExtensionWithResourceBaseURLCompletionHandler]. It blocks until the completion handler fires or the context is cancelled.

func (WKWebExtensionClass) ExtensionWithResourceBaseURLCompletionHandler

func (_WKWebExtensionClass WKWebExtensionClass) ExtensionWithResourceBaseURLCompletionHandler(resourceBaseURL foundation.NSURL, completionHandler WKWebExtensionErrorHandler)

Returns a web extension initialized with a specified resource base URL, which can point to either a directory or a ZIP archive.

resourceBaseURL: The file URL to use for the new web extension.

completionHandler: A block to be called with an initialized web extension, or `nil` if the object could not be initialized due to an error.

Discussion

The URL must be a file URL that points to either a directory with a `manifest.Json()` file or a ZIP archive containing a `manifest.Json()` file. If the manifest is invalid or missing, or the URL points to an unsupported format or invalid archive, an error will be returned.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/extensionWithResourceBaseURL:completionHandler:

type WKWebExtensionCommand

type WKWebExtensionCommand struct {
	objectivec.Object
}

An object that encapsulates the properties for an individual web extension command.

Overview

Provides access to command properties such as a unique identifier, a descriptive title, and shortcut keys. Commands can be used by a web extension to perform specific actions within a web extension context, such toggling features, or interacting with web content. These commands enhance the functionality of the extension by allowing users to invoke actions quickly.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/Command

func NewWKWebExtensionCommand

func NewWKWebExtensionCommand() WKWebExtensionCommand

NewWKWebExtensionCommand creates a new WKWebExtensionCommand instance.

func NewWebExtensionCommand deprecated

func NewWebExtensionCommand() WKWebExtensionCommand

Deprecated: Use NewWKWebExtensionCommand instead.

func WKWebExtensionCommandFromID

func WKWebExtensionCommandFromID(id objc.ID) WKWebExtensionCommand

WKWebExtensionCommandFromID constructs a WKWebExtensionCommand from an objc.ID.

An object that encapsulates the properties for an individual web extension command.

func (WKWebExtensionCommand) ActivationKey

func (w WKWebExtensionCommand) ActivationKey() string

The primary key used to trigger the command, distinct from any modifier flags.

Discussion

This property can be customized within the app to avoid conflicts with existing shortcuts or to enable user personalization.

It should accurately represent the activation key as used by the app, which the extension can use to display the complete shortcut in its interface.

If no shortcut is desired for the command, the property should be set to `nil`. This value should be saved and restored as needed by the app.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/Command/activationKey

func (WKWebExtensionCommand) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (WKWebExtensionCommand) Identifier

func (w WKWebExtensionCommand) Identifier() string

A unique identifier for the command.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/Command/id

func (WKWebExtensionCommand) Init

Init initializes the instance.

func (WKWebExtensionCommand) MenuItem

A menu item representation of the web extension command for use in menus.

Discussion

Provides a representation of the web extension command as a menu item to display in the app.

Selecting the menu item will perform the command, offering a convenient and visual way for users to execute this web extension command.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/Command/menuItem

func (WKWebExtensionCommand) ModifierFlags

The modifier flags used with the activation key to trigger the command.

Discussion

This property can be customized within the app to avoid conflicts with existing shortcuts or to enable user personalization. It should accurately represent the modifier keys as used by the app, which the extension can use to display the complete shortcut in its interface.

If no modifiers are desired for the command, the property should be set to `0`. This value should be saved and restored as needed by the app.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/Command/modifierFlags

func (WKWebExtensionCommand) SetActivationKey

func (w WKWebExtensionCommand) SetActivationKey(value string)

func (WKWebExtensionCommand) SetModifierFlags

func (w WKWebExtensionCommand) SetModifierFlags(value appkit.NSEventModifierFlags)

func (WKWebExtensionCommand) Title

func (w WKWebExtensionCommand) Title() string

A descriptive title for the command to help discoverability.

Discussion

This title can be displayed in user interface elements such as keyboard shortcuts lists or menu items to help users understand its purpose.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/Command/title

func (WKWebExtensionCommand) WebExtensionContext

func (w WKWebExtensionCommand) WebExtensionContext() IWKWebExtensionContext

The web extension context associated with the command.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/Command/webExtensionContext

type WKWebExtensionCommandClass

type WKWebExtensionCommandClass struct {
	// contains filtered or unexported fields
}

func GetWKWebExtensionCommandClass

func GetWKWebExtensionCommandClass() WKWebExtensionCommandClass

GetWKWebExtensionCommandClass returns the class object for WKWebExtensionCommand.

func (WKWebExtensionCommandClass) Alloc

Alloc allocates memory for a new instance of the class.

func (WKWebExtensionCommandClass) Class

Class returns the underlying Objective-C class pointer.

type WKWebExtensionContext

type WKWebExtensionContext struct {
	objectivec.Object
}

An object that represents the runtime environment for a web extension.

Overview

This class provides methods for managing the extension’s permissions, allowing it to inject content, run background logic, show popovers, and display other web-based UI to the user.

Initializers

Instance Properties

Instance Methods

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext

func NewWKWebExtensionContext

func NewWKWebExtensionContext() WKWebExtensionContext

NewWKWebExtensionContext creates a new WKWebExtensionContext instance.

func NewWKWebExtensionContextForExtension

func NewWKWebExtensionContextForExtension(extension IWKWebExtension) WKWebExtensionContext

Returns a web extension context initialized with a specified extension.

extension: The extension to use for the new web extension context.

Return Value

An initialized web extension context.

Discussion

This is a designated initializer.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/init(for:)

func NewWebExtensionContext deprecated

func NewWebExtensionContext() WKWebExtensionContext

Deprecated: Use NewWKWebExtensionContext instead.

func NewWebExtensionContextForExtension deprecated

func NewWebExtensionContextForExtension(extension IWKWebExtension) WKWebExtensionContext

Deprecated: Use NewWKWebExtensionContextForExtension instead.

func WKWebExtensionContextFromID

func WKWebExtensionContextFromID(id objc.ID) WKWebExtensionContext

WKWebExtensionContextFromID constructs a WKWebExtensionContext from an objc.ID.

An object that represents the runtime environment for a web extension.

func (WKWebExtensionContext) ActionForTab

Retrieves the extension action for a given tab, or the default action if `nil` is passed.

tab: The tab for which to retrieve the extension action, or `nil` to get the default action.

Discussion

The returned object represents the action specific to the tab when provided; otherwise, it returns the default action. The default action is useful when the context is unrelated to a specific tab. When possible, specify the tab to get the most context-relevant action.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/action(for:)

func (WKWebExtensionContext) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (WKWebExtensionContext) BaseURL

The base URL the context uses for loading extension resources or injecting content into webpages.

Discussion

The default value is a unique URL using the `webkit-extension` scheme. The base URL can be set to any URL, but only the scheme and host will be used. The scheme cannot be a scheme that is already supported by WKWebView (e.g. http, https, etc.). Setting is only allowed when the context is not loaded.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/baseURL

func (WKWebExtensionContext) ClearUserGestureInTab

func (w WKWebExtensionContext) ClearUserGestureInTab(tab WKWebExtensionTab)

Called by the app to clear a user gesture in a specific tab.

tab: The tab from which the user gesture should be cleared.

Discussion

When a user gesture is no longer relevant in a tab, this method should be called to update the extension context.

This will revoke the extension’s access to features that require active user interaction, such as `activeTab`. User gestures are automatically cleared during navigation in certain scenarios; this method is needed if the app intends to clear the gesture more aggressively.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/clearUserGesture(in:)

func (WKWebExtensionContext) CommandForEvent

Retrieves the command associated with the given event without performing it.

event: The event for which to retrieve the corresponding command.

Return Value

The command associated with the event, or `nil` if there is no such command.

Discussion

Returns the command that corresponds to the provided event, if such a command exists. This provides a way to programmatically determine what action would occur for a given event, without triggering the command.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/command(for:)

func (WKWebExtensionContext) Commands

The commands associated with the extension.

Discussion

Provides all commands registered within the extension. Each command represents an action or behavior available for the web extension.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/commands

func (WKWebExtensionContext) CurrentPermissionMatchPatterns

func (w WKWebExtensionContext) CurrentPermissionMatchPatterns() foundation.INSSet

The currently granted permission match patterns that have not expired.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/currentPermissionMatchPatterns

func (WKWebExtensionContext) CurrentPermissions

func (w WKWebExtensionContext) CurrentPermissions() foundation.INSSet

The currently granted permissions that have not expired.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/currentPermissions

func (WKWebExtensionContext) DeniedPermissionMatchPatterns

func (w WKWebExtensionContext) DeniedPermissionMatchPatterns() foundation.INSDictionary

The currently denied permission match patterns and their expiration dates.

Discussion

Match patterns that don’t expire will have a distant future date. This will never include expired entries at time of access.

Setting this property will replace all existing entries. Use this property for saving and restoring permission status in bulk.

Match patterns in this dictionary should be explicitly denied by the user before being added. Any match pattern in this collection will not be presented for approval again until they expire. This value should be saved and restored as needed by the app.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/deniedPermissionMatchPatterns

func (WKWebExtensionContext) DeniedPermissions

func (w WKWebExtensionContext) DeniedPermissions() foundation.INSDictionary

The currently denied permissions and their expiration dates.

Discussion

Permissions that don’t expire will have a distant future date. This will never include expired entries at time of access.

Setting this property will replace all existing entries. Use this property for saving and restoring permission status in bulk.

Permissions in this dictionary should be explicitly denied by the user before being added. Any match pattern in this collection will not be presented for approval again until they expire. This value should be saved and restored as needed by the app.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/deniedPermissions

func (WKWebExtensionContext) DidActivateTabPreviousActiveTab

func (w WKWebExtensionContext) DidActivateTabPreviousActiveTab(activatedTab WKWebExtensionTab, previousTab WKWebExtensionTab)

Called by the app when a tab is activated to notify only this specific extension.

activatedTab: The tab that has become active.

previousTab: The tab that was active before. This parameter can be `nil` if there was no previously active tab.

Discussion

This method informs only the specific extension of the tab activation. If the intention is to inform all loaded extensions consistently, you should use the respective method on the extension controller instead.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/didActivateTab:previousActiveTab:

func (WKWebExtensionContext) DidChangeTabPropertiesForTab

func (w WKWebExtensionContext) DidChangeTabPropertiesForTab(properties WKWebExtensionTabChangedProperties, changedTab WKWebExtensionTab)

Called by the app when the properties of a tab are changed to fire appropriate events with only this extension.

properties: The properties of the tab that were changed.

changedTab: The tab whose properties were changed.

Discussion

This method informs only the specific extension of the changes to a tab’s properties. If the intention is to inform all loaded extensions consistently, you should use the respective method on the extension controller instead.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/didChangeTabProperties(_:for:)

func (WKWebExtensionContext) DidCloseTabWindowIsClosing

func (w WKWebExtensionContext) DidCloseTabWindowIsClosing(closedTab WKWebExtensionTab, windowIsClosing bool)

Called by the app when a tab is closed to fire appropriate events with only this extension.

closedTab: The tab that was closed.

windowIsClosing: A Boolean value indicating whether the window containing the tab is also closing.

Discussion

This method informs only the specific extension of the closure of a tab. If the intention is to inform all loaded extensions consistently, you should use the respective method on the extension controller instead.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/didCloseTab:windowIsClosing:

func (WKWebExtensionContext) DidCloseWindow

func (w WKWebExtensionContext) DidCloseWindow(closedWindow WKWebExtensionWindow)

Called by the app when a window is closed to fire appropriate events with only this extension.

closedWindow: The window that was closed.

Discussion

This method informs only the specific extension of the closure of a window. If the intention is to inform all loaded extensions consistently, you should use the respective method on the extension controller instead.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/didCloseWindow(_:)

func (WKWebExtensionContext) DidDeselectTabs

func (w WKWebExtensionContext) DidDeselectTabs(deselectedTabs []objectivec.IObject)

Called by the app when tabs are deselected to fire appropriate events with only this extension.

deselectedTabs: The set of tabs that were deselected.

Discussion

This method informs only the specific extension that tabs have been deselected. If the intention is to inform all loaded extensions consistently, you should use the respective method on the extension controller instead.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/didDeselectTabs(_:)

func (WKWebExtensionContext) DidFocusWindow

func (w WKWebExtensionContext) DidFocusWindow(focusedWindow WKWebExtensionWindow)

Called by the app when a window gains focus to fire appropriate events with only this extension.

focusedWindow: The window that gained focus, or `nil` if no window has focus or a window has focus that is not visible to this extension.

Discussion

This method informs only the specific extension that a window has gained focus. If the intention is to inform all loaded extensions consistently, you should use the respective method on the extension controller instead.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/didFocusWindow(_:)

func (WKWebExtensionContext) DidMoveTabFromIndexInWindow

func (w WKWebExtensionContext) DidMoveTabFromIndexInWindow(movedTab WKWebExtensionTab, index uint, oldWindow WKWebExtensionWindow)

Called by the app when a tab is moved to fire appropriate events with only this extension.

movedTab: The tab that was moved.

index: The old index of the tab within the window.

oldWindow: The window that the tab was moved from, or `nil` if the tab isn’t moving from an open window.

Discussion

If the window is staying the same, the current window should be specified. This method informs only the specific extension that a tab has been moved. If the intention is to inform all loaded extensions consistently, you should use the respective method on the extension controller instead.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/didMoveTab:fromIndex:inWindow:

func (WKWebExtensionContext) DidOpenTab

func (w WKWebExtensionContext) DidOpenTab(newTab WKWebExtensionTab)

Called by the app when a new tab is opened to fire appropriate events with only this extension.

newTab: The newly opened tab.

Discussion

This method informs only the specific extension of the opening of a new tab. If the intention is to inform all loaded extensions consistently, you should use the respective method on the extension controller instead.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/didOpenTab(_:)

func (WKWebExtensionContext) DidOpenWindow

func (w WKWebExtensionContext) DidOpenWindow(newWindow WKWebExtensionWindow)

Called by the app when a new window is opened to fire appropriate events with only this extension.

newWindow: The newly opened window.

Discussion

This method informs only the specific extension of the opening of a new window. If the intention is to inform all loaded extensions consistently, you should use the respective method on the extension controller instead.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/didOpenWindow(_:)

func (WKWebExtensionContext) DidReplaceTabWithTab

func (w WKWebExtensionContext) DidReplaceTabWithTab(oldTab WKWebExtensionTab, newTab WKWebExtensionTab)

Called by the app when a tab is replaced by another tab to fire appropriate events with only this extension.

oldTab: The tab that was replaced.

newTab: The tab that replaced the old tab.

Discussion

This method informs only the specific extension that a tab has been replaced. If the intention is to inform all loaded extensions consistently, you should use the respective method on the extension controller instead.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/didReplaceTab(_:with:)

func (WKWebExtensionContext) DidSelectTabs

func (w WKWebExtensionContext) DidSelectTabs(selectedTabs []objectivec.IObject)

Called by the app when tabs are selected to fire appropriate events with only this extension.

selectedTabs: The set of tabs that were selected.

Discussion

This method informs only the specific extension that tabs have been selected. If the intention is to inform all loaded extensions consistently, you should use the respective method on the extension controller instead.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/didSelectTabs(_:)

func (WKWebExtensionContext) Errors

All errors that occurred in the extension context.

Discussion

Provides an array of all parse-time and runtime errors for the extension and extension context, with repeat errors consolidated into a single entry for the original occurrence. If no errors occurred, an empty array is returned.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/errors

func (WKWebExtensionContext) FocusedWindow

func (w WKWebExtensionContext) FocusedWindow() WKWebExtensionWindow

The window that currently has focus for this extension.

Discussion

Provides the window that currently has focus, as set by the WKWebExtensionContext.DidFocusWindow method.

It will be `nil` if no window has focus or if a window has focus that is not visible to the extension. Initially populated by the window returned by the extension controller delegate method [WebExtensionControllerFocusedWindowForExtensionContext].

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/focusedWindow

func (WKWebExtensionContext) GrantedPermissionMatchPatterns

func (w WKWebExtensionContext) GrantedPermissionMatchPatterns() foundation.INSDictionary

The currently granted permission match patterns and their expiration dates.

Discussion

Match patterns that don’t expire will have a distant future date. This will never include expired entries at time of access.

Setting this property will replace all existing entries. Use this property for saving and restoring permission status in bulk.

Match patterns in this dictionary should be explicitly granted by the user before being added. Any match pattern in this collection will not be presented for approval again until they expire. This value should be saved and restored as needed by the app.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/grantedPermissionMatchPatterns

func (WKWebExtensionContext) GrantedPermissions

func (w WKWebExtensionContext) GrantedPermissions() foundation.INSDictionary

The currently granted permissions and their expiration dates.

Discussion

Permissions that don’t expire will have a distant future date. This will never include expired entries at time of access.

Setting this property will replace all existing entries. Use this property for saving and restoring permission status in bulk.

Permissions in this dictionary should be explicitly granted by the user before being added. Any permissions in this collection will not be presented for approval again until they expire. This value should be saved and restored as needed by the app.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/grantedPermissions

func (WKWebExtensionContext) HasAccessToAllHosts

func (w WKWebExtensionContext) HasAccessToAllHosts() bool

A Boolean value indicating if the currently granted permission match patterns set contains the “ pattern or any `*` host patterns.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/hasAccessToAllHosts

func (WKWebExtensionContext) HasAccessToAllURLs

func (w WKWebExtensionContext) HasAccessToAllURLs() bool

A Boolean value indicating if the currently granted permission match patterns set contains the “ pattern.

Discussion

This does not check for any `*` host patterns. In most cases you should use the broader WKWebExtensionContext.HasAccessToAllHosts.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/hasAccessToAllURLs

func (WKWebExtensionContext) HasAccessToPrivateData

func (w WKWebExtensionContext) HasAccessToPrivateData() bool

A Boolean value indicating if the extension has access to private data.

Discussion

If this property is true, the extension is granted permission to interact with private windows, tabs, and cookies. Access to private data should be explicitly allowed by the user before setting this property. This value should be saved and restored as needed by the app.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/hasAccessToPrivateData

func (WKWebExtensionContext) HasAccessToURL

func (w WKWebExtensionContext) HasAccessToURL(url foundation.NSURL) bool

Checks the specified URL against the currently granted permission match patterns.

url: The URL for which to return the status.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/hasAccess(to:)

func (WKWebExtensionContext) HasAccessToURLInTab

func (w WKWebExtensionContext) HasAccessToURLInTab(url foundation.NSURL, tab WKWebExtensionTab) bool

Checks the specified URL against the currently granted permission match patterns in a specific tab.

url: The URL for which to return the status.

tab: The tab in which to return the permission status, or `nil` if the tab is not known or the global status is desired.

Discussion

Some match patterns can be granted on a per-tab basis. When the tab is known, access checks should always use this method.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/hasAccess(to:in:)

func (WKWebExtensionContext) HasActiveUserGestureInTab

func (w WKWebExtensionContext) HasActiveUserGestureInTab(tab WKWebExtensionTab) bool

Indicates if a user gesture is currently active in the specified tab.

tab: The tab for which to check for an active user gesture.

Discussion

An active user gesture may influence the availability of certain permissions, such as `activeTab`. User gestures can be triggered by various user interactions with the web extension, including clicking on extension menu items, executing extension commands, or interacting with extension actions. A tab as having an active user gesture enables the extension to access features that require user interaction.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/hasActiveUserGesture(in:)

func (WKWebExtensionContext) HasContentModificationRules

func (w WKWebExtensionContext) HasContentModificationRules() bool

A boolean value indicating whether the extension includes rules used for content modification or blocking.

Discussion

This includes both static rules available in the extension’s manifest and dynamic rules applied during a browsing session.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/hasContentModificationRules

func (WKWebExtensionContext) HasInjectedContent

func (w WKWebExtensionContext) HasInjectedContent() bool

A Boolean value indicating whether the extension has script or stylesheet content that can be injected into webpages.

Discussion

If this property is [YES], the extension has content that can be injected by matching against the extension’s requested match patterns.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/hasInjectedContent

func (WKWebExtensionContext) HasInjectedContentForURL

func (w WKWebExtensionContext) HasInjectedContentForURL(url foundation.NSURL) bool

Checks if the extension has script or stylesheet content that can be injected into the specified URL.

url: The webpage URL to check.

Return Value

Returns [YES] if the extension has content that can be injected by matching the URL against the extension’s requested match patterns.

Discussion

The extension context will still need to be loaded and have granted website permissions for its content to actually be injected.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/hasInjectedContent(for:)

func (WKWebExtensionContext) HasPermission

func (w WKWebExtensionContext) HasPermission(permission WKWebExtensionPermission) bool

Checks the specified permission against the currently granted permissions.

permission: The permission for which to return the status.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/hasPermission(_:)

func (WKWebExtensionContext) HasPermissionInTab

func (w WKWebExtensionContext) HasPermissionInTab(permission WKWebExtensionPermission, tab WKWebExtensionTab) bool

Checks the specified permission against the currently granted permissions in a specific tab.

permission: The permission for which to return the status.

tab: The tab in which to return the permission status, or `nil` if the tab is not known or the global status is desired.

Discussion

Permissions can be granted on a per-tab basis. When the tab is known, permission checks should always use this method.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/hasPermission(_:in:)

func (WKWebExtensionContext) HasRequestedOptionalAccessToAllHosts

func (w WKWebExtensionContext) HasRequestedOptionalAccessToAllHosts() bool

A Boolean value indicating if the extension has requested optional access to all hosts.

Discussion

If this property is [YES], the extension has asked for access to all hosts in a call to `browser.RuntimeXCUIElementTypePermissionsXCUIElementTypeRequest()`, and future permission checks will present discrete hosts for approval as being implicitly requested. This value should be saved and restored as needed by the app.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/hasRequestedOptionalAccessToAllHosts

func (WKWebExtensionContext) Init

Init initializes the instance.

func (WKWebExtensionContext) InitForExtension

func (w WKWebExtensionContext) InitForExtension(extension IWKWebExtension) WKWebExtensionContext

Returns a web extension context initialized with a specified extension.

extension: The extension to use for the new web extension context.

Return Value

An initialized web extension context.

Discussion

This is a designated initializer.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/init(for:)

func (WKWebExtensionContext) InspectionName

func (w WKWebExtensionContext) InspectionName() string

The name shown when inspecting the background web view.

Discussion

This is the text that will appear when inspecting the background web view.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/inspectionName

func (WKWebExtensionContext) IsInspectable added in v0.6.5

func (w WKWebExtensionContext) IsInspectable() bool

Determines whether Web Inspector can inspect the WKWebView instances for this context.

Discussion

A context can control multiple WKWebView instances, from the background content, to the popover.

You should set this to [YES] when needed for debugging purposes. The default value is [NO].

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/isInspectable

func (WKWebExtensionContext) IsLoaded added in v0.6.5

func (w WKWebExtensionContext) IsLoaded() bool

A Boolean value indicating if this context is loaded in an extension controller.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/isLoaded

func (WKWebExtensionContext) LoadBackgroundContent

func (w WKWebExtensionContext) LoadBackgroundContent(ctx context.Context) error

LoadBackgroundContent is a synchronous wrapper around WKWebExtensionContext.LoadBackgroundContentWithCompletionHandler. It blocks until the completion handler fires or the context is cancelled.

func (WKWebExtensionContext) LoadBackgroundContentWithCompletionHandler

func (w WKWebExtensionContext) LoadBackgroundContentWithCompletionHandler(completionHandler ErrorHandler)

Loads the background content if needed for the extension.

completionHandler: A block to be called upon completion of the loading process, with an optional error.

Discussion

This method forces the loading of the background content for the extension that will otherwise be loaded on-demand during specific events.

It is useful when the app requires the background content to be loaded for other reasons. If the background content is already loaded, the completion handler will be called immediately. An error will occur if the extension does not have any background content to load or loading fails.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/loadBackgroundContent(completionHandler:)

func (WKWebExtensionContext) MenuItemsForTab

func (w WKWebExtensionContext) MenuItemsForTab(tab WKWebExtensionTab) []appkit.NSMenuItem

Retrieves the menu items for a given tab.

tab: The tab for which to retrieve the menu items.

Discussion

Returns menu items provided by the extension, allowing the user to perform extension-defined actions on the tab.

The app is responsible for displaying these menu items, typically in a context menu or a long-press menu on the tab.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/menuItems(for:)

func (WKWebExtensionContext) OpenTabs

A set of open tabs in all open windows that are exposed to this extension.

Discussion

Provides a set of tabs in all open windows that are visible to the extension, as updated by the WKWebExtensionContext.DidOpenTab and WKWebExtensionContext.DidCloseTabWindowIsClosing methods.

Initially populated by the tabs in the windows returned by the extension controller delegate method [WebExtensionControllerOpenWindowsForExtensionContext].

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/openTabs

func (WKWebExtensionContext) OpenWindows

func (w WKWebExtensionContext) OpenWindows() []objectivec.IObject

The open windows that are exposed to this extension.

Discussion

Provides the windows that are open and visible to the extension, as updated by the WKWebExtensionContext.DidOpenWindow and WKWebExtensionContext.DidCloseWindow methods.

Initially populated by the windows returned by the extension controller delegate method [WebExtensionControllerOpenWindowsForExtensionContext].

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/openWindows

func (WKWebExtensionContext) OptionsPageURL

func (w WKWebExtensionContext) OptionsPageURL() foundation.NSURL

The URL of the extension’s options page, if the extension has one.

Discussion

Provides the URL for the dedicated options page, if provided by the extension; otherwise `nil` if no page is defined.

The app should provide access to this page through a user interface element.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/optionsPageURL

func (WKWebExtensionContext) OverrideNewTabPageURL

func (w WKWebExtensionContext) OverrideNewTabPageURL() foundation.NSURL

The URL to use as an alternative to the default new tab page, if the extension has one.

Discussion

Provides the URL for a new tab page, if provided by the extension; otherwise `nil` if no page is defined.

The app should prompt the user for permission to use the extension’s new tab page as the default.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/overrideNewTabPageURL

func (WKWebExtensionContext) PerformActionForTab

func (w WKWebExtensionContext) PerformActionForTab(tab WKWebExtensionTab)

Performs the extension action associated with the specified tab or performs the default action if `nil` is passed.

tab: The tab for which to perform the extension action, or `nil` to perform the default action.

Discussion

Performing the action will mark the tab, if specified, as having an active user gesture. When the `tab` parameter is `nil`, the default action is performed. The action can either trigger an event or display a popup, depending on how the extension is configured.

If the action is configured to display a popup, implementing the appropriate web extension controller delegate method is required; otherwise, no action is performed for popup actions.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/performAction(for:)

func (WKWebExtensionContext) PerformCommand

func (w WKWebExtensionContext) PerformCommand(command IWKWebExtensionCommand)

Performs the specified command, triggering events specific to this extension.

command: The command to be performed.

Discussion

This method performs the given command as if it was triggered by a user gesture within the context of the focused window and active tab.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/performCommand(_:)

func (WKWebExtensionContext) PerformCommandForEvent

func (w WKWebExtensionContext) PerformCommandForEvent(event appkit.NSEvent) bool

Performs the command associated with the given event.

event: The event representing the user input.

Return Value

Returns [YES] if a command corresponding to the event was found and performed, [NO] otherwise.

Discussion

This method checks for a command corresponding to the provided event and performs it, if available. The app should use this method to perform any extension commands at an appropriate time in the app’s event handling, like in sendEvent(_:) of NSApplication or sendEvent(_:) of NSWindow subclasses.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/performCommand(for:)-8btj0

func (WKWebExtensionContext) PermissionStatusForMatchPattern

Checks the specified match pattern against the currently denied, granted, and requested permission match patterns.

pattern: The pattern for which to return the status.

Discussion

Match patterns can be granted on a per-tab basis. When the tab is known, access checks should always use the method that checks in a tab.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/permissionStatus(for:)-7mu8

func (WKWebExtensionContext) PermissionStatusForMatchPatternInTab

Checks the specified match pattern against the currently denied, granted, and requested permission match patterns.

pattern: The pattern for which to return the status.

tab: The tab in which to return the permission status, or `nil` if the tab is not known or the global status is desired.

Discussion

Match patterns can be granted on a per-tab basis. When the tab is known, access checks should always use this method.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/permissionStatus(for:in:)-nqhm

func (WKWebExtensionContext) PermissionStatusForPermission

func (w WKWebExtensionContext) PermissionStatusForPermission(permission WKWebExtensionPermission) WKWebExtensionContextPermissionStatus

Checks the specified permission against the currently denied, granted, and requested permissions.

permission: The permission for which to return the status.

Discussion

Permissions can be granted on a per-tab basis. When the tab is known, access checks should always use the method that checks in a tab.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/permissionStatus(for:)-3qq2w

func (WKWebExtensionContext) PermissionStatusForPermissionInTab

func (w WKWebExtensionContext) PermissionStatusForPermissionInTab(permission WKWebExtensionPermission, tab WKWebExtensionTab) WKWebExtensionContextPermissionStatus

Checks the specified permission against the currently denied, granted, and requested permissions.

permission: The permission for which to return the status.

tab: The tab in which to return the permission status, or `nil` if the tab is not known or the global status is desired.

Discussion

Permissions can be granted on a per-tab basis. When the tab is known, access checks should always specify the tab.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/permissionStatus(for:in:)-4h82n

func (WKWebExtensionContext) PermissionStatusForURL

Checks the specified URL against the currently denied, granted, and requested permission match patterns.

url: The URL for which to return the status.

Discussion

URLs and match patterns can be granted on a per-tab basis. When the tab is known, access checks should always use the method that checks in a tab.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/permissionStatus(for:)-7ojrb

func (WKWebExtensionContext) PermissionStatusForURLInTab

Checks the specified URL against the currently denied, granted, and requested permission match patterns.

url: The URL for which to return the status.

tab: The tab in which to return the permission status, or `nil` if the tab is not known or the global status is desired.

Discussion

URLs and match patterns can be granted on a per-tab basis. When the tab is known, access checks should always use this method.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/permissionStatus(for:in:)-96xaf

func (WKWebExtensionContext) SetBaseURL

func (w WKWebExtensionContext) SetBaseURL(value foundation.NSURL)

func (WKWebExtensionContext) SetDeniedPermissionMatchPatterns

func (w WKWebExtensionContext) SetDeniedPermissionMatchPatterns(value foundation.INSDictionary)

func (WKWebExtensionContext) SetDeniedPermissions

func (w WKWebExtensionContext) SetDeniedPermissions(value foundation.INSDictionary)

func (WKWebExtensionContext) SetGrantedPermissionMatchPatterns

func (w WKWebExtensionContext) SetGrantedPermissionMatchPatterns(value foundation.INSDictionary)

func (WKWebExtensionContext) SetGrantedPermissions

func (w WKWebExtensionContext) SetGrantedPermissions(value foundation.INSDictionary)

func (WKWebExtensionContext) SetHasAccessToPrivateData

func (w WKWebExtensionContext) SetHasAccessToPrivateData(value bool)

func (WKWebExtensionContext) SetHasRequestedOptionalAccessToAllHosts

func (w WKWebExtensionContext) SetHasRequestedOptionalAccessToAllHosts(value bool)

func (WKWebExtensionContext) SetInspectable

func (w WKWebExtensionContext) SetInspectable(value bool)

func (WKWebExtensionContext) SetInspectionName

func (w WKWebExtensionContext) SetInspectionName(value string)

func (WKWebExtensionContext) SetPermissionStatusForMatchPattern

func (w WKWebExtensionContext) SetPermissionStatusForMatchPattern(status WKWebExtensionContextPermissionStatus, pattern IWKWebExtensionMatchPattern)

Sets the status of a match pattern with a distant future expiration date.

status: The new permission status to set for the given match pattern.

pattern: The match pattern for which to set the status.

Discussion

This method will update WKWebExtensionContext.GrantedPermissionMatchPatterns and WKWebExtensionContext.DeniedPermissionMatchPatterns. Use this method for changing a single match pattern’s status. Only WKWebExtensionContextPermissionStatusDeniedExplicitly, WKWebExtensionContextPermissionStatusUnknown, and WKWebExtensionContextPermissionStatusGrantedExplicitly states are allowed to be set using this method.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/setPermissionStatus(_:for:)-6auqv

func (WKWebExtensionContext) SetPermissionStatusForMatchPatternExpirationDate

func (w WKWebExtensionContext) SetPermissionStatusForMatchPatternExpirationDate(status WKWebExtensionContextPermissionStatus, pattern IWKWebExtensionMatchPattern, expirationDate foundation.NSDate)

Sets the status of a match pattern with a specific expiration date.

status: The new permission status to set for the given match pattern.

pattern: The match pattern for which to set the status.

expirationDate: The expiration date for the new permission status, or `nil` for distant future.

Discussion

This method will update WKWebExtensionContext.GrantedPermissionMatchPatterns and WKWebExtensionContext.DeniedPermissionMatchPatterns. Use this method for changing a single match pattern’s status.

Passing a `nil` expiration date will be treated as a distant future date. Only WKWebExtensionContextPermissionStatusDeniedExplicitly, WKWebExtensionContextPermissionStatusUnknown, and WKWebExtensionContextPermissionStatusGrantedExplicitly states are allowed to be set using this method.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/setPermissionStatus(_:for:expirationDate:)-7038f

func (WKWebExtensionContext) SetPermissionStatusForPermission

func (w WKWebExtensionContext) SetPermissionStatusForPermission(status WKWebExtensionContextPermissionStatus, permission WKWebExtensionPermission)

Sets the status of a permission with a distant future expiration date.

status: The new permission status to set for the given permission.

permission: The permission for which to set the status.

Discussion

This method will update WKWebExtensionContext.GrantedPermissions and WKWebExtensionContext.DeniedPermissions. Use this method for changing a single permission’s status.

Only WKWebExtensionContextPermissionStatusDeniedExplicitly, WKWebExtensionContextPermissionStatusUnknown, and WKWebExtensionContextPermissionStatusGrantedExplicitly states are allowed to be set using this method.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/setPermissionStatus(_:for:)-4u95f

func (WKWebExtensionContext) SetPermissionStatusForPermissionExpirationDate

func (w WKWebExtensionContext) SetPermissionStatusForPermissionExpirationDate(status WKWebExtensionContextPermissionStatus, permission WKWebExtensionPermission, expirationDate foundation.NSDate)

Sets the status of a permission with a specific expiration date.

status: The new permission status to set for the given permission.

permission: The permission for which to set the status.

expirationDate: The expiration date for the new permission status, or \c nil for distant future.

Discussion

This method will update WKWebExtensionContext.GrantedPermissions and WKWebExtensionContext.DeniedPermissions. Use this method for changing a single permission’s status.

Passing a `nil` expiration date will be treated as a distant future date. Only WKWebExtensionContextPermissionStatusDeniedExplicitly, WKWebExtensionContextPermissionStatusUnknown, and WKWebExtensionContextPermissionStatusGrantedExplicitly states are allowed to be set using this method.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/setPermissionStatus(_:for:expirationDate:)-692ui

func (WKWebExtensionContext) SetPermissionStatusForURL

func (w WKWebExtensionContext) SetPermissionStatusForURL(status WKWebExtensionContextPermissionStatus, url foundation.NSURL)

Sets the permission status of a URL with a distant future expiration date.

status: The new permission status to set for the given URL.

url: The URL for which to set the status.

Discussion

The URL is converted into a match pattern and will update WKWebExtensionContext.GrantedPermissionMatchPatterns and WKWebExtensionContext.DeniedPermissionMatchPatterns. Use this method for changing a single URL’s status. Only WKWebExtensionContextPermissionStatusDeniedExplicitly, WKWebExtensionContextPermissionStatusUnknown, and WKWebExtensionContextPermissionStatusGrantedExplicitly states are allowed to be set using this method.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/setPermissionStatus(_:for:)-5xahd

func (WKWebExtensionContext) SetPermissionStatusForURLExpirationDate

func (w WKWebExtensionContext) SetPermissionStatusForURLExpirationDate(status WKWebExtensionContextPermissionStatus, url foundation.NSURL, expirationDate foundation.NSDate)

Sets the permission status of a URL with a distant future expiration date.

status: The new permission status to set for the given URL.

url: The URL for which to set the status.

expirationDate: The expiration date for the new permission status, or `nil` for distant future.

Discussion

The URL is converted into a match pattern and will update WKWebExtensionContext.GrantedPermissionMatchPatterns and WKWebExtensionContext.DeniedPermissionMatchPatterns. Use this method for changing a single URL’s status. Passing a `nil` expiration date will be treated as a distant future date. Only WKWebExtensionContextPermissionStatusDeniedExplicitly, WKWebExtensionContextPermissionStatusUnknown, and WKWebExtensionContextPermissionStatusGrantedExplicitly states are allowed to be set using this method.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/setPermissionStatus(_:for:expirationDate:)-5q9id

func (WKWebExtensionContext) SetUniqueIdentifier

func (w WKWebExtensionContext) SetUniqueIdentifier(value string)

func (WKWebExtensionContext) SetUnsupportedAPIs

func (w WKWebExtensionContext) SetUnsupportedAPIs(value foundation.INSSet)

func (WKWebExtensionContext) UniqueIdentifier

func (w WKWebExtensionContext) UniqueIdentifier() string

A unique identifier used to distinguish the extension from other extensions and target it for messages.

Discussion

The default value is a unique value that matches the host in the default base URL. The identifier can be any value that is unique. Setting is only allowed when the context is not loaded. This value is accessible by the extension via `browser.RuntimeXCUIElementTypeId()` and is used for messaging the extension via `browser.RuntimeXCUIElementTypeSendMessage()`.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/uniqueIdentifier

func (WKWebExtensionContext) UnsupportedAPIs

func (w WKWebExtensionContext) UnsupportedAPIs() foundation.INSSet

Specifies unsupported APIs for this extension, making them `undefined` in JavaScript.

Discussion

This property allows the app to specify a subset of web extension APIs that it chooses not to support, effectively making these APIs `undefined` within the extension’s JavaScript contexts. This enables extensions to employ feature detection techniques for unsupported APIs, allowing them to adapt their behavior based on the APIs actually supported by the app. Setting is only allowed when the context is not loaded. Only certain APIs can be specified here, particularly those within the `browser` namespace and other dynamic functions and properties, anything else will be silently ignored.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/unsupportedAPIs

func (WKWebExtensionContext) UserGesturePerformedInTab

func (w WKWebExtensionContext) UserGesturePerformedInTab(tab WKWebExtensionTab)

Should be called by the app when a user gesture is performed in a specific tab.

tab: The tab in which the user gesture was performed.

Discussion

When a user gesture is performed in a tab, this method should be called to update the extension context.

This enables the extension to be aware of the user gesture, potentially granting it access to features that require user interaction, such as `activeTab`. Not required if using WKWebExtensionContext.PerformActionForTab.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/userGesturePerformed(in:)

func (WKWebExtensionContext) WebExtension

func (w WKWebExtensionContext) WebExtension() IWKWebExtension

The extension this context represents.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/webExtension

func (WKWebExtensionContext) WebExtensionController

func (w WKWebExtensionContext) WebExtensionController() IWKWebExtensionController

The extension controller this context is loaded in, otherwise `nil` if it isn’t loaded.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/webExtensionController

func (WKWebExtensionContext) WebViewConfiguration

func (w WKWebExtensionContext) WebViewConfiguration() IWKWebViewConfiguration

The web view configuration to use for web views that load pages from this extension.

Discussion

Returns a customized copy of the configuration, originally set in the web extension controller configuration, for this extension.

The app must use this configuration when initializing web views intended to navigate to a URL originating from this extension’s base URL.

The app must also swap web views in tabs when navigating to and from web extension URLs. This property returns `nil` if the context isn’t associated with a web extension controller. The returned configuration copy can be customized prior to web view initialization.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/webViewConfiguration

type WKWebExtensionContextClass

type WKWebExtensionContextClass struct {
	// contains filtered or unexported fields
}

func GetWKWebExtensionContextClass

func GetWKWebExtensionContextClass() WKWebExtensionContextClass

GetWKWebExtensionContextClass returns the class object for WKWebExtensionContext.

func (WKWebExtensionContextClass) Alloc

Alloc allocates memory for a new instance of the class.

func (WKWebExtensionContextClass) Class

Class returns the underlying Objective-C class pointer.

func (WKWebExtensionContextClass) ContextForExtension

func (_WKWebExtensionContextClass WKWebExtensionContextClass) ContextForExtension(extension IWKWebExtension) WKWebExtensionContext

Returns a web extension context initialized with the specified extension.

extension: The extension to use for the new web extension context.

Return Value

An initialized web extension context.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/contextForExtension:

type WKWebExtensionContextError

type WKWebExtensionContextError int

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/Error/Code

const (
	// WKWebExtensionContextErrorAlreadyLoaded: Indicates that the context is already loaded by a WKWebExtensionController.
	WKWebExtensionContextErrorAlreadyLoaded WKWebExtensionContextError = 2
	// WKWebExtensionContextErrorBackgroundContentFailedToLoad: Indicates that an error occurred loading the background content.
	WKWebExtensionContextErrorBackgroundContentFailedToLoad WKWebExtensionContextError = 6
	// WKWebExtensionContextErrorBaseURLAlreadyInUse: Indicates that another context is already using the specified base URL.
	WKWebExtensionContextErrorBaseURLAlreadyInUse WKWebExtensionContextError = 4
	// WKWebExtensionContextErrorNoBackgroundContent: Indicates that the extension does not have background content.
	WKWebExtensionContextErrorNoBackgroundContent WKWebExtensionContextError = 5
	// WKWebExtensionContextErrorNotLoaded: Indicates that the context is not loaded by a WKWebExtensionController.
	WKWebExtensionContextErrorNotLoaded WKWebExtensionContextError = 3
	// WKWebExtensionContextErrorUnknown: Indicates that an unknown error occurred.
	WKWebExtensionContextErrorUnknown WKWebExtensionContextError = 1
)

func (WKWebExtensionContextError) String

type WKWebExtensionContextNotificationUserInfoKey

type WKWebExtensionContextNotificationUserInfoKey = string

WKWebExtensionContextNotificationUserInfoKey is constants for specifying web extension context information in notifications.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/NotificationUserInfoKey

type WKWebExtensionContextPermissionStatus

type WKWebExtensionContextPermissionStatus int

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionContext/PermissionStatus

const (
	// WKWebExtensionContextPermissionStatusDeniedExplicitly: Indicates that the permission was explicitly denied.
	WKWebExtensionContextPermissionStatusDeniedExplicitly WKWebExtensionContextPermissionStatus = -3
	// WKWebExtensionContextPermissionStatusDeniedImplicitly: Indicates that the permission was implicitly denied because of another explicitly denied permission.
	WKWebExtensionContextPermissionStatusDeniedImplicitly WKWebExtensionContextPermissionStatus = -2
	// WKWebExtensionContextPermissionStatusGrantedExplicitly: Indicates that the permission was explicitly granted permission.
	WKWebExtensionContextPermissionStatusGrantedExplicitly WKWebExtensionContextPermissionStatus = 3
	// WKWebExtensionContextPermissionStatusGrantedImplicitly: Indicates that the permission was implicitly granted because of another explicitly granted permission.
	WKWebExtensionContextPermissionStatusGrantedImplicitly WKWebExtensionContextPermissionStatus = 2
	// WKWebExtensionContextPermissionStatusRequestedExplicitly: Indicates that the permission was explicitly requested.
	WKWebExtensionContextPermissionStatusRequestedExplicitly WKWebExtensionContextPermissionStatus = 1
	// WKWebExtensionContextPermissionStatusRequestedImplicitly: Indicates that the permission was implicitly requested because of another explicitly requested permission.
	WKWebExtensionContextPermissionStatusRequestedImplicitly WKWebExtensionContextPermissionStatus = -1
	// WKWebExtensionContextPermissionStatusUnknown: Indicates an unknown permission status.
	WKWebExtensionContextPermissionStatusUnknown WKWebExtensionContextPermissionStatus = 0
)

func (WKWebExtensionContextPermissionStatus) String

type WKWebExtensionController

type WKWebExtensionController struct {
	objectivec.Object
}

An object that manages a set of loaded extension contexts.

Overview

You can have one or more extension controller instances, allowing different parts of the app to use different sets of extensions.

You can associate a controller with WKWebView using the WKWebViewConfiguration.WebExtensionController property on WKWebViewConfiguration.

Initializers

Instance Properties

Instance Methods

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionController

func NewWKWebExtensionController

func NewWKWebExtensionController() WKWebExtensionController

NewWKWebExtensionController creates a new WKWebExtensionController instance.

func NewWKWebExtensionControllerWithConfiguration

func NewWKWebExtensionControllerWithConfiguration(configuration IWKWebExtensionControllerConfiguration) WKWebExtensionController

Returns a web extension controller initialized with the specified configuration.

configuration: The configuration for the new web extension controller.

Return Value

An initialized web extension controller, or nil if the object could not be initialized.

Discussion

This is a designated initializer. You can use WKWebExtensionController.Init to initialize an instance with the default configuration. The initializer copies the specified configuration, so mutating the configuration after invoking the initializer has no effect on the web extension controller.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionController/init(configuration:)

func NewWebExtensionController deprecated

func NewWebExtensionController() WKWebExtensionController

Deprecated: Use NewWKWebExtensionController instead.

func NewWebExtensionControllerWithConfiguration deprecated

func NewWebExtensionControllerWithConfiguration(configuration IWKWebExtensionControllerConfiguration) WKWebExtensionController

Deprecated: Use NewWKWebExtensionControllerWithConfiguration instead.

func WKWebExtensionControllerFromID

func WKWebExtensionControllerFromID(id objc.ID) WKWebExtensionController

WKWebExtensionControllerFromID constructs a WKWebExtensionController from an objc.ID.

An object that manages a set of loaded extension contexts.

func (WKWebExtensionController) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (WKWebExtensionController) Configuration

A copy of the configuration with which the web extension controller was initialized.

Discussion

Mutating the configuration has no effect on the web extension controller.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionController/configuration-swift.property

func (WKWebExtensionController) DidActivateTabPreviousActiveTab

func (w WKWebExtensionController) DidActivateTabPreviousActiveTab(activatedTab WKWebExtensionTab, previousTab WKWebExtensionTab)

Should be called by the app when a tab is activated to notify all loaded web extensions.

activatedTab: The tab that has become active.

previousTab: The tab that was active before. This parameter can be \c nil if there was no previously active tab.

Discussion

This method informs all loaded extensions of the tab activation, ensuring consistent state awareness across extensions.

If the intention is to inform only a specific extension, use the respective method on that extension’s context instead.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionController/didActivateTab:previousActiveTab:

func (WKWebExtensionController) DidChangeTabPropertiesForTab

func (w WKWebExtensionController) DidChangeTabPropertiesForTab(properties WKWebExtensionTabChangedProperties, changedTab WKWebExtensionTab)

Should be called by the app when the properties of a tab are changed to fire appropriate events with all loaded web extensions.

properties: The properties of the tab that were changed.

changedTab: The tab whose properties were changed.

Discussion

This method informs all loaded extensions of changes to tab properties, ensuring a unified understanding across extensions.

If the intention is to inform only a specific extension, you should use the respective method on that extension’s context instead.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionController/didChangeTabProperties(_:for:)

func (WKWebExtensionController) DidCloseTabWindowIsClosing

func (w WKWebExtensionController) DidCloseTabWindowIsClosing(closedTab WKWebExtensionTab, windowIsClosing bool)

Should be called by the app when a tab is closed to fire appropriate events with all loaded web extensions.

closedTab: The tab that was closed.

windowIsClosing: A boolean value indicating whether the window containing the tab is also closing.

Discussion

This method informs all loaded extensions of the closing of a tab, ensuring consistent understanding across extensions.

If the intention is to inform only a specific extension, you should use the respective method on that extension’s context instead.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionController/didCloseTab:windowIsClosing:

func (WKWebExtensionController) DidCloseWindow

func (w WKWebExtensionController) DidCloseWindow(closedWindow WKWebExtensionWindow)

Should be called by the app when a window is closed to fire appropriate events with all loaded web extensions.

Discussion

- closedWindow: The window that was closed.

This method informs all loaded extensions of the closure of a window, ensuring consistent understanding across extensions.

If the intention is to inform only a specific extension, you should use the respective method on that extension’s context instead.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionController/didCloseWindow(_:)

func (WKWebExtensionController) DidDeselectTabs

func (w WKWebExtensionController) DidDeselectTabs(deselectedTabs []objectivec.IObject)

Should be called by the app when tabs are deselected to fire appropriate events with all loaded web extensions.

deselectedTabs: The set of tabs that were deselected.

Discussion

This method informs all loaded extensions that tabs have been deselected, ensuring consistent understanding across extensions.

If the intention is to inform only a specific extension, you should use the respective method on that extension’s context instead.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionController/didDeselectTabs(_:)

func (WKWebExtensionController) DidFocusWindow

func (w WKWebExtensionController) DidFocusWindow(focusedWindow WKWebExtensionWindow)

Should be called by the app when a window gains focus to fire appropriate events with all loaded web extensions.

focusedWindow: The window that gained focus, or \c nil if no window has focus or a window has focus that is not visible to extensions.

Discussion

This method informs all loaded extensions of the focused window, ensuring consistent understanding across extensions.

If the intention is to inform only a specific extension, you should use the respective method on that extension’s context instead.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionController/didFocusWindow(_:)

func (WKWebExtensionController) DidMoveTabFromIndexInWindow

func (w WKWebExtensionController) DidMoveTabFromIndexInWindow(movedTab WKWebExtensionTab, index uint, oldWindow WKWebExtensionWindow)

Should be called by the app when a tab is moved to fire appropriate events with all loaded web extensions.

movedTab: The tab that was moved.

index: The old index of the tab within the window.

oldWindow: The window that the tab was moved from, or `nil` if the tab is moving from no open window.

Discussion

This method informs all loaded extensions of the movement of a tab, ensuring consistent understanding across extensions.

If the window is staying the same, the current window should be specified. If the intention is to inform only a specific extension, use the respective method on that extension’s context instead.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionController/didMoveTab:fromIndex:inWindow:

func (WKWebExtensionController) DidOpenTab

func (w WKWebExtensionController) DidOpenTab(newTab WKWebExtensionTab)

Should be called by the app when a new tab is opened to fire appropriate events with all loaded web extensions.

newTab: The newly opened tab.

Discussion

This method informs all loaded extensions of the opening of a new tab, ensuring consistent understanding across extensions.

If the intention is to inform only a specific extension, you should use the respective method on that extension’s context instead.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionController/didOpenTab(_:)

func (WKWebExtensionController) DidOpenWindow

func (w WKWebExtensionController) DidOpenWindow(newWindow WKWebExtensionWindow)

Should be called by the app when a new window is opened to fire appropriate events with all loaded web extensions.

newWindow: The newly opened window.

Discussion

This method informs all loaded extensions of the opening of a new window, ensuring consistent understanding across extensions.

If the intention is to inform only a specific extension, you should use the respective method on that extension’s context instead.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionController/didOpenWindow(_:)

func (WKWebExtensionController) DidReplaceTabWithTab

func (w WKWebExtensionController) DidReplaceTabWithTab(oldTab WKWebExtensionTab, newTab WKWebExtensionTab)

Should be called by the app when a tab is replaced by another tab to fire appropriate events with all loaded web extensions.

oldTab: The tab that was replaced.

newTab: The tab that replaced the old tab.

Discussion

This method informs all loaded extensions of the replacement of a tab, ensuring consistent understanding across extensions.

If the intention is to inform only a specific extension, you should use the respective method on that extension’s context instead.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionController/didReplaceTab(_:with:)

func (WKWebExtensionController) DidSelectTabs

func (w WKWebExtensionController) DidSelectTabs(selectedTabs []objectivec.IObject)

Should be called by the app when tabs are selected to fire appropriate events with all loaded web extensions.

selectedTabs: The set of tabs that were selected.

Discussion

This method informs all loaded extensions that tabs have been selected, ensuring consistent understanding across extensions.

If the intention is to inform only a specific extension, you should use the respective method on that extension’s context instead.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionController/didSelectTabs(_:)

func (WKWebExtensionController) ExtensionContextForExtension

func (w WKWebExtensionController) ExtensionContextForExtension(extension IWKWebExtension) IWKWebExtensionContext

Returns a loaded extension context for the specified extension.

extension: An extension to lookup.

Return Value

An extension context or `nil` if no match was found.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionController/extensionContext(for:)-6ecpm

func (WKWebExtensionController) ExtensionContextForURL

func (w WKWebExtensionController) ExtensionContextForURL(URL foundation.NSURL) IWKWebExtensionContext

Returns a loaded extension context matching the specified URL.

URL: The URL to lookup.

Return Value

An extension context or `nil` if no match was found.

Discussion

This method is useful for determining the extension context to use when about to navigate to an extension URL. For example, you could use this method to retrieve the appropriate extension context and then use its WKWebExtensionContext.WebViewConfiguration property to configure a web view for loading that URL.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionController/extensionContext(for:)-2kr4

func (WKWebExtensionController) ExtensionContexts

func (w WKWebExtensionController) ExtensionContexts() foundation.INSSet

A set of all the currently loaded extension contexts.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionController/extensionContexts

func (WKWebExtensionController) Extensions

A set of all the currently loaded extensions.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionController/extensions

func (WKWebExtensionController) FetchDataRecordOfTypesForExtensionContext

func (w WKWebExtensionController) FetchDataRecordOfTypesForExtensionContext(ctx context.Context, dataTypes foundation.INSSet, extensionContext IWKWebExtensionContext) (*WKWebExtensionDataRecord, error)

FetchDataRecordOfTypesForExtensionContext is a synchronous wrapper around WKWebExtensionController.FetchDataRecordOfTypesForExtensionContextCompletionHandler. It blocks until the completion handler fires or the context is cancelled.

func (WKWebExtensionController) FetchDataRecordOfTypesForExtensionContextCompletionHandler

func (w WKWebExtensionController) FetchDataRecordOfTypesForExtensionContextCompletionHandler(dataTypes foundation.INSSet, extensionContext IWKWebExtensionContext, completionHandler WKWebExtensionDataRecordHandler)

Fetches a data record containing the given extension data types for a specific known web extension context.

dataTypes: The extension data types to fetch records for.

extensionContext: The specific web extension context to fetch records for.

completionHandler: A block to invoke when the data record has been fetched.

Discussion

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionController/fetchDataRecord(ofTypes:for:completionHandler:)

func (WKWebExtensionController) FetchDataRecordsOfTypes added in v0.6.10

func (w WKWebExtensionController) FetchDataRecordsOfTypes(ctx context.Context, dataTypes foundation.INSSet) ([]WKWebExtensionDataRecord, error)

FetchDataRecordsOfTypes is a synchronous wrapper around WKWebExtensionController.FetchDataRecordsOfTypesCompletionHandler. It blocks until the completion handler fires or the context is cancelled.

func (WKWebExtensionController) FetchDataRecordsOfTypesCompletionHandler added in v0.6.10

func (w WKWebExtensionController) FetchDataRecordsOfTypesCompletionHandler(dataTypes foundation.INSSet, completionHandler WKWebExtensionDataRecordArrayHandler)

Fetches data records containing the given extension data types for all known extensions.

dataTypes: The extension data types to fetch records for.

completionHandler: A block to invoke when the data records have been fetched.

Discussion

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionController/fetchDataRecords(ofTypes:completionHandler:)

func (WKWebExtensionController) Init

Init initializes the instance.

func (WKWebExtensionController) InitWithConfiguration

Returns a web extension controller initialized with the specified configuration.

configuration: The configuration for the new web extension controller.

Return Value

An initialized web extension controller, or nil if the object could not be initialized.

Discussion

This is a designated initializer. You can use WKWebExtensionController.Init to initialize an instance with the default configuration. The initializer copies the specified configuration, so mutating the configuration after invoking the initializer has no effect on the web extension controller.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionController/init(configuration:)

func (WKWebExtensionController) LoadExtensionContextError

func (w WKWebExtensionController) LoadExtensionContextError(extensionContext IWKWebExtensionContext) (bool, error)

Loads the specified extension context.

Discussion

Causes the context to start, loading any background content, and injecting any content into relevant tabs.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionController/load(_:)

func (WKWebExtensionController) RemoveDataOfTypesFromDataRecordsCompletionHandler

func (w WKWebExtensionController) RemoveDataOfTypesFromDataRecordsCompletionHandler(dataTypes foundation.INSSet, dataRecords []WKWebExtensionDataRecord, completionHandler VoidHandler)

Removes extension data of the given types for the given data records.

dataTypes: The extension data types that should be removed.

dataRecords: The extension data records to delete data from.

completionHandler: A block to invoke when the data has been removed.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionController/removeData(ofTypes:from:completionHandler:)

func (WKWebExtensionController) SetDelegate

func (WKWebExtensionController) UnloadExtensionContextError

func (w WKWebExtensionController) UnloadExtensionContextError(extensionContext IWKWebExtensionContext) (bool, error)

Unloads the specified extension context.

Discussion

Causes the context to stop running.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionController/unload(_:)

type WKWebExtensionControllerClass

type WKWebExtensionControllerClass struct {
	// contains filtered or unexported fields
}

func GetWKWebExtensionControllerClass

func GetWKWebExtensionControllerClass() WKWebExtensionControllerClass

GetWKWebExtensionControllerClass returns the class object for WKWebExtensionController.

func (WKWebExtensionControllerClass) AllExtensionDataTypes

func (_WKWebExtensionControllerClass WKWebExtensionControllerClass) AllExtensionDataTypes() foundation.INSSet

Returns a set of all available extension data types.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionController/allExtensionDataTypes

func (WKWebExtensionControllerClass) Alloc

Alloc allocates memory for a new instance of the class.

func (WKWebExtensionControllerClass) Class

Class returns the underlying Objective-C class pointer.

type WKWebExtensionControllerConfiguration

type WKWebExtensionControllerConfiguration struct {
	objectivec.Object
}

A WKWebExtensionControllerConfiguration object with which to initialize a web extension controller.

Overview

Contains properties used to configure a WKWebExtensionController.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionController/Configuration-swift.class

func NewWKWebExtensionControllerConfiguration

func NewWKWebExtensionControllerConfiguration() WKWebExtensionControllerConfiguration

NewWKWebExtensionControllerConfiguration creates a new WKWebExtensionControllerConfiguration instance.

func NewWKWebExtensionControllerConfigurationWithIdentifier

func NewWKWebExtensionControllerConfigurationWithIdentifier(identifier foundation.NSUUID) WKWebExtensionControllerConfiguration

Returns a new configuration that is persistent and unique for the specified identifier.

Discussion

If a WKWebExtensionController is associated with a unique persistent configuration, data will be written to the file system in a unique location based on the specified identifier.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionController/Configuration-swift.class/init(identifier:)

func NewWebExtensionControllerConfiguration deprecated

func NewWebExtensionControllerConfiguration() WKWebExtensionControllerConfiguration

Deprecated: Use NewWKWebExtensionControllerConfiguration instead.

func NewWebExtensionControllerConfigurationWithIdentifier deprecated

func NewWebExtensionControllerConfigurationWithIdentifier(identifier foundation.NSUUID) WKWebExtensionControllerConfiguration

Deprecated: Use NewWKWebExtensionControllerConfigurationWithIdentifier instead.

func WKWebExtensionControllerConfigurationFromID

func WKWebExtensionControllerConfigurationFromID(id objc.ID) WKWebExtensionControllerConfiguration

WKWebExtensionControllerConfigurationFromID constructs a WKWebExtensionControllerConfiguration from an objc.ID.

A WKWebExtensionControllerConfiguration object with which to initialize a web extension controller.

func (WKWebExtensionControllerConfiguration) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (WKWebExtensionControllerConfiguration) DefaultWebsiteDataStore

func (w WKWebExtensionControllerConfiguration) DefaultWebsiteDataStore() IWKWebsiteDataStore

The default data store for website data and cookie access in extension contexts.

Discussion

This property sets the primary data store for managing website data, including cookies, which extensions can access, subject to the granted permissions within the extension contexts. Defaults to WKWebsiteDataStoreClass.DefaultDataStore.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionController/Configuration-swift.class/defaultWebsiteDataStore

func (WKWebExtensionControllerConfiguration) EncodeWithCoder

func (WKWebExtensionControllerConfiguration) Identifier

The unique identifier used for persistent configuration storage, or `nil` when it is the default or not persistent.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionController/Configuration-swift.class/identifier

func (WKWebExtensionControllerConfiguration) Init

Init initializes the instance.

func (WKWebExtensionControllerConfiguration) IsPersistent added in v0.6.5

A Boolean value indicating if this context will write data to the the file system.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionController/Configuration-swift.class/isPersistent

func (WKWebExtensionControllerConfiguration) SetDefaultWebsiteDataStore

func (w WKWebExtensionControllerConfiguration) SetDefaultWebsiteDataStore(value IWKWebsiteDataStore)

func (WKWebExtensionControllerConfiguration) SetWebViewConfiguration

func (w WKWebExtensionControllerConfiguration) SetWebViewConfiguration(value IWKWebViewConfiguration)

func (WKWebExtensionControllerConfiguration) WebViewConfiguration

The web view configuration to be used as a basis for configuring web views in extension contexts.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionController/Configuration-swift.class/webViewConfiguration

type WKWebExtensionControllerConfigurationClass

type WKWebExtensionControllerConfigurationClass struct {
	// contains filtered or unexported fields
}

func GetWKWebExtensionControllerConfigurationClass

func GetWKWebExtensionControllerConfigurationClass() WKWebExtensionControllerConfigurationClass

GetWKWebExtensionControllerConfigurationClass returns the class object for WKWebExtensionControllerConfiguration.

func (WKWebExtensionControllerConfigurationClass) Alloc

Alloc allocates memory for a new instance of the class.

func (WKWebExtensionControllerConfigurationClass) Class

Class returns the underlying Objective-C class pointer.

func (WKWebExtensionControllerConfigurationClass) DefaultConfiguration

func (_WKWebExtensionControllerConfigurationClass WKWebExtensionControllerConfigurationClass) DefaultConfiguration() WKWebExtensionControllerConfiguration

Returns a new default configuration that is persistent and not unique.

Discussion

If a WKWebExtensionController is associated with a persistent configuration, data will be written to the file system in a common location. When using multiple extension controllers, each controller should use a unique configuration to avoid conflicts.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionController/Configuration-swift.class/default()

func (WKWebExtensionControllerConfigurationClass) NonPersistentConfiguration

func (_WKWebExtensionControllerConfigurationClass WKWebExtensionControllerConfigurationClass) NonPersistentConfiguration() WKWebExtensionControllerConfiguration

Returns a new non-persistent configuration.

Discussion

If a WKWebExtensionController is associated with a non-persistent configuration, no data will be written to the file system. This is useful for extensions in “private browsing” situations.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionController/Configuration-swift.class/nonPersistent()

type WKWebExtensionControllerDelegate

type WKWebExtensionControllerDelegate interface {
	objectivec.IObject
}

A group of methods you use to customize web extension interactions.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionControllerDelegate

type WKWebExtensionControllerDelegateConfig

type WKWebExtensionControllerDelegateConfig struct {

	// Other Methods
	// WebExtensionControllerDidUpdateActionForExtensionContext — Called when an action’s properties are updated.
	WebExtensionControllerDidUpdateActionForExtensionContext func(controller WKWebExtensionController, action WKWebExtensionAction, context WKWebExtensionContext)
}

WKWebExtensionControllerDelegateConfig holds optional typed callbacks for WKWebExtensionControllerDelegate methods. Set non-nil fields to register the corresponding Objective-C delegate method. Methods with nil callbacks are not registered, so [NSObject.RespondsToSelector] returns false for them — matching the Objective-C delegate pattern exactly.

See Apple Documentation for protocol details.

type WKWebExtensionControllerDelegateObject

type WKWebExtensionControllerDelegateObject struct {
	objectivec.Object
}

WKWebExtensionControllerDelegateObject wraps an existing Objective-C object that conforms to the WKWebExtensionControllerDelegate protocol.

func NewWKWebExtensionControllerDelegate

func NewWKWebExtensionControllerDelegate(config WKWebExtensionControllerDelegateConfig) WKWebExtensionControllerDelegateObject

NewWKWebExtensionControllerDelegate creates an Objective-C object implementing the WKWebExtensionControllerDelegate protocol.

The object implements only the methods set in config, so [NSObject.RespondsToSelector] reports optional delegate methods accurately. Objects with the same set of methods share one Objective-C class, registered on first use, so creating many of them costs no class or callback registration. The caller owns the returned object; config is dropped when it deallocates.

The returned WKWebExtensionControllerDelegateObject satisfies the WKWebExtensionControllerDelegate interface and can be passed directly to SetDelegate and similar methods.

See Apple Documentation for protocol details.

func WKWebExtensionControllerDelegateObjectFromID

func WKWebExtensionControllerDelegateObjectFromID(id objc.ID) WKWebExtensionControllerDelegateObject

WKWebExtensionControllerDelegateObjectFromID constructs a WKWebExtensionControllerDelegateObject from an objc.ID. The object is determined to conform to the protocol at runtime.

func (WKWebExtensionControllerDelegateObject) BaseObject

func (WKWebExtensionControllerDelegateObject) WebExtensionControllerConnectUsingMessagePortForExtensionContextCompletionHandler

func (o WKWebExtensionControllerDelegateObject) WebExtensionControllerConnectUsingMessagePortForExtensionContextCompletionHandler(controller IWKWebExtensionController, port IWKWebExtensionMessagePort, extensionContext IWKWebExtensionContext, completionHandler ErrorHandler)

Called when an extension context wants to establish a persistent connection to an application.

controller: The web extension controller that is managing the extension.

port: A port object for handling the message exchange.

extensionContext: The context in which the web extension is running.

completionHandler: A block to be called when the connection is ready to use, taking an optional error. If the connection is successfully established, the error should be \c nil.

Discussion

This method should be implemented by the app to handle establishing connections to applications.

The provided WKWebExtensionMessagePort object can be used to handle message sending, receiving, and disconnection.

You should retain the port object for as long as the connection remains active. Releasing the port will disconnect it.

If not implemented, the default behavior is to pass the messages to the app extension handler within the extension’s bundle, if the extension was loaded from an app extension bundle; otherwise, no action is performed if not implemented.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionControllerDelegate/webExtensionController(_:connectUsing:for:completionHandler:)

func (WKWebExtensionControllerDelegateObject) WebExtensionControllerDidUpdateActionForExtensionContext

func (o WKWebExtensionControllerDelegateObject) WebExtensionControllerDidUpdateActionForExtensionContext(controller IWKWebExtensionController, action IWKWebExtensionAction, context IWKWebExtensionContext)

Called when an action’s properties are updated.

controller: The web extension controller initiating the request.

action: The web extension action whose properties are updated.

context: The context within which the web extension is running.

Discussion

This method is called when an action’s properties are updated and should be reflected in the app’s user interface.

The app should ensure that any visible changes, such as icons and labels, are updated accordingly.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionControllerDelegate/webExtensionController(_:didUpdate:forExtensionContext:)

func (WKWebExtensionControllerDelegateObject) WebExtensionControllerFocusedWindowForExtensionContext

func (o WKWebExtensionControllerDelegateObject) WebExtensionControllerFocusedWindowForExtensionContext(controller IWKWebExtensionController, extensionContext IWKWebExtensionContext) WKWebExtensionWindow

Called when an extension context requests the currently focused window.

controller: The web extension controller that is managing the extension.

extensionContext: The context in which the web extension is running.

Discussion

This method can be optionally implemented by the app to designate the window currently in focus to the extension.

If not implemented, the first window in the result of [WebExtensionControllerOpenWindowsForExtensionContext] is used.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionControllerDelegate/webExtensionController(_:focusedWindowFor:)

func (WKWebExtensionControllerDelegateObject) WebExtensionControllerOpenNewTabUsingConfigurationForExtensionContextCompletionHandler

func (o WKWebExtensionControllerDelegateObject) WebExtensionControllerOpenNewTabUsingConfigurationForExtensionContextCompletionHandler(controller IWKWebExtensionController, configuration IWKWebExtensionTabConfiguration, extensionContext IWKWebExtensionContext, completionHandler WKWebExtensionTabErrorHandler)

Called when an extension context requests a new tab to be opened.

controller: The web extension controller that is managing the extension.

configuration: The configuration specifying how the new tab should be created.

extensionContext: The context in which the web extension is running.

completionHandler: A block to be called with the newly created tab or `nil` if the tab wasn’t created. An error should be provided if any errors occurred.

Discussion

This method should be implemented by the app to handle requests to open new tabs. The app can decide how to handle the process based on the provided configuration and existing tabs. Once handled, the app should call the completion handler with the opened tab or `nil` if the request was declined or failed. If not implemented, the extension will be unable to open new tabs.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionControllerDelegate/webExtensionController(_:openNewTabUsing:for:completionHandler:)

func (WKWebExtensionControllerDelegateObject) WebExtensionControllerOpenNewWindowUsingConfigurationForExtensionContextCompletionHandler

func (o WKWebExtensionControllerDelegateObject) WebExtensionControllerOpenNewWindowUsingConfigurationForExtensionContextCompletionHandler(controller IWKWebExtensionController, configuration IWKWebExtensionWindowConfiguration, extensionContext IWKWebExtensionContext, completionHandler WKWebExtensionWindowErrorHandler)

Called when an extension context requests a new window to be opened.

controller: The web extension controller that is managing the extension.

configuration: The configuration specifying how the new window should be created.

extensionContext: The context in which the web extension is running.

completionHandler: A block to be called with the newly created window or `nil` if the window wasn’t created. An error should be provided if any errors occurred.

Discussion

This method should be implemented by the app to handle requests to open new windows. The app can decide how to handle the process based on the provided configuration and existing windows. Once handled, the app should call the completion handler with the opened window or `nil` if the request was declined or failed. If not implemented, the extension will be unable to open new windows.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionControllerDelegate/webExtensionController(_:openNewWindowUsing:for:completionHandler:)

func (WKWebExtensionControllerDelegateObject) WebExtensionControllerOpenOptionsPageForExtensionContextCompletionHandler

func (o WKWebExtensionControllerDelegateObject) WebExtensionControllerOpenOptionsPageForExtensionContextCompletionHandler(controller IWKWebExtensionController, extensionContext IWKWebExtensionContext, completionHandler ErrorHandler)

Called when an extension context requests its options page to be opened.

controller: The web extension controller that is managing the extension.

extensionContext: The context in which the web extension is running.

completionHandler: A block to be called once the options page has been displayed or with an error if the page could not be shown.

Discussion

This method should be implemented by the app to handle requests to display the extension’s options page. The app can decide how and where to display the options page (e.g., in a new tab or a separate window). The app should call the completion handler once the options page is visible to the user, or with an error if the operation was declined or failed. If not implemented, the options page will be opened in a new tab using the [WebExtensionControllerOpenNewTabUsingConfigurationForExtensionContextCompletionHandler] delegate method.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionControllerDelegate/webExtensionController(_:openOptionsPageFor:completionHandler:)

func (WKWebExtensionControllerDelegateObject) WebExtensionControllerOpenWindowsForExtensionContext

func (o WKWebExtensionControllerDelegateObject) WebExtensionControllerOpenWindowsForExtensionContext(controller IWKWebExtensionController, extensionContext IWKWebExtensionContext) []objectivec.IObject

Called when an extension context requests the list of ordered open windows.

controller: The web extension controller that is managing the extension.

extensionContext: The context in which the web extension is running.

Discussion

This method should be implemented by the app to provide the extension with the ordered open windows. Depending on your app’s requirements, you may return different windows for each extension or the same windows for all extensions. The first window in the returned array must correspond to the currently focused window and match the result of [WebExtensionControllerFocusedWindowForExtensionContext].

If [WebExtensionControllerFocusedWindowForExtensionContext] returns `nil`, indicating that no window has focus or the focused window is not visible to the extension, the first window in the list returned by this method will be considered the presumed focused window. An empty result indicates no open windows are available for the extension. Defaults to an empty array if not implemented.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionControllerDelegate/webExtensionController(_:openWindowsFor:)

func (WKWebExtensionControllerDelegateObject) WebExtensionControllerPresentPopupForActionForExtensionContextCompletionHandler

func (o WKWebExtensionControllerDelegateObject) WebExtensionControllerPresentPopupForActionForExtensionContextCompletionHandler(controller IWKWebExtensionController, action IWKWebExtensionAction, context IWKWebExtensionContext, completionHandler ErrorHandler)

Called when a popup is requested to be displayed for a specific action.

controller: The web extension controller initiating the request.

action: The action for which the popup is requested.

context: The context within which the web extension is running.

completionHandler: A block to be called once the popup display operation is completed.

Discussion

This method is called in response to the extension’s scripts or when invoking WKWebExtensionContext.PerformActionForTab if the action has a popup.

The associated tab, if applicable, can be located through the WKWebExtensionAction.AssociatedTab property of the `action` parameter. This delegate method is called when the web view for the popup is fully loaded and ready to display. Implementing this method is needed if the app intends to support programmatically showing the popup by the extension, although it is recommended for handling both programmatic and user-initiated cases.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionControllerDelegate/webExtensionController(_:presentActionPopup:for:completionHandler:)

func (WKWebExtensionControllerDelegateObject) WebExtensionControllerSendMessageToApplicationWithIdentifierForExtensionContextReplyHandler

func (o WKWebExtensionControllerDelegateObject) WebExtensionControllerSendMessageToApplicationWithIdentifierForExtensionContextReplyHandler(controller IWKWebExtensionController, message objectivec.IObject, applicationIdentifier string, extensionContext IWKWebExtensionContext, replyHandler ObjectErrorHandler)

Called when an extension context wants to send a one-time message to an application.

controller: The web extension controller that is managing the extension.

message: The message to be sent.

applicationIdentifier: The unique identifier for the application, or \c nil if none was specified.

extensionContext: The context in which the web extension is running.

replyHandler: A block to be called with a JSON-serializable reply message or an error.

Discussion

This method should be implemented by the app to handle one-off messages to applications.

If not implemented, the default behavior is to pass the message to the app extension handler within the extension’s bundle, if the extension was loaded from an app extension bundle; otherwise, no action is performed if not implemented.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionControllerDelegate/webExtensionController(_:sendMessage:toApplicationWithIdentifier:for:replyHandler:)

type WKWebExtensionDataRecord

type WKWebExtensionDataRecord struct {
	objectivec.Object
}

An object that represents a record of stored data for a specific web extension context.

Overview

Contains properties and methods to query the data types and sizes.

Instance Properties

Instance Methods

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/DataRecord

func NewWKWebExtensionDataRecord

func NewWKWebExtensionDataRecord() WKWebExtensionDataRecord

NewWKWebExtensionDataRecord creates a new WKWebExtensionDataRecord instance.

func NewWebExtensionDataRecord deprecated

func NewWebExtensionDataRecord() WKWebExtensionDataRecord

Deprecated: Use NewWKWebExtensionDataRecord instead.

func WKWebExtensionDataRecordFromID

func WKWebExtensionDataRecordFromID(id objc.ID) WKWebExtensionDataRecord

WKWebExtensionDataRecordFromID constructs a WKWebExtensionDataRecord from an objc.ID.

An object that represents a record of stored data for a specific web extension context.

func (WKWebExtensionDataRecord) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (WKWebExtensionDataRecord) ContainedDataTypes

func (w WKWebExtensionDataRecord) ContainedDataTypes() foundation.INSSet

The set of data types contained in this data record.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/DataRecord/containedDataTypes

func (WKWebExtensionDataRecord) DisplayName

func (w WKWebExtensionDataRecord) DisplayName() string

The display name for the web extension to which this data record belongs.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/DataRecord/displayName

func (WKWebExtensionDataRecord) Errors

An array of errors that may have occurred when either calculating or deleting storage.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/DataRecord/errors

func (WKWebExtensionDataRecord) Init

Init initializes the instance.

func (WKWebExtensionDataRecord) SizeInBytesOfTypes

func (w WKWebExtensionDataRecord) SizeInBytesOfTypes(dataTypes foundation.INSSet) uint

Retrieves the size in bytes of the specific data types in this data record.

dataTypes: The set of data types to measure the size for.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/DataRecord/sizeInBytes(ofTypes:)

func (WKWebExtensionDataRecord) TotalSizeInBytes

func (w WKWebExtensionDataRecord) TotalSizeInBytes() uint

The total size in bytes of all data types contained in this data record.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/DataRecord/totalSizeInBytes

func (WKWebExtensionDataRecord) UniqueIdentifier

func (w WKWebExtensionDataRecord) UniqueIdentifier() string

Unique identifier for the web extension context to which this data record belongs.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/DataRecord/uniqueIdentifier

type WKWebExtensionDataRecordArrayHandler

type WKWebExtensionDataRecordArrayHandler = func(*[]WKWebExtensionDataRecord)

WKWebExtensionDataRecordArrayHandler handles A block to invoke when the data records have been fetched.

Used by:

type WKWebExtensionDataRecordClass

type WKWebExtensionDataRecordClass struct {
	// contains filtered or unexported fields
}

func GetWKWebExtensionDataRecordClass

func GetWKWebExtensionDataRecordClass() WKWebExtensionDataRecordClass

GetWKWebExtensionDataRecordClass returns the class object for WKWebExtensionDataRecord.

func (WKWebExtensionDataRecordClass) Alloc

Alloc allocates memory for a new instance of the class.

func (WKWebExtensionDataRecordClass) Class

Class returns the underlying Objective-C class pointer.

type WKWebExtensionDataRecordError

type WKWebExtensionDataRecordError int

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/DataRecord/Error/Code

const (
	// WKWebExtensionDataRecordErrorLocalStorageFailed: Indicates a failure occurred when either deleting or calculating local storage.
	WKWebExtensionDataRecordErrorLocalStorageFailed WKWebExtensionDataRecordError = 2
	// WKWebExtensionDataRecordErrorSessionStorageFailed: Indicates a failure occurred when either deleting or calculating session storage.
	WKWebExtensionDataRecordErrorSessionStorageFailed WKWebExtensionDataRecordError = 3
	// WKWebExtensionDataRecordErrorSynchronizedStorageFailed: Indicates a failure occurred when either deleting or calculating synchronized storage.
	WKWebExtensionDataRecordErrorSynchronizedStorageFailed WKWebExtensionDataRecordError = 4
	// WKWebExtensionDataRecordErrorUnknown: Indicates that an unknown error occurred.
	WKWebExtensionDataRecordErrorUnknown WKWebExtensionDataRecordError = 1
)

func (WKWebExtensionDataRecordError) String

type WKWebExtensionDataRecordHandler

type WKWebExtensionDataRecordHandler = func(*WKWebExtensionDataRecord)

WKWebExtensionDataRecordHandler handles A block to invoke when the data record has been fetched.

Used by:

type WKWebExtensionDataType

type WKWebExtensionDataType = string

WKWebExtensionDataType is constants for specifying data types for a [WKWebExtension.DataRecord].

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/DataType

type WKWebExtensionError

type WKWebExtensionError int

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/Error/Code

const (
	// WKWebExtensionErrorInvalidArchive: Indicates that the archive file is invalid or corrupt.
	WKWebExtensionErrorInvalidArchive WKWebExtensionError = 9
	// WKWebExtensionErrorInvalidBackgroundPersistence: Indicates that the extension specified background persistence that was not compatible with the platform or features requested.
	WKWebExtensionErrorInvalidBackgroundPersistence WKWebExtensionError = 8
	// WKWebExtensionErrorInvalidDeclarativeNetRequestEntry: Indicates that an invalid declarative net request entry was encountered.
	WKWebExtensionErrorInvalidDeclarativeNetRequestEntry WKWebExtensionError = 7
	// WKWebExtensionErrorInvalidManifest: Indicates that an invalid `manifest.Json()` was encountered.
	WKWebExtensionErrorInvalidManifest WKWebExtensionError = 4
	// WKWebExtensionErrorInvalidManifestEntry: Indicates that an invalid manifest entry was encountered.
	WKWebExtensionErrorInvalidManifestEntry WKWebExtensionError = 6
	// WKWebExtensionErrorInvalidResourceCodeSignature: Indicates that a resource failed the bundle’s code signature checks.
	WKWebExtensionErrorInvalidResourceCodeSignature WKWebExtensionError = 3
	// WKWebExtensionErrorResourceNotFound: Indicates that a specified resource was not found on disk.
	WKWebExtensionErrorResourceNotFound WKWebExtensionError = 2
	// WKWebExtensionErrorUnknown: Indicates that an unknown error occurred.
	WKWebExtensionErrorUnknown WKWebExtensionError = 1
	// WKWebExtensionErrorUnsupportedManifestVersion: Indicates that the manifest version is not supported.
	WKWebExtensionErrorUnsupportedManifestVersion WKWebExtensionError = 5
)

func (WKWebExtensionError) String

func (e WKWebExtensionError) String() string

type WKWebExtensionErrorHandler

type WKWebExtensionErrorHandler = func(*WKWebExtension, error)

WKWebExtensionErrorHandler handles A block to be called with an initialized web extension, or `nil` if the object could not be initialized due to an error. The error can be type-asserted to *foundation.NSError for Domain, Code, and UserInfo.

Used by:

  • [WKWebExtension.ExtensionWithAppExtensionBundleCompletionHandler]
  • [WKWebExtension.ExtensionWithResourceBaseURLCompletionHandler]

type WKWebExtensionMatchPattern

type WKWebExtensionMatchPattern struct {
	objectivec.Object
}

An object that represents a way to specify groups of URLs.

Overview

All match patterns are specified as strings. Apart from the special “ pattern, match patterns consist of three parts: scheme, host, and path.

Initializers

Instance Properties

Instance Methods

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/MatchPattern

func NewWKWebExtensionMatchPattern

func NewWKWebExtensionMatchPattern() WKWebExtensionMatchPattern

NewWKWebExtensionMatchPattern creates a new WKWebExtensionMatchPattern instance.

func NewWKWebExtensionMatchPatternWithSchemeHostPathError

func NewWKWebExtensionMatchPatternWithSchemeHostPathError(scheme string, host string, path string) (WKWebExtensionMatchPattern, error)

Returns a pattern object for the specified scheme, host, and path strings.

scheme: On output, a pointer to an error object that describes why the method failed, or `nil` if no error occurred. If you are not interested in the error information, pass `nil` for this parameter.

Return Value

A pattern object, or `nil` if any of the strings are invalid and an error will be set.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/MatchPattern/init(scheme:host:path:)

func NewWKWebExtensionMatchPatternWithStringError

func NewWKWebExtensionMatchPatternWithStringError(string_ string) (WKWebExtensionMatchPattern, error)

Returns a pattern object for the specified pattern string.

string: On output, a pointer to an error object that describes why the method failed, or `nil` if no error occurred. If you are not interested in the error information, pass `nil` for this parameter.

Return Value

A pattern object, or `nil` if the pattern string is invalid and an error will be set.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/MatchPattern/init(string:)

func NewWebExtensionMatchPattern deprecated

func NewWebExtensionMatchPattern() WKWebExtensionMatchPattern

Deprecated: Use NewWKWebExtensionMatchPattern instead.

func NewWebExtensionMatchPatternWithSchemeHostPathError deprecated

func NewWebExtensionMatchPatternWithSchemeHostPathError(scheme string, host string, path string) (WKWebExtensionMatchPattern, error)

Deprecated: Use NewWKWebExtensionMatchPatternWithSchemeHostPathError instead.

func NewWebExtensionMatchPatternWithStringError deprecated

func NewWebExtensionMatchPatternWithStringError(string_ string) (WKWebExtensionMatchPattern, error)

Deprecated: Use NewWKWebExtensionMatchPatternWithStringError instead.

func WKWebExtensionMatchPatternFromID

func WKWebExtensionMatchPatternFromID(id objc.ID) WKWebExtensionMatchPattern

WKWebExtensionMatchPatternFromID constructs a WKWebExtensionMatchPattern from an objc.ID.

An object that represents a way to specify groups of URLs.

func (WKWebExtensionMatchPattern) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (WKWebExtensionMatchPattern) EncodeWithCoder

func (w WKWebExtensionMatchPattern) EncodeWithCoder(coder foundation.INSCoder)

func (WKWebExtensionMatchPattern) Host

The host part of the pattern string, unless WKWebExtensionMatchPattern.MatchesAllURLs is [YES].

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/MatchPattern/host

func (WKWebExtensionMatchPattern) Init

Init initializes the instance.

func (WKWebExtensionMatchPattern) InitWithSchemeHostPathError

func (w WKWebExtensionMatchPattern) InitWithSchemeHostPathError(scheme string, host string, path string) (WKWebExtensionMatchPattern, error)

Returns a pattern object for the specified scheme, host, and path strings.

scheme: On output, a pointer to an error object that describes why the method failed, or `nil` if no error occurred. If you are not interested in the error information, pass `nil` for this parameter.

Return Value

A pattern object, or `nil` if any of the strings are invalid and an error will be set.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/MatchPattern/init(scheme:host:path:)

func (WKWebExtensionMatchPattern) InitWithStringError

func (w WKWebExtensionMatchPattern) InitWithStringError(string_ string) (WKWebExtensionMatchPattern, error)

Returns a pattern object for the specified pattern string.

string: On output, a pointer to an error object that describes why the method failed, or `nil` if no error occurred. If you are not interested in the error information, pass `nil` for this parameter.

Return Value

A pattern object, or `nil` if the pattern string is invalid and an error will be set.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/MatchPattern/init(string:)

func (WKWebExtensionMatchPattern) MatchesAllHosts

func (w WKWebExtensionMatchPattern) MatchesAllHosts() bool

A Boolean value that indicates if the pattern is “ or has `*` as the host.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/MatchPattern/matchesAllHosts

func (WKWebExtensionMatchPattern) MatchesAllURLs

func (w WKWebExtensionMatchPattern) MatchesAllURLs() bool

A Boolean value that indicates if the pattern is “.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/MatchPattern/matchesAllURLs

func (WKWebExtensionMatchPattern) MatchesPattern

Matches the receiver pattern against the specified pattern.

pattern: The pattern to match against the receiver pattern.

Return Value

A Boolean value indicating if the receiver pattern matches the specified pattern.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/MatchPattern/matches(_:)-4d84f

func (WKWebExtensionMatchPattern) MatchesPatternOptions

Matches the receiver pattern against the specified pattern with options.

pattern: The pattern to match against the receiver pattern.

options: The options to use while matching.

Return Value

A Boolean value indicating if the receiver pattern matches the specified pattern.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/MatchPattern/matches(_:options:)-fnde

func (WKWebExtensionMatchPattern) MatchesURL

func (w WKWebExtensionMatchPattern) MatchesURL(url foundation.NSURL) bool

Matches the receiver pattern against the specified URL.

url: The URL to match against the receiver pattern.

Return Value

A Boolean value indicating if the pattern matches the specified URL.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/MatchPattern/matches(_:)-471rf

func (WKWebExtensionMatchPattern) MatchesURLOptions

Matches the receiver pattern against the specified URL with options.

url: The URL to match against the receiver pattern.

options: The options to use while matching.

Return Value

A Boolean value indicating if the pattern matches the specified URL.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/MatchPattern/matches(_:options:)-5wo3g

func (WKWebExtensionMatchPattern) Path

The path part of the pattern string, unless WKWebExtensionMatchPattern.MatchesAllURLs is [YES].

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/MatchPattern/path

func (WKWebExtensionMatchPattern) Scheme

The scheme part of the pattern string, unless WKWebExtensionMatchPattern.MatchesAllURLs is [YES].

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/MatchPattern/scheme

func (WKWebExtensionMatchPattern) String

The original pattern string.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/MatchPattern/string

type WKWebExtensionMatchPatternClass

type WKWebExtensionMatchPatternClass struct {
	// contains filtered or unexported fields
}

func GetWKWebExtensionMatchPatternClass

func GetWKWebExtensionMatchPatternClass() WKWebExtensionMatchPatternClass

GetWKWebExtensionMatchPatternClass returns the class object for WKWebExtensionMatchPattern.

func (WKWebExtensionMatchPatternClass) AllHostsAndSchemesMatchPattern

func (_WKWebExtensionMatchPatternClass WKWebExtensionMatchPatternClass) AllHostsAndSchemesMatchPattern() WKWebExtensionMatchPattern

Returns a pattern object that has `*` for scheme, host, and path.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/MatchPattern/allHostsAndSchemes()

func (WKWebExtensionMatchPatternClass) AllURLsMatchPattern

func (_WKWebExtensionMatchPatternClass WKWebExtensionMatchPatternClass) AllURLsMatchPattern() WKWebExtensionMatchPattern

Returns a pattern object for “.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/MatchPattern/allURLs()

func (WKWebExtensionMatchPatternClass) Alloc

Alloc allocates memory for a new instance of the class.

func (WKWebExtensionMatchPatternClass) Class

Class returns the underlying Objective-C class pointer.

func (WKWebExtensionMatchPatternClass) MatchPatternWithSchemeHostPath

func (_WKWebExtensionMatchPatternClass WKWebExtensionMatchPatternClass) MatchPatternWithSchemeHostPath(scheme string, host string, path string) WKWebExtensionMatchPattern

Returns a pattern object for the specified scheme, host, and path strings.

Return Value

A pattern object, or `nil` if any of the strings are invalid.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionMatchPattern/matchPatternWithScheme:host:path:

func (WKWebExtensionMatchPatternClass) MatchPatternWithString

func (_WKWebExtensionMatchPatternClass WKWebExtensionMatchPatternClass) MatchPatternWithString(string_ string) WKWebExtensionMatchPattern

Returns a pattern object for the specified pattern string.

Return Value

Returns `nil` if the pattern string is invalid.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionMatchPattern/matchPatternWithString:

func (WKWebExtensionMatchPatternClass) RegisterCustomURLScheme

func (_WKWebExtensionMatchPatternClass WKWebExtensionMatchPatternClass) RegisterCustomURLScheme(urlScheme string)

Registers a custom URL scheme that can be used in match patterns.

urlScheme: The custom URL scheme to register.

Discussion

This method should be used to register any custom URL schemes used by the app for the extension base URLs, other than `webkit-extension`, or if extensions should have access to other supported URL schemes when using “.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/MatchPattern/registerCustomURLScheme(_:)

type WKWebExtensionMatchPatternError

type WKWebExtensionMatchPatternError int

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/MatchPattern/Error/Code

const (
	// WKWebExtensionMatchPatternErrorInvalidHost: Indicates that the host component was invalid.
	WKWebExtensionMatchPatternErrorInvalidHost WKWebExtensionMatchPatternError = 3
	// WKWebExtensionMatchPatternErrorInvalidPath: Indicates that the path component was invalid.
	WKWebExtensionMatchPatternErrorInvalidPath WKWebExtensionMatchPatternError = 4
	// WKWebExtensionMatchPatternErrorInvalidScheme: Indicates that the scheme component was invalid.
	WKWebExtensionMatchPatternErrorInvalidScheme WKWebExtensionMatchPatternError = 2
	// WKWebExtensionMatchPatternErrorUnknown: Indicates that an unknown error occurred.
	WKWebExtensionMatchPatternErrorUnknown WKWebExtensionMatchPatternError = 1
)

func (WKWebExtensionMatchPatternError) String

type WKWebExtensionMatchPatternOptions

type WKWebExtensionMatchPatternOptions uint

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/MatchPattern/Options

const (
	// WKWebExtensionMatchPatternOptionsIgnorePaths: Indicates that the host components should be ignored while matching.
	WKWebExtensionMatchPatternOptionsIgnorePaths WKWebExtensionMatchPatternOptions = 2
	// WKWebExtensionMatchPatternOptionsIgnoreSchemes: Indicates that the scheme components should be ignored while matching.
	WKWebExtensionMatchPatternOptionsIgnoreSchemes WKWebExtensionMatchPatternOptions = 1
	// WKWebExtensionMatchPatternOptionsMatchBidirectionally: Indicates that two patterns should be checked in either direction while matching.
	WKWebExtensionMatchPatternOptionsMatchBidirectionally WKWebExtensionMatchPatternOptions = 4
	// WKWebExtensionMatchPatternOptionsNone: Indicates no special matching options.
	WKWebExtensionMatchPatternOptionsNone WKWebExtensionMatchPatternOptions = 0
)

func (WKWebExtensionMatchPatternOptions) String

type WKWebExtensionMatchPatternSetDateHandler

type WKWebExtensionMatchPatternSetDateHandler = func(*foundation.INSSet, *foundation.NSDate)

WKWebExtensionMatchPatternSetDateHandler handles A block to be called with the set of allowed match patterns and an optional expiration date.

Used by:

  • [WKWebExtensionControllerDelegate.WebExtensionControllerPromptForPermissionMatchPatternsInTabForExtensionContextCompletionHandler]

type WKWebExtensionMessagePort

type WKWebExtensionMessagePort struct {
	objectivec.Object
}

An object that manages message-based communication with a web extension.

Overview

Contains properties and methods to handle message exchanges with a web extension.

Instance Properties

Instance Methods

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/MessagePort

func NewWKWebExtensionMessagePort

func NewWKWebExtensionMessagePort() WKWebExtensionMessagePort

NewWKWebExtensionMessagePort creates a new WKWebExtensionMessagePort instance.

func NewWebExtensionMessagePort deprecated

func NewWebExtensionMessagePort() WKWebExtensionMessagePort

Deprecated: Use NewWKWebExtensionMessagePort instead.

func WKWebExtensionMessagePortFromID

func WKWebExtensionMessagePortFromID(id objc.ID) WKWebExtensionMessagePort

WKWebExtensionMessagePortFromID constructs a WKWebExtensionMessagePort from an objc.ID.

An object that manages message-based communication with a web extension.

func (WKWebExtensionMessagePort) ApplicationIdentifier

func (w WKWebExtensionMessagePort) ApplicationIdentifier() string

The unique identifier for the app to which this port should be connected.

Discussion

This identifier is provided by the web extension and may or may not be used by the app. It’s up to the app to decide how to interpret this identifier.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/MessagePort/applicationIdentifier

func (WKWebExtensionMessagePort) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (WKWebExtensionMessagePort) Disconnect

func (w WKWebExtensionMessagePort) Disconnect()

Disconnects the port, terminating all further messages.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/MessagePort/disconnect()

func (WKWebExtensionMessagePort) DisconnectHandler

func (w WKWebExtensionMessagePort) DisconnectHandler() ErrorHandler

The block to be executed when the port disconnects.

Discussion

An optional block to be invoked when the port disconnects, taking an optional error that indicates if the disconnection was caused by an error.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/MessagePort/disconnectHandler

func (WKWebExtensionMessagePort) DisconnectWithError

func (w WKWebExtensionMessagePort) DisconnectWithError(error_ foundation.NSError)

Disconnects the port, terminating all further messages with an optional error.

error: An optional error indicating the reason for disconnection.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/MessagePort/disconnect(throwing:)

func (WKWebExtensionMessagePort) Init

Init initializes the instance.

func (WKWebExtensionMessagePort) IsDisconnected added in v0.6.5

func (w WKWebExtensionMessagePort) IsDisconnected() bool

Indicates whether the message port is disconnected.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/MessagePort/isDisconnected

func (WKWebExtensionMessagePort) MessageHandler

func (w WKWebExtensionMessagePort) MessageHandler() ObjectErrorHandler

The block to be executed when a message is received from the web extension.

Discussion

An optional block to be invoked when a message is received, taking two parameters: the message and an optional error.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/MessagePort/messageHandler

func (WKWebExtensionMessagePort) SendMessage

func (w WKWebExtensionMessagePort) SendMessage(ctx context.Context, message objectivec.IObject) error

SendMessage is a synchronous wrapper around WKWebExtensionMessagePort.SendMessageCompletionHandler. It blocks until the completion handler fires or the context is cancelled.

func (WKWebExtensionMessagePort) SendMessageCompletionHandler

func (w WKWebExtensionMessagePort) SendMessageCompletionHandler(message objectivec.IObject, completionHandler ErrorHandler)

Sends a message to the connected web extension.

message: The JSON-serializable message to be sent.

completionHandler: An optional block to be invoked after the message is sent, taking an optional error.

Discussion

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/MessagePort/sendMessage(_:completionHandler:)

func (WKWebExtensionMessagePort) SetDisconnectHandler

func (w WKWebExtensionMessagePort) SetDisconnectHandler(value ErrorHandler)

func (WKWebExtensionMessagePort) SetMessageHandler

func (w WKWebExtensionMessagePort) SetMessageHandler(value ObjectErrorHandler)

type WKWebExtensionMessagePortClass

type WKWebExtensionMessagePortClass struct {
	// contains filtered or unexported fields
}

func GetWKWebExtensionMessagePortClass

func GetWKWebExtensionMessagePortClass() WKWebExtensionMessagePortClass

GetWKWebExtensionMessagePortClass returns the class object for WKWebExtensionMessagePort.

func (WKWebExtensionMessagePortClass) Alloc

Alloc allocates memory for a new instance of the class.

func (WKWebExtensionMessagePortClass) Class

Class returns the underlying Objective-C class pointer.

type WKWebExtensionMessagePortError

type WKWebExtensionMessagePortError int

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/MessagePort/Error/Code

const (
	// WKWebExtensionMessagePortErrorMessageInvalid: Indicates that the message is invalid.
	WKWebExtensionMessagePortErrorMessageInvalid WKWebExtensionMessagePortError = 3
	// WKWebExtensionMessagePortErrorNotConnected: Indicates that the message port is disconnected.
	WKWebExtensionMessagePortErrorNotConnected WKWebExtensionMessagePortError = 2
	// WKWebExtensionMessagePortErrorUnknown: Indicates that an unknown error occurred.
	WKWebExtensionMessagePortErrorUnknown WKWebExtensionMessagePortError = 1
)

func (WKWebExtensionMessagePortError) String

type WKWebExtensionPermission

type WKWebExtensionPermission = string

WKWebExtensionPermission is constants for specifying permission in a WKWebExtensionContext.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/Permission

type WKWebExtensionTab

type WKWebExtensionTab interface {
	objectivec.IObject
}

A protocol with methods that represent a tab to web extensions.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionTab

type WKWebExtensionTabChangedProperties

type WKWebExtensionTabChangedProperties uint

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/TabChangedProperties

const (
	// WKWebExtensionTabChangedPropertiesLoading: Indicates the loading state changed.
	WKWebExtensionTabChangedPropertiesLoading WKWebExtensionTabChangedProperties = 2
	// WKWebExtensionTabChangedPropertiesMuted: Indicates the muted state changed.
	WKWebExtensionTabChangedPropertiesMuted WKWebExtensionTabChangedProperties = 4
	// WKWebExtensionTabChangedPropertiesNone: Indicates nothing changed.
	WKWebExtensionTabChangedPropertiesNone WKWebExtensionTabChangedProperties = 0
	// WKWebExtensionTabChangedPropertiesPinned: Indicates the pinned state changed.
	WKWebExtensionTabChangedPropertiesPinned WKWebExtensionTabChangedProperties = 8
	// WKWebExtensionTabChangedPropertiesPlayingAudio: Indicates the audio playback state changed.
	WKWebExtensionTabChangedPropertiesPlayingAudio WKWebExtensionTabChangedProperties = 16
	// WKWebExtensionTabChangedPropertiesReaderMode: Indicates the reader mode state changed.
	WKWebExtensionTabChangedPropertiesReaderMode WKWebExtensionTabChangedProperties = 32
	// WKWebExtensionTabChangedPropertiesSize: Indicates the size changed.
	WKWebExtensionTabChangedPropertiesSize WKWebExtensionTabChangedProperties = 64
	// WKWebExtensionTabChangedPropertiesTitle: Indicates the title changed.
	WKWebExtensionTabChangedPropertiesTitle WKWebExtensionTabChangedProperties = 128
	// WKWebExtensionTabChangedPropertiesURL: Indicates the URL changed.
	WKWebExtensionTabChangedPropertiesURL WKWebExtensionTabChangedProperties = 256
	// WKWebExtensionTabChangedPropertiesZoomFactor: Indicates the zoom factor changed.
	WKWebExtensionTabChangedPropertiesZoomFactor WKWebExtensionTabChangedProperties = 512
)

func (WKWebExtensionTabChangedProperties) String

type WKWebExtensionTabConfiguration

type WKWebExtensionTabConfiguration struct {
	objectivec.Object
}

An object that encapsulates configuration options for a tab in an extension.

Overview

This class holds various options that influence the behavior and initial state of a tab.

The app retains the discretion to disregard any or all of these options, or even opt not to create a tab.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/TabConfiguration

func NewWKWebExtensionTabConfiguration

func NewWKWebExtensionTabConfiguration() WKWebExtensionTabConfiguration

NewWKWebExtensionTabConfiguration creates a new WKWebExtensionTabConfiguration instance.

func NewWebExtensionTabConfiguration deprecated

func NewWebExtensionTabConfiguration() WKWebExtensionTabConfiguration

Deprecated: Use NewWKWebExtensionTabConfiguration instead.

func WKWebExtensionTabConfigurationFromID

func WKWebExtensionTabConfigurationFromID(id objc.ID) WKWebExtensionTabConfiguration

WKWebExtensionTabConfigurationFromID constructs a WKWebExtensionTabConfiguration from an objc.ID.

An object that encapsulates configuration options for a tab in an extension.

func (WKWebExtensionTabConfiguration) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (WKWebExtensionTabConfiguration) Init

Init initializes the instance.

func (WKWebExtensionTabConfiguration) ParentTab

Indicates the parent tab with which the tab should be related.

Discussion

If this property is `nil`, no parent tab was specified.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/TabConfiguration/parentTab

func (WKWebExtensionTabConfiguration) ShouldAddToSelection

func (w WKWebExtensionTabConfiguration) ShouldAddToSelection() bool

Indicates whether the tab should be added to the current tab selection.

Discussion

If this property is [YES], the tab should be part of the current selection, but not necessarily become the active tab unless WKWebExtensionTabConfiguration.ShouldBeActive is also [YES]. If this property is [NO], the tab shouldn’t be part of the current selection.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/TabConfiguration/shouldAddToSelection

func (WKWebExtensionTabConfiguration) ShouldBeActive

func (w WKWebExtensionTabConfiguration) ShouldBeActive() bool

Indicates whether the tab should be the active tab.

Discussion

If this property is [YES], the tab should be made active in the window, ensuring it is the frontmost tab. Being active implies the tab is also selected. If this property is [NO], the tab shouldn’t affect the currently active tab.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/TabConfiguration/shouldBeActive

func (WKWebExtensionTabConfiguration) ShouldBeMuted

func (w WKWebExtensionTabConfiguration) ShouldBeMuted() bool

Indicates whether the tab should be muted.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/TabConfiguration/shouldBeMuted

func (WKWebExtensionTabConfiguration) ShouldBePinned

func (w WKWebExtensionTabConfiguration) ShouldBePinned() bool

Indicates whether the tab should be pinned.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/TabConfiguration/shouldBePinned

func (WKWebExtensionTabConfiguration) ShouldReaderModeBeActive

func (w WKWebExtensionTabConfiguration) ShouldReaderModeBeActive() bool

Indicates whether reader mode in the tab should be active.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/TabConfiguration/shouldReaderModeBeActive

func (WKWebExtensionTabConfiguration) Url

Indicates the initial URL for the tab.

Discussion

If this property is `nil`, the app’s default start page should appear in the tab.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/TabConfiguration/url

func (WKWebExtensionTabConfiguration) Window

Indicates the window where the tab should be opened.

Discussion

If this property is `nil`, no window was specified.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/TabConfiguration/window

type WKWebExtensionTabConfigurationClass

type WKWebExtensionTabConfigurationClass struct {
	// contains filtered or unexported fields
}

func GetWKWebExtensionTabConfigurationClass

func GetWKWebExtensionTabConfigurationClass() WKWebExtensionTabConfigurationClass

GetWKWebExtensionTabConfigurationClass returns the class object for WKWebExtensionTabConfiguration.

func (WKWebExtensionTabConfigurationClass) Alloc

Alloc allocates memory for a new instance of the class.

func (WKWebExtensionTabConfigurationClass) Class

Class returns the underlying Objective-C class pointer.

type WKWebExtensionTabErrorHandler

type WKWebExtensionTabErrorHandler = func(WKWebExtensionTab, error)

WKWebExtensionTabErrorHandler handles A block to be called with the newly created tab or `nil` if the tab wasn’t created. The error can be type-asserted to *foundation.NSError for Domain, Code, and UserInfo.

Used by:

  • [WKWebExtensionControllerDelegate.WebExtensionControllerOpenNewTabUsingConfigurationForExtensionContextCompletionHandler]
  • [WKWebExtensionTab.DuplicateUsingConfigurationForWebExtensionContextCompletionHandler]

type WKWebExtensionTabObject

type WKWebExtensionTabObject struct {
	objectivec.Object
}

WKWebExtensionTabObject wraps an existing Objective-C object that conforms to the WKWebExtensionTab protocol.

func WKWebExtensionTabObjectFromID

func WKWebExtensionTabObjectFromID(id objc.ID) WKWebExtensionTabObject

WKWebExtensionTabObjectFromID constructs a WKWebExtensionTabObject from an objc.ID. The object is determined to conform to the protocol at runtime.

func (WKWebExtensionTabObject) ActivateForWebExtensionContextCompletionHandler

func (o WKWebExtensionTabObject) ActivateForWebExtensionContextCompletionHandler(context IWKWebExtensionContext, completionHandler ErrorHandler)

Called to activate the tab, making it frontmost.

context: The context in which the web extension is running.

completionHandler: A block that must be called upon completion. It takes a single error argument, which should be provided if any errors occurred.

Discussion

Upon activation, the tab should become the frontmost and either be the sole selected tab or be included among the selected tabs. No action is performed if not implemented.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionTab/activate(for:completionHandler:)

func (WKWebExtensionTabObject) BaseObject

func (o WKWebExtensionTabObject) BaseObject() objectivec.Object

func (WKWebExtensionTabObject) CloseForWebExtensionContextCompletionHandler

func (o WKWebExtensionTabObject) CloseForWebExtensionContextCompletionHandler(context IWKWebExtensionContext, completionHandler ErrorHandler)

Called to close the tab.

context: The context in which the web extension is running.

completionHandler: A block that must be called upon completion. It takes a single error argument, which should be provided if any errors occurred.

Discussion

No action is performed if not implemented.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionTab/close(for:completionHandler:)

func (WKWebExtensionTabObject) DetectWebpageLocaleForWebExtensionContextCompletionHandler

func (o WKWebExtensionTabObject) DetectWebpageLocaleForWebExtensionContextCompletionHandler(context IWKWebExtensionContext, completionHandler LocaleErrorHandler)

Called to detect the locale of the webpage currently loaded in the tab.

context: The context in which the web extension is running.

completionHandler: A block that must be called upon completion. The block takes two arguments: the detected locale (or `nil` if the locale is unknown) and an error, which should be provided if any errors occurred.

Discussion

No action is performed if not implemented.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionTab/detectWebpageLocale(for:completionHandler:)

func (WKWebExtensionTabObject) DuplicateUsingConfigurationForWebExtensionContextCompletionHandler

func (o WKWebExtensionTabObject) DuplicateUsingConfigurationForWebExtensionContextCompletionHandler(configuration IWKWebExtensionTabConfiguration, context IWKWebExtensionContext, completionHandler WKWebExtensionTabErrorHandler)

Called to duplicate the tab.

configuration: The tab configuration influencing the duplicated tab’s properties.

context: The context in which the web extension is running.

completionHandler: A block that must be called upon completion. It takes two arguments: the duplicated tab (or \c nil if no tab was created) and an error, which should be provided if any errors occurred.

Discussion

This is equivalent to the user selecting to duplicate the tab through a menu item, with the specified configuration.

No action is performed if not implemented.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionTab/duplicate(using:for:completionHandler:)

func (WKWebExtensionTabObject) GoBackForWebExtensionContextCompletionHandler

func (o WKWebExtensionTabObject) GoBackForWebExtensionContextCompletionHandler(context IWKWebExtensionContext, completionHandler ErrorHandler)

Called to navigate the tab to the previous page in its history.

context: The context in which the web extension is running.

completionHandler: A block that must be called upon completion. It takes a single error argument, which should be provided if any errors occurred.

Discussion

Navigates to the previous page in the tab’s web view via WKWebView.GoBack if not implemented.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionTab/goBack(for:completionHandler:)

func (WKWebExtensionTabObject) GoForwardForWebExtensionContextCompletionHandler

func (o WKWebExtensionTabObject) GoForwardForWebExtensionContextCompletionHandler(context IWKWebExtensionContext, completionHandler ErrorHandler)

Called to navigate the tab to the next page in its history.

context: The context in which the web extension is running.

completionHandler: A block that must be called upon completion. It takes a single error argument, which should be provided if any errors occurred.

Discussion

Navigates to the next page in the tab’s web view via WKWebView.GoForward if not implemented.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionTab/goForward(for:completionHandler:)

func (WKWebExtensionTabObject) IndexInWindowForWebExtensionContext

func (o WKWebExtensionTabObject) IndexInWindowForWebExtensionContext(context IWKWebExtensionContext) uint

Called when the index of the tab in the window is needed.

context: The context in which the web extension is running.

Discussion

This method should be implemented for better performance. Defaults to the window’s [TabsForWebExtensionContext] method to find the index if not implemented.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionTab/indexInWindow(for:)

func (WKWebExtensionTabObject) IsLoadingCompleteForWebExtensionContext

func (o WKWebExtensionTabObject) IsLoadingCompleteForWebExtensionContext(context IWKWebExtensionContext) bool

Called to check if the tab has finished loading.

context: The context in which the web extension is running.

Discussion

Defaults to [WKWebView.Loading] of the tab’s web view if not implemented.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionTab/isLoadingComplete(for:)

func (WKWebExtensionTabObject) IsMutedForWebExtensionContext

func (o WKWebExtensionTabObject) IsMutedForWebExtensionContext(context IWKWebExtensionContext) bool

Called to check if the tab is currently muted.

context: The context in which the web extension is running.

Discussion

Defaults to [NO] if not implemented.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionTab/isMuted(for:)

func (WKWebExtensionTabObject) IsPinnedForWebExtensionContext

func (o WKWebExtensionTabObject) IsPinnedForWebExtensionContext(context IWKWebExtensionContext) bool

Called when the pinned state of the tab is needed.

context: The context in which the web extension is running.

Discussion

Defaults to [NO] if not implemented.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionTab/isPinned(for:)

func (WKWebExtensionTabObject) IsPlayingAudioForWebExtensionContext

func (o WKWebExtensionTabObject) IsPlayingAudioForWebExtensionContext(context IWKWebExtensionContext) bool

Called to check if the tab is currently playing audio.

context: The context in which the web extension is running.

Discussion

Defaults to [NO] if not implemented.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionTab/isPlayingAudio(for:)

func (WKWebExtensionTabObject) IsReaderModeActiveForWebExtensionContext

func (o WKWebExtensionTabObject) IsReaderModeActiveForWebExtensionContext(context IWKWebExtensionContext) bool

Called to check if the tab is currently showing reader mode.

context: The context in which the web extension is running.

Discussion

Defaults to [NO] if not implemented.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionTab/isReaderModeActive(for:)

func (WKWebExtensionTabObject) IsReaderModeAvailableForWebExtensionContext

func (o WKWebExtensionTabObject) IsReaderModeAvailableForWebExtensionContext(context IWKWebExtensionContext) bool

Called to check if reader mode is available for the tab.

context: The context in which the web extension is running.

Discussion

Defaults to [NO] if not implemented.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionTab/isReaderModeAvailable(for:)

func (WKWebExtensionTabObject) IsSelectedForWebExtensionContext

func (o WKWebExtensionTabObject) IsSelectedForWebExtensionContext(context IWKWebExtensionContext) bool

Called when the selected state of the tab is needed.

context: The context in which the web extension is running.

Discussion

Defaults to [YES] for the active tab and [NO] for other tabs if not implemented.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionTab/isSelected(for:)

func (WKWebExtensionTabObject) LoadURLForWebExtensionContextCompletionHandler

func (o WKWebExtensionTabObject) LoadURLForWebExtensionContextCompletionHandler(url foundation.NSURL, context IWKWebExtensionContext, completionHandler ErrorHandler)

Called to load a URL in the tab.

url: The URL to be loaded in the tab.

context: The context in which the web extension is running.

completionHandler: A block that must be called upon completion. It takes a single error argument, which should be provided if any errors occurred.

Discussion

If the tab is already loading a page, calling this method should stop the current page from loading and start loading the new URL. Loads the URL in the tab’s web view via WKWebView.LoadRequest if not implemented.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionTab/loadURL(_:for:completionHandler:)

func (WKWebExtensionTabObject) ParentTabForWebExtensionContext

func (o WKWebExtensionTabObject) ParentTabForWebExtensionContext(context IWKWebExtensionContext) WKWebExtensionTab

Called when the parent tab for the tab is needed.

context: The context in which the web extension is running.

Discussion

Defaults to `nil` if not implemented.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionTab/parentTab(for:)

func (WKWebExtensionTabObject) PendingURLForWebExtensionContext

func (o WKWebExtensionTabObject) PendingURLForWebExtensionContext(context IWKWebExtensionContext) foundation.NSURL

Called when the pending URL of the tab is needed.

context: The context in which the web extension is running.

Discussion

The pending URL is the URL of a page that is in the process of loading. If there is no pending URL, return `nil`.

Defaults to `nil` if not implemented.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionTab/pendingURL(for:)

func (WKWebExtensionTabObject) ReloadFromOriginForWebExtensionContextCompletionHandler

func (o WKWebExtensionTabObject) ReloadFromOriginForWebExtensionContextCompletionHandler(fromOrigin bool, context IWKWebExtensionContext, completionHandler ErrorHandler)

Called to reload the current page in the tab.

fromOrigin: A boolean value indicating whether to reload the tab from the origin, bypassing the cache.

context: The context in which the web extension is running.

completionHandler: A block that must be called upon completion. It takes a single error argument, which should be provided if any errors occurred.

Discussion

Reloads the tab’s web view via WKWebView.Reload or WKWebView.ReloadFromOrigin if not implemented.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionTab/reload(fromOrigin:for:completionHandler:)

func (WKWebExtensionTabObject) SetMutedForWebExtensionContextCompletionHandler

func (o WKWebExtensionTabObject) SetMutedForWebExtensionContextCompletionHandler(muted bool, context IWKWebExtensionContext, completionHandler ErrorHandler)

Called to set the mute state of the tab.

muted: A boolean indicating whether the tab should be muted.

context: The context in which the web extension is running.

completionHandler: A block that must be called upon completion. It takes a single error argument, which should be provided if any errors occurred.

Discussion

No action is performed if not implemented.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionTab/setMuted(_:for:completionHandler:)

func (WKWebExtensionTabObject) SetParentTabForWebExtensionContextCompletionHandler

func (o WKWebExtensionTabObject) SetParentTabForWebExtensionContextCompletionHandler(parentTab WKWebExtensionTab, context IWKWebExtensionContext, completionHandler ErrorHandler)

Called to set or clear the parent tab for the tab.

parentTab: The tab that should be set as the parent of the tab. If \c nil is provided, the current parent tab should be cleared.

context: The context in which the web extension is running.

completionHandler: A block that must be called upon completion. It takes a single error argument, which should be provided if any errors occurred.

Discussion

No action is performed if not implemented.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionTab/setParentTab(_:for:completionHandler:)

func (WKWebExtensionTabObject) SetPinnedForWebExtensionContextCompletionHandler

func (o WKWebExtensionTabObject) SetPinnedForWebExtensionContextCompletionHandler(pinned bool, context IWKWebExtensionContext, completionHandler ErrorHandler)

Called to set the pinned state of the tab.

pinned: A boolean value indicating whether to pin the tab.

context: The context in which the web extension is running.

completionHandler: A block that must be called upon completion. It takes a single error argument, which should be provided if any errors occurred.

Discussion

This is equivalent to the user selecting to pin or unpin the tab through a menu item. When a tab is pinned, it should be moved to the front of the tab bar and usually reduced in size. When a tab is unpinned, it should be restored to a normal size and position in the tab bar. No action is performed if not implemented.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionTab/setPinned(_:for:completionHandler:)

func (WKWebExtensionTabObject) SetReaderModeActiveForWebExtensionContextCompletionHandler

func (o WKWebExtensionTabObject) SetReaderModeActiveForWebExtensionContextCompletionHandler(active bool, context IWKWebExtensionContext, completionHandler ErrorHandler)

Called to set the reader mode for the tab.

active: A boolean value indicating whether to activate reader mode.

context: The context in which the web extension is running.

completionHandler: A block that must be called upon completion. It takes a single error argument, which should be provided if any errors occurred.

Discussion

No action is performed if not implemented.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionTab/setReaderModeActive(_:for:completionHandler:)

func (WKWebExtensionTabObject) SetSelectedForWebExtensionContextCompletionHandler

func (o WKWebExtensionTabObject) SetSelectedForWebExtensionContextCompletionHandler(selected bool, context IWKWebExtensionContext, completionHandler ErrorHandler)

Called to set the selected state of the tab.

selected: A boolean value indicating whether to select the tab.

context: The context in which the web extension is running.

completionHandler: A block that must be called upon completion. It takes a single error argument, which should be provided if any errors occurred.

Discussion

This is equivalent to the user command-clicking on the tab to add it to or remove it from a selection.

The method should update the tab’s selection state without changing the active tab. No action is performed if not implemented.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionTab/setSelected(_:for:completionHandler:)

func (WKWebExtensionTabObject) SetZoomFactorForWebExtensionContextCompletionHandler

func (o WKWebExtensionTabObject) SetZoomFactorForWebExtensionContextCompletionHandler(zoomFactor float64, context IWKWebExtensionContext, completionHandler ErrorHandler)

Called to set the zoom factor of the tab.

zoomFactor: The desired zoom factor for the tab.

context: The context in which the web extension is running.

completionHandler: A block that must be called upon completion. It takes a single error argument, which should be provided if any errors occurred.

Discussion

Sets WKWebView.PageZoom of the tab’s web view if not implemented.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionTab/setZoomFactor(_:for:completionHandler:)

func (WKWebExtensionTabObject) ShouldBypassPermissionsForWebExtensionContext

func (o WKWebExtensionTabObject) ShouldBypassPermissionsForWebExtensionContext(context IWKWebExtensionContext) bool

Called to determine if the tab should bypass host permission checks.

context: The context in which the web extension is running.

Discussion

This method allows the app to dynamically control whether a tab can bypass standard host permission checks.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionTab/shouldBypassPermissions(for:)

func (WKWebExtensionTabObject) ShouldGrantPermissionsOnUserGestureForWebExtensionContext

func (o WKWebExtensionTabObject) ShouldGrantPermissionsOnUserGestureForWebExtensionContext(context IWKWebExtensionContext) bool

Called to determine if permissions should be granted for the tab on user gesture.

context: The context in which the web extension is running.

Discussion

This method allows the app to control granting of permissions on a per-tab basis when triggered by a user gesture. Implementing this method enables the app to dynamically manage `activeTab` permissions based on the tab’s current state, the content being accessed, or other custom criteria.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionTab/shouldGrantPermissionsOnUserGesture(for:)

func (WKWebExtensionTabObject) SizeForWebExtensionContext

func (o WKWebExtensionTabObject) SizeForWebExtensionContext(context IWKWebExtensionContext) corefoundation.CGSize

Called when the size of the tab is needed.

context: The context in which the web extension is running.

Discussion

Defaults to size of the tab’s web view if not implemented.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionTab/size(for:)

func (WKWebExtensionTabObject) TakeSnapshotUsingConfigurationForWebExtensionContextCompletionHandler added in v0.5.3

func (o WKWebExtensionTabObject) TakeSnapshotUsingConfigurationForWebExtensionContextCompletionHandler(configuration IWKSnapshotConfiguration, context IWKWebExtensionContext, completionHandler ImageErrorHandler)

Called to capture a snapshot of the current webpage as an image.

configuration: An object that specifies how the snapshot is configured.

context: The context in which the web extension is running.

completionHandler: A block that must be called upon completion. The block takes two arguments: the captured image of the webpage (or `nil` if capturing failed) and an error, which should be provided if any errors occurred.

Discussion

Defaults to capturing the visible area of the tab’s web view if not implemented.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionTab/takeSnapshot(using:for:completionHandler:)

func (WKWebExtensionTabObject) TitleForWebExtensionContext

func (o WKWebExtensionTabObject) TitleForWebExtensionContext(context IWKWebExtensionContext) string

Called when the title of the tab is needed.

context: The context in which the web extension is running.

Discussion

Defaults to WKWebView.Title of the tab’s web view if not implemented.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionTab/title(for:)

func (WKWebExtensionTabObject) UrlForWebExtensionContext

func (o WKWebExtensionTabObject) UrlForWebExtensionContext(context IWKWebExtensionContext) foundation.NSURL

Called when the URL of the tab is needed.

context: The context in which the web extension is running.

Discussion

Defaults to [URL] of the tab’s web view if not implemented.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionTab/url(for:)

func (WKWebExtensionTabObject) WebViewForWebExtensionContext

func (o WKWebExtensionTabObject) WebViewForWebExtensionContext(context IWKWebExtensionContext) IWKWebView

Called when the web view for the tab is needed.

context: The context in which the web extension is running.

Discussion

The web view’s WKWebViewConfiguration must have its WKWebViewConfiguration.WebExtensionController property set to match the controller of the given context; otherwise `nil` will be used. Defaults to `nil` if not implemented. If `nil`, some critical features will not be available for this tab, such as content injection or modification.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionTab/webView(for:)

func (WKWebExtensionTabObject) WindowForWebExtensionContext

func (o WKWebExtensionTabObject) WindowForWebExtensionContext(context IWKWebExtensionContext) WKWebExtensionWindow

Called when the window containing the tab is needed.

context: The context in which the web extension is running.

Discussion

Defaults to `nil` if not implemented.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionTab/window(for:)

func (WKWebExtensionTabObject) ZoomFactorForWebExtensionContext

func (o WKWebExtensionTabObject) ZoomFactorForWebExtensionContext(context IWKWebExtensionContext) float64

Called when the zoom factor of the tab is needed.

context: The context in which the web extension is running.

Discussion

Defaults to WKWebView.PageZoom of the tab’s web view if not implemented.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionTab/zoomFactor(for:)

type WKWebExtensionWindow

type WKWebExtensionWindow interface {
	objectivec.IObject
}

A protocol with methods that represent a window to web extensions.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionWindow

type WKWebExtensionWindowConfiguration

type WKWebExtensionWindowConfiguration struct {
	objectivec.Object
}

An object that encapsulates configuration options for a window in an extension.

Overview

This class holds various options that influence the behavior and initial state of a window.

The app retains the discretion to disregard any or all of these options, or even opt not to create a window.

Instance Properties

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/WindowConfiguration

func NewWKWebExtensionWindowConfiguration

func NewWKWebExtensionWindowConfiguration() WKWebExtensionWindowConfiguration

NewWKWebExtensionWindowConfiguration creates a new WKWebExtensionWindowConfiguration instance.

func NewWebExtensionWindowConfiguration deprecated

func NewWebExtensionWindowConfiguration() WKWebExtensionWindowConfiguration

Deprecated: Use NewWKWebExtensionWindowConfiguration instead.

func WKWebExtensionWindowConfigurationFromID

func WKWebExtensionWindowConfigurationFromID(id objc.ID) WKWebExtensionWindowConfiguration

WKWebExtensionWindowConfigurationFromID constructs a WKWebExtensionWindowConfiguration from an objc.ID.

An object that encapsulates configuration options for a window in an extension.

func (WKWebExtensionWindowConfiguration) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (WKWebExtensionWindowConfiguration) Frame

Indicates the frame where the window should be positioned on the main screen.

Discussion

This frame should override the app’s default window position and size.

Individual components (e.g., `origin.X()`, `size.Width()`) will be [NaN] if not specified.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/WindowConfiguration/frame

func (WKWebExtensionWindowConfiguration) Init

Init initializes the instance.

func (WKWebExtensionWindowConfiguration) ShouldBeFocused

func (w WKWebExtensionWindowConfiguration) ShouldBeFocused() bool

Indicates whether the window should be focused.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/WindowConfiguration/shouldBeFocused

func (WKWebExtensionWindowConfiguration) ShouldBePrivate

func (w WKWebExtensionWindowConfiguration) ShouldBePrivate() bool

Indicates whether the window should be private.

Discussion

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/WindowConfiguration/shouldBePrivate

func (WKWebExtensionWindowConfiguration) TabURLs

Indicates the URLs that the window should initially load as tabs.

Discussion

If WKWebExtensionWindowConfiguration.TabURLs and WKWebExtensionWindowConfiguration.Tabs are both empty, the app’s default start page should appear in a tab.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/WindowConfiguration/tabURLs

func (WKWebExtensionWindowConfiguration) Tabs

Indicates the existing tabs that should be moved to the window.

Discussion

If WKWebExtensionWindowConfiguration.Tabs and WKWebExtensionWindowConfiguration.TabURLs are both empty, the app’s default start page should appear in a tab.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/WindowConfiguration/tabs

func (WKWebExtensionWindowConfiguration) WindowState

Indicates the window state for the window.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/WindowConfiguration/windowState

func (WKWebExtensionWindowConfiguration) WindowType

Indicates the window type for the window.

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/WindowConfiguration/windowType

type WKWebExtensionWindowConfigurationClass

type WKWebExtensionWindowConfigurationClass struct {
	// contains filtered or unexported fields
}

func GetWKWebExtensionWindowConfigurationClass

func GetWKWebExtensionWindowConfigurationClass() WKWebExtensionWindowConfigurationClass

GetWKWebExtensionWindowConfigurationClass returns the class object for WKWebExtensionWindowConfiguration.

func (WKWebExtensionWindowConfigurationClass) Alloc

Alloc allocates memory for a new instance of the class.

func (WKWebExtensionWindowConfigurationClass) Class

Class returns the underlying Objective-C class pointer.

type WKWebExtensionWindowErrorHandler

type WKWebExtensionWindowErrorHandler = func(WKWebExtensionWindow, error)

WKWebExtensionWindowErrorHandler handles A block to be called with the newly created window or `nil` if the window wasn’t created. The error can be type-asserted to *foundation.NSError for Domain, Code, and UserInfo.

Used by:

  • [WKWebExtensionControllerDelegate.WebExtensionControllerOpenNewWindowUsingConfigurationForExtensionContextCompletionHandler]

type WKWebExtensionWindowObject

type WKWebExtensionWindowObject struct {
	objectivec.Object
}

WKWebExtensionWindowObject wraps an existing Objective-C object that conforms to the WKWebExtensionWindow protocol.

func WKWebExtensionWindowObjectFromID

func WKWebExtensionWindowObjectFromID(id objc.ID) WKWebExtensionWindowObject

WKWebExtensionWindowObjectFromID constructs a WKWebExtensionWindowObject from an objc.ID. The object is determined to conform to the protocol at runtime.

func (WKWebExtensionWindowObject) ActiveTabForWebExtensionContext

func (o WKWebExtensionWindowObject) ActiveTabForWebExtensionContext(context IWKWebExtensionContext) WKWebExtensionTab

Called when the active tab is needed for the window.

context: The context in which the web extension is running.

Discussion

Defaults to `nil` if not implemented.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionWindow/activeTab(for:)

func (WKWebExtensionWindowObject) BaseObject

func (WKWebExtensionWindowObject) CloseForWebExtensionContextCompletionHandler

func (o WKWebExtensionWindowObject) CloseForWebExtensionContextCompletionHandler(context IWKWebExtensionContext, completionHandler ErrorHandler)

Called to close the window.

context: The context in which the web extension is running.

completionHandler: A block that must be called upon completion. It takes a single error argument, which should be provided if any errors occurred.

Discussion

No action is performed if not implemented.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionWindow/close(for:completionHandler:)

func (WKWebExtensionWindowObject) FocusForWebExtensionContextCompletionHandler

func (o WKWebExtensionWindowObject) FocusForWebExtensionContextCompletionHandler(context IWKWebExtensionContext, completionHandler ErrorHandler)

Called to focus the window.

context: The context in which the web extension is running.

completionHandler: A block that must be called upon completion. It takes a single error argument, which should be provided if any errors occurred.

Discussion

No action is performed if not implemented.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionWindow/focus(for:completionHandler:)

func (WKWebExtensionWindowObject) FrameForWebExtensionContext

func (o WKWebExtensionWindowObject) FrameForWebExtensionContext(context IWKWebExtensionContext) corefoundation.CGRect

Called when the frame of the window is needed.

context: The context in which the web extension is running.

Discussion

Defaults to CGRectNull if not implemented.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionWindow/frame(for:)

func (WKWebExtensionWindowObject) IsPrivateForWebExtensionContext

func (o WKWebExtensionWindowObject) IsPrivateForWebExtensionContext(context IWKWebExtensionContext) bool

Called when the private state of the window is needed.

context: The context in which the web extension is running.

Discussion

Defaults to [NO] if not implemented. This value is cached and will not change for the duration of the window or its contained tabs.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionWindow/isPrivate(for:)

func (WKWebExtensionWindowObject) ScreenFrameForWebExtensionContext

func (o WKWebExtensionWindowObject) ScreenFrameForWebExtensionContext(context IWKWebExtensionContext) corefoundation.CGRect

Called when the screen frame containing the window is needed.

context: The context associated with the running web extension.

Discussion

Defaults to CGRectNull if not implemented.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionWindow/screenFrame(for:)

func (WKWebExtensionWindowObject) SetFrameForWebExtensionContextCompletionHandler

func (o WKWebExtensionWindowObject) SetFrameForWebExtensionContextCompletionHandler(frame corefoundation.CGRect, context IWKWebExtensionContext, completionHandler ErrorHandler)

Called to set the frame of the window.

frame: The new frame of the window, in screen coordinates.

context: The context in which the web extension is running.

completionHandler: A block that must be called upon completion. It takes a single error argument, which should be provided if any errors occurred.

Discussion

On macOS, the implementation of both [FrameForWebExtensionContext] and [ScreenFrameForWebExtensionContext] are prerequisites. On iOS, iPadOS, and visionOS, only [FrameForWebExtensionContext] is a prerequisite. Without the respective method(s), this method will not be called.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionWindow/setFrame(_:for:completionHandler:)

func (WKWebExtensionWindowObject) SetWindowStateForWebExtensionContextCompletionHandler

func (o WKWebExtensionWindowObject) SetWindowStateForWebExtensionContextCompletionHandler(state WKWebExtensionWindowState, context IWKWebExtensionContext, completionHandler ErrorHandler)

Called to set the state of the window.

state: The new state of the window.

context: The context in which the web extension is running.

completionHandler: A block that must be called upon completion. It takes a single error argument, which should be provided if any errors occurred.

Discussion

The implementation of [WindowStateForWebExtensionContext] is a prerequisite.

Without it, this method will not be called.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionWindow/setWindowState(_:for:completionHandler:)

func (WKWebExtensionWindowObject) TabsForWebExtensionContext

func (o WKWebExtensionWindowObject) TabsForWebExtensionContext(context IWKWebExtensionContext) []objectivec.IObject

Called when the tabs are needed for the window.

context: The context in which the web extension is running.

Discussion

Defaults to an empty array if not implemented.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionWindow/tabs(for:)

func (WKWebExtensionWindowObject) WindowStateForWebExtensionContext

func (o WKWebExtensionWindowObject) WindowStateForWebExtensionContext(context IWKWebExtensionContext) WKWebExtensionWindowState

Called when the state of the window is needed.

context: The context in which the web extension is running.

Discussion

Defaults to[WKWebExtensionWindowStateNormal] if not implemented.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionWindow/windowState(for:)

func (WKWebExtensionWindowObject) WindowTypeForWebExtensionContext

func (o WKWebExtensionWindowObject) WindowTypeForWebExtensionContext(context IWKWebExtensionContext) WKWebExtensionWindowType

Called when the type of the window is needed.

context: The context in which the web extension is running.

Discussion

Defaults to[WKWebExtensionWindowTypeNormal] if not implemented.

See: https://developer.apple.com/documentation/WebKit/WKWebExtensionWindow/windowType(for:)

type WKWebExtensionWindowState

type WKWebExtensionWindowState int

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/WindowState

const (
	// WKWebExtensionWindowStateFullscreen: Indicates a window is in full-screen mode.
	WKWebExtensionWindowStateFullscreen WKWebExtensionWindowState = 3
	// WKWebExtensionWindowStateMaximized: Indicates a window is maximized.
	WKWebExtensionWindowStateMaximized WKWebExtensionWindowState = 2
	// WKWebExtensionWindowStateMinimized: Indicates a window is minimized.
	WKWebExtensionWindowStateMinimized WKWebExtensionWindowState = 1
	// WKWebExtensionWindowStateNormal: Indicates a window is in its normal state.
	WKWebExtensionWindowStateNormal WKWebExtensionWindowState = 0
)

func (WKWebExtensionWindowState) String

func (e WKWebExtensionWindowState) String() string

type WKWebExtensionWindowType

type WKWebExtensionWindowType int

See: https://developer.apple.com/documentation/WebKit/WKWebExtension/WindowType

const (
	// WKWebExtensionWindowTypeNormal: Indicates a normal window.
	WKWebExtensionWindowTypeNormal WKWebExtensionWindowType = 0
	// WKWebExtensionWindowTypePopup: Indicates a pop-up window.
	WKWebExtensionWindowTypePopup WKWebExtensionWindowType = 1
)

func (WKWebExtensionWindowType) String

func (e WKWebExtensionWindowType) String() string

type WKWebView

type WKWebView struct {
	appkit.NSView
}

An object that displays interactive web content, such as for an in-app browser.

Overview

A WKWebView object is a platform-native view that you use to incorporate web content seamlessly into your app’s UI. A web view supports a full web-browsing experience, and presents HTML, CSS, and JavaScript content alongside your app’s native views. Use it when web technologies satisfy your app’s layout and styling requirements more readily than native views. For example, you might use it when your app’s content changes frequently.

A web view offers control over the navigation and user experience through delegate objects. Use the navigation delegate to react when the user clicks links in your web content, or interacts with the content in a way that affects navigation. For example, you might prevent the user from navigating to new content unless specific conditions are met. Use the UI delegate to present native UI elements, such as alerts or contextual menus, in response to interactions with your web content.

Embed a WKWebView object programmatically into your view hierarchy, or add it using Interface Builder. Interface Builder supports many customizations, such as configuring data detectors, media playback, and interaction behaviors. For more extensive customizations, create your web view programmatically using a WKWebViewConfiguration object. For example, use a web view configuration object to specify handlers for custom URL schemes, manage cookies, and customize preferences for your web content.

Before your web view appears onscreen, load content from a web server using a URLRequest structure or load content directly from a local file or HTML string. The web view automatically loads embedded resources such as images or videos as part of the initial load request. It then renders your content and displays the results inside the view’s bounds rectangle. The following code example shows a view controller that replaces its default view with a custom WKWebView object.

A web view automatically converts telephone numbers that appear in web content to Phone links. When the user taps a Phone link, the Phone app launches and dials the number. Use the WKWebViewConfiguration object to change the default data detector behavior.

You can also use WKWebView.SetMagnificationCenteredAtPoint to programmatically set the scale of web content the first time it appears in a web view. Thereafter, the user can change the scale using gestures.

Manage the navigation through your web content

WKWebView provides a complete browsing experience, including the ability to navigate between different webpages using links, forward and back buttons, and more. When the user clicks a link in your content, the web view acts like a browser and displays the content at that link. To disallow navigation, or to customize your web view’s navigation behavior, provide your web view with a navigation delegate — an object that conforms to the WKNavigationDelegate protocol. Use your navigation delegate to modify the web view’s navigation behavior, or to track the loading progress of new content.

You can also use the methods of WKWebView to navigate programmatically through your content, or to trigger navigation from other parts of your app’s interface. For example, if your UI includes forward and back buttons, connect those buttons to the WKWebView.GoBack and WKWebView.GoForward methods of your web view to trigger the corresponding web navigation. Use the WKWebView.CanGoBack and WKWebView.CanGoForward properties to determine when to enable or disable your buttons.

Provide sharing options

People may want to share the contents of your web view with an app or other people. Use a UIActivityViewController to present a share sheet offering all the ways people can share the web content.

If your app has the com.apple.developer.web-browser entitlement, the iOS share sheet can offer Add to Home Screen for an `http` or `https` webpage, creating a convenient link to a web app or bookmark. To allow someone to add the current webpage to the Home Screen, include the WKWebView instance in the `activityItems` array when you call init(activityItems:applicationActivities:) to create the UIActivityViewController. For more information about building a browser app, see Preparing your app to be the default web browser.

Creating a web view

Displaying native user interface elements

Managing navigation between webpages

Loading web content

Managing the loading process

Managing downloads

Making web content inspectable

Inspecting the view information

Scaling content

Interacting with media

Managing the microphone and camera

Navigating between webpages

Executing JavaScript

Capturing the web view’s content

Handling full-screen transitions

Configuring viewport insets

Instance Properties

Instance Methods

See: https://developer.apple.com/documentation/WebKit/WKWebView

func NewWKWebView

func NewWKWebView() WKWebView

NewWKWebView creates a new WKWebView instance.

func NewWKWebViewWithCoder

func NewWKWebViewWithCoder(coder foundation.INSCoder) WKWebView

Returns an object initialized from data in the specified coder object.

coder: The coder object that contains the object’s data.

See: https://developer.apple.com/documentation/WebKit/WKWebView/init(coder:)

func NewWKWebViewWithFrameConfiguration

func NewWKWebViewWithFrameConfiguration(frame corefoundation.CGRect, configuration IWKWebViewConfiguration) WKWebView

Creates a web view and initializes it with the specified frame and configuration data.

frame: The frame rectangle for the new web view.

configuration: The configuration of the new web view. This method saves a copy of your configuration object. Changes you make to your original object after calling this method have no effect on the web view’s configuration. For a list of configuration options and their default values, see WKWebViewConfiguration.

Return Value

An initialized web view, or `nil` if the view couldn’t be initialized.

Discussion

This method is the designated initializer for the class. Use this method to create a web view that requires custom configuration. For example, use it when you need to specify custom cookies or content filters for the web content.

To create a web view with default configuration values, call the inherited init(frame:) method.

See: https://developer.apple.com/documentation/WebKit/WKWebView/init(frame:configuration:)

func NewWebViewWithCoder deprecated

func NewWebViewWithCoder(coder foundation.INSCoder) WKWebView

Deprecated: Use NewWKWebViewWithCoder instead.

func NewWebViewWithFrameConfiguration deprecated

func NewWebViewWithFrameConfiguration(frame corefoundation.CGRect, configuration IWKWebViewConfiguration) WKWebView

Deprecated: Use NewWKWebViewWithFrameConfiguration instead.

func WKWebViewFromID

func WKWebViewFromID(id objc.ID) WKWebView

WKWebViewFromID constructs a WKWebView from an objc.ID.

An object that displays interactive web content, such as for an in-app browser.

func (WKWebView) AllowsBackForwardNavigationGestures

func (w WKWebView) AllowsBackForwardNavigationGestures() bool

A Boolean value that indicates whether horizontal swipe gestures trigger backward and forward page navigation.

Discussion

The default value is false.

See: https://developer.apple.com/documentation/WebKit/WKWebView/allowsBackForwardNavigationGestures

func (WKWebView) AllowsLinkPreview

func (w WKWebView) AllowsLinkPreview() bool

A Boolean value that determines whether pressing a link displays a preview of the destination for the link.

Discussion

In iOS, this property is available on devices that support 3D Touch. In iOS 10 and later, the default value is true; in previous versions of iOS, the default value is false.

If you set this property’s value to true, an iOS user can press links to preview link destinations and detected data such as addresses and phone numbers. Such previews are known to users as peeks. If a user presses deeper on a link preview, the preview navigates (or pops, in user terminology) to the destination. Because pop navigation switches the user from your app to Safari, it is opt-in for iOS apps.

If you want to support link preview in iOS but also want to keep users within your app, you can switch from using the WKWebView class to the SFSafariViewController class. If you are using a web view as an in-app browser, making this change is best practice. The Safari view controller class automatically supports link previews.

In macOS, this property is available on devices with a Force Touch trackpad. The default value is true.

With this property set to its default value of true, a macOS user can force click a link to display a preview window showing the link’s destination. If the user then clicks the preview, the destination opens in Safari.

On both platforms, all types of detected data respond to presses when this property is set to true. That is, in iOS 9 and OS X 10.11, you cannot specify which types of data are detected in the WKWebView class.

See: https://developer.apple.com/documentation/WebKit/WKWebView/allowsLinkPreview

func (WKWebView) AllowsMagnification

func (w WKWebView) AllowsMagnification() bool

A Boolean value that indicates whether magnify gestures change the web view’s magnification.

Discussion

The default value is false. You can set the `magnification` property even if `allowsMagnification` is set to false.

See: https://developer.apple.com/documentation/WebKit/WKWebView/allowsMagnification

func (WKWebView) Autorelease

func (w WKWebView) Autorelease() WKWebView

Autorelease adds the receiver to the current autorelease pool.

func (WKWebView) BackForwardList

func (w WKWebView) BackForwardList() IWKBackForwardList

The web view’s back-forward list.

See: https://developer.apple.com/documentation/WebKit/WKWebView/backForwardList

func (WKWebView) CameraCaptureState

func (w WKWebView) CameraCaptureState() WKMediaCaptureState

An enumeration case that indicates whether the webpage is using the camera to capture images or video.

See: https://developer.apple.com/documentation/WebKit/WKWebView/cameraCaptureState

func (WKWebView) CanGoBack

func (w WKWebView) CanGoBack() bool

A Boolean value that indicates whether there is a valid back item in the back-forward list.

See: https://developer.apple.com/documentation/WebKit/WKWebView/canGoBack

func (WKWebView) CanGoForward

func (w WKWebView) CanGoForward() bool

A Boolean value that indicates whether there is a valid forward item in the back-forward list.

See: https://developer.apple.com/documentation/WebKit/WKWebView/canGoForward

func (WKWebView) CertificateChain

func (w WKWebView) CertificateChain() foundation.INSArray

An array of objects forming the certificate chain for the currently committed navigation.

Discussion

Each item in the array is a SecCertificate object.

See: https://developer.apple.com/documentation/WebKit/WKWebView/certificateChain

func (WKWebView) CloseAllMediaPresentations

func (w WKWebView) CloseAllMediaPresentations(ctx context.Context) error

CloseAllMediaPresentations is a synchronous wrapper around WKWebView.CloseAllMediaPresentationsWithCompletionHandler. It blocks until the completion handler fires or the context is cancelled.

func (WKWebView) CloseAllMediaPresentationsWithCompletionHandler

func (w WKWebView) CloseAllMediaPresentationsWithCompletionHandler(completionHandler VoidHandler)

Closes all media the web view is presenting, including picture-in-picture video and fullscreen video.

completionHandler: A closure the system executes after it completes closing all media presentations.

See: https://developer.apple.com/documentation/WebKit/WKWebView/closeAllMediaPresentations(completionHandler:)

func (WKWebView) Configuration

func (w WKWebView) Configuration() IWKWebViewConfiguration

The object that contains the configuration details for the web view.

Discussion

Use the object in this property to obtain information about your web view’s configuration. Because this property returns a copy of the configuration object, changes you make to that object don’t affect the web view’s configuration.

If you didn’t create your web view using the WKWebView.InitWithFrameConfiguration method, this property contains a default configuration object.

See: https://developer.apple.com/documentation/WebKit/WKWebView/configuration

func (WKWebView) CreatePDFWithConfiguration

func (w WKWebView) CreatePDFWithConfiguration(ctx context.Context, pdfConfiguration IWKPDFConfiguration) (*foundation.NSData, error)

CreatePDFWithConfiguration is a synchronous wrapper around WKWebView.CreatePDFWithConfigurationCompletionHandler. It blocks until the completion handler fires or the context is cancelled.

func (WKWebView) CreatePDFWithConfigurationCompletionHandler

func (w WKWebView) CreatePDFWithConfigurationCompletionHandler(pdfConfiguration IWKPDFConfiguration, completionHandler DataErrorHandler)

Generates PDF data from the web view’s contents asynchronously.

pdfConfiguration: The object that specifies the portion of the web view to capture as PDF data.

completionHandler: The completion handler to call when the data is ready. This block has no return value and takes the following parameters:

pdfDocumentData: A data object that contains the PDF data to use for rendering the contents of the web view. error: An error object if a problem occurred, or `nil` on success.

See: https://developer.apple.com/documentation/WebKit/WKWebView/createPDFWithConfiguration:completionHandler:

func (WKWebView) CreateWebArchiveData

func (w WKWebView) CreateWebArchiveData(ctx context.Context) (*foundation.NSData, error)

CreateWebArchiveData is a synchronous wrapper around WKWebView.CreateWebArchiveDataWithCompletionHandler. It blocks until the completion handler fires or the context is cancelled.

func (WKWebView) CreateWebArchiveDataWithCompletionHandler

func (w WKWebView) CreateWebArchiveDataWithCompletionHandler(completionHandler DataErrorHandler)

Creates a web archive of the web view’s contents asynchronously.

completionHandler: The completion handler block to call when the web archive data is ready. This block has no return value and takes the following parameters:

data: A data object that contains the web archive. error: An error object if an error occurs, or `nil` on success.

See: https://developer.apple.com/documentation/WebKit/WKWebView/createWebArchiveDataWithCompletionHandler:

func (WKWebView) CustomUserAgent

func (w WKWebView) CustomUserAgent() string

The custom user agent string.

Discussion

Use this property to specify a custom user agent string for your web view. The default value of this property is `nil`.

See: https://developer.apple.com/documentation/WebKit/WKWebView/customUserAgent

func (WKWebView) EstimatedProgress

func (w WKWebView) EstimatedProgress() float64

An estimate of what fraction of the current navigation has been loaded.

Discussion

This value ranges from `0.0` to `1.0` based on the total number of bytes received, including the main document and all of its potential subresources. After navigation loading completes, the `estimatedProgress` value remains at `1.0` until a new navigation starts, at which point the `estimatedProgress` value resets to `0.0`. The WKWebView class is key-value observing (KVO) compliant for this property.

See: https://developer.apple.com/documentation/WebKit/WKWebView/estimatedProgress

func (WKWebView) EvaluateJavaScript

func (w WKWebView) EvaluateJavaScript(ctx context.Context, javaScriptString string) (objectivec.IObject, error)

EvaluateJavaScript is a synchronous wrapper around WKWebView.EvaluateJavaScriptCompletionHandler. It blocks until the completion handler fires or the context is cancelled.

func (WKWebView) EvaluateJavaScriptCompletionHandler

func (w WKWebView) EvaluateJavaScriptCompletionHandler(javaScriptString string, completionHandler ObjectErrorHandler)

Evaluates the specified JavaScript string.

javaScriptString: The JavaScript string to evaluate.

completionHandler: A handler block to execute when script evaluation finishes. The method calls your block whether script evaluation completes successfully or fails. The block has no return value and takes the following parameters:

object: The result of the script evaluation, or `nil` if an error occurred. error: `nil` on success, or an error object with information about the problem.

Discussion

After evaluating the script, this method executes the completion handler block with either the result of the script evaluation or an error. The completion handler always runs on the app’s main thread.

See: https://developer.apple.com/documentation/WebKit/WKWebView/evaluateJavaScript(_:completionHandler:)

func (WKWebView) FetchDataOfTypes

func (w WKWebView) FetchDataOfTypes(ctx context.Context, dataTypes WKWebViewDataType) (*foundation.NSData, error)

FetchDataOfTypes is a synchronous wrapper around WKWebView.FetchDataOfTypesCompletionHandler. It blocks until the completion handler fires or the context is cancelled.

func (WKWebView) FindStringWithConfiguration

func (w WKWebView) FindStringWithConfiguration(ctx context.Context, string_ string, configuration IWKFindConfiguration) (*WKFindResult, error)

FindStringWithConfiguration is a synchronous wrapper around WKWebView.FindStringWithConfigurationCompletionHandler. It blocks until the completion handler fires or the context is cancelled.

func (WKWebView) FindStringWithConfigurationCompletionHandler

func (w WKWebView) FindStringWithConfigurationCompletionHandler(string_ string, configuration IWKFindConfiguration, completionHandler WKFindResultHandler)

Searches for the specified string in the web view’s content.

string: The search string to use.

configuration: The search parameters. Use this object to specify whether the search is case-sensitive, moves forward or backward, and wraps when it reaches the end of the page.

completionHandler: The completion handler to call with the results of the search. This handler has no return value and takes the following parameter:

result: The object that contains the results of the search.

See: https://developer.apple.com/documentation/WebKit/WKWebView/findString:withConfiguration:completionHandler:

func (WKWebView) GoBack

func (w WKWebView) GoBack() IWKNavigation

Navigates to the back item in the back-forward list.

Return Value

A new navigation to the requested item, or `nil` if there is no back item in the back-forward list.

See: https://developer.apple.com/documentation/WebKit/WKWebView/goBack()

func (WKWebView) GoBackWithSender

func (w WKWebView) GoBackWithSender(sender objectivec.IObject)

Navigates to the back item in the back-forward list.

sender: The object sending this message.

See: https://developer.apple.com/documentation/WebKit/WKWebView/goBack(_:)

func (WKWebView) GoForward

func (w WKWebView) GoForward() IWKNavigation

Navigates to the forward item in the back-forward list.

Return Value

A new navigation to the requested item, or `nil` if there is no forward item in the back-forward list.

See: https://developer.apple.com/documentation/WebKit/WKWebView/goForward()

func (WKWebView) GoForwardWithSender

func (w WKWebView) GoForwardWithSender(sender objectivec.IObject)

Navigates to the forward item in the back-forward list.

sender: The object sending this message.

See: https://developer.apple.com/documentation/WebKit/WKWebView/goForward(_:)

func (WKWebView) GoToBackForwardListItem

func (w WKWebView) GoToBackForwardListItem(item IWKBackForwardListItem) IWKNavigation

Navigates to an item from the back-forward list and sets it as the current item.

item: The item to navigate to. The item must be in the web view’s back-forward list.

Return Value

A new navigation to the requested item, or `nil` if it is already the current item or is not part of the web view’s back-forward list.

See: https://developer.apple.com/documentation/WebKit/WKWebView/go(to:)

func (WKWebView) HasOnlySecureContent

func (w WKWebView) HasOnlySecureContent() bool

A Boolean value that indicates whether the web view loaded all resources on the page through securely encrypted connections.

Discussion

WKWebView is key-value observing (KVO) compliant for this property.

See: https://developer.apple.com/documentation/WebKit/WKWebView/hasOnlySecureContent

func (WKWebView) Init

func (w WKWebView) Init() WKWebView

Init initializes the instance.

func (WKWebView) InitWithFrameConfiguration

func (w WKWebView) InitWithFrameConfiguration(frame corefoundation.CGRect, configuration IWKWebViewConfiguration) WKWebView

Creates a web view and initializes it with the specified frame and configuration data.

frame: The frame rectangle for the new web view.

configuration: The configuration of the new web view. This method saves a copy of your configuration object. Changes you make to your original object after calling this method have no effect on the web view’s configuration. For a list of configuration options and their default values, see WKWebViewConfiguration.

Return Value

An initialized web view, or `nil` if the view couldn’t be initialized.

Discussion

This method is the designated initializer for the class. Use this method to create a web view that requires custom configuration. For example, use it when you need to specify custom cookies or content filters for the web content.

To create a web view with default configuration values, call the inherited init(frame:) method.

See: https://developer.apple.com/documentation/WebKit/WKWebView/init(frame:configuration:)

func (WKWebView) InteractionState

func (w WKWebView) InteractionState() objectivec.IObject

An object you use to capture the current state of interaction in a web view so that you can restore that state later to another web view.

See: https://developer.apple.com/documentation/WebKit/WKWebView/interactionState

func (WKWebView) IsBlockedByScreenTime

func (w WKWebView) IsBlockedByScreenTime() bool

Discussion

A Boolean value indicating whether Screen Time blocking has occurred.

See: https://developer.apple.com/documentation/WebKit/WKWebView/isBlockedByScreenTime

func (WKWebView) IsInspectable added in v0.6.5

func (w WKWebView) IsInspectable() bool

A Boolean value that indicates whether you can inspect the view with Safari Web Inspector.

Discussion

Defaults to `false`.

Set to `true` at any point in the view’s lifetime to allow Safari Web Inspector access to inspect the view’s content. Then, select your view in Safari’s Develop menu for either your computer or an attached device to inspect it.

If you set this value to `false` during inspection, the system immediately closes Safari Web Inspector and does not provide any further information about the web content.

For more information, see Enabling the Inspection of Web Content in Apps.

See: https://developer.apple.com/documentation/WebKit/WKWebView/isInspectable

func (WKWebView) IsLoading added in v0.6.5

func (w WKWebView) IsLoading() bool

A Boolean value that indicates whether the view is currently loading content.

Discussion

Set to `true` if the receiver is still loading content; otherwise, `false.` The WKWebView class is key-value observing (KVO) compliant for this property.

See: https://developer.apple.com/documentation/WebKit/WKWebView/isLoading

func (WKWebView) IsWritingToolsActive added in v0.6.5

func (w WKWebView) IsWritingToolsActive() bool

See: https://developer.apple.com/documentation/WebKit/WKWebView/isWritingToolsActive

func (WKWebView) LoadDataMIMETypeCharacterEncodingNameBaseURL

func (w WKWebView) LoadDataMIMETypeCharacterEncodingNameBaseURL(data foundation.NSData, MIMEType string, characterEncodingName string, baseURL foundation.NSURL) IWKNavigation

Loads the content of the specified data object and navigates to it.

data: The data to use as the contents of the webpage.

MIMEType: The MIME type of the information in the `data` parameter. This parameter must not contain an empty string.

characterEncodingName: The data’s character encoding name.

baseURL: A URL that you use to resolve relative URLs within the document.

Return Value

A new navigation object for tracking the request.

Discussion

Use this method to navigate to a webpage that you loaded yourself and saved in a data object. For example, if you previously wrote HTML content to a data object, use this method to navigate to that content.

See: https://developer.apple.com/documentation/WebKit/WKWebView/load(_:mimeType:characterEncodingName:baseURL:)

func (WKWebView) LoadFileRequestAllowingReadAccessToURL

func (w WKWebView) LoadFileRequestAllowingReadAccessToURL(request foundation.NSURLRequest, readAccessURL foundation.NSURL) IWKNavigation

Loads the web content from the file the URL request object specifies and navigates to that content.

request: A URL request that specifies the file to display. The URL in this request must be a file-based URL.

readAccessURL: The URL of a file or directory containing web content that you grant the system permission to read. This URL must be a file-based URL and must not be empty. To prevent WebKit from reading any other content, specify the same value as the URL parameter. To read additional files related to the content file, specify a directory.

Return Value

A new navigation object you use to track the loading progress of the request.

Discussion

Provide the source of this load request for app activity data by setting the attribution parameter on your request.

See: https://developer.apple.com/documentation/WebKit/WKWebView/loadFileRequest(_:allowingReadAccessTo:)

func (WKWebView) LoadFileURLAllowingReadAccessToURL

func (w WKWebView) LoadFileURLAllowingReadAccessToURL(URL foundation.NSURL, readAccessURL foundation.NSURL) IWKNavigation

Loads the web content from the specified file and navigates to it.

URL: The URL of a file that contains web content. This URL must be a file-based URL.

readAccessURL: The URL of a file or directory containing web content that you grant the system permission to read. This URL must be a file-based URL and must not be empty. To prevent WebKit from reading any other content, specify the same value as the URL parameter. To read additional files related to the content file, specify a directory.

Return Value

A new navigation object you use to track the loading progress of the request.

Discussion

This method sets the source of this load request for app activity data to NSURLRequest.Attribution.developer. To specify the source of this load, use WKWebView.LoadFileRequestAllowingReadAccessToURL instead.

See: https://developer.apple.com/documentation/WebKit/WKWebView/loadFileURL(_:allowingReadAccessTo:)

func (WKWebView) LoadHTMLStringBaseURL

func (w WKWebView) LoadHTMLStringBaseURL(string_ string, baseURL foundation.NSURL) IWKNavigation

Loads the contents of the specified HTML string and navigates to it.

string: The string to use as the contents of the webpage.

baseURL: The base URL to use when the system resolves relative URLs within the HTML string.

Return Value

A new navigation object you use to track the loading progress of the request.

Discussion

Use this method to navigate to a webpage that you loaded or created yourself. For example, you might use this method to load HTML content that your app generates programmatically.

This method sets the source of this load request for app activity data to NSURLRequest.Attribution.developer.

See: https://developer.apple.com/documentation/WebKit/WKWebView/loadHTMLString(_:baseURL:)

func (WKWebView) LoadRequest

func (w WKWebView) LoadRequest(request foundation.NSURLRequest) IWKNavigation

Loads the web content that the specified URL request object references and navigates to that content.

request: A URL request that specifies the resource to display.

Return Value

A new navigation object that you use to track the loading progress of the request.

Discussion

Use this method to load a page from a local or network-based URL. For example, you might use this method to navigate to a network-based webpage.

Provide the source of this load request for app activity data by setting the attribution parameter on your request.

See: https://developer.apple.com/documentation/WebKit/WKWebView/load(_:)

func (WKWebView) LoadSimulatedRequestResponseHTMLString

func (w WKWebView) LoadSimulatedRequestResponseHTMLString(request foundation.NSURLRequest, string_ string) IWKNavigation

Loads the web content from the HTML you provide as if the HTML were the response to the request.

request: A URL request that specifies the base URL and other loading details the system uses to interpret the HTML you provide.

string: The HTML code you provide in a string to use as the contents of the webpage.

Return Value

A new navigation object you use to track the loading progress of the request.

See: https://developer.apple.com/documentation/WebKit/WKWebView/loadSimulatedRequest(_:responseHTML:)

func (WKWebView) LoadSimulatedRequestResponseResponseData

func (w WKWebView) LoadSimulatedRequestResponseResponseData(request foundation.NSURLRequest, response foundation.NSURLResponse, data foundation.NSData) IWKNavigation

Loads the web content from the data you provide as if the data were the response to the request.

request: A URL request that specifies the base URL and other loading details the system uses to interpret the data you provide.

response: A response the system uses to interpret the data you provide.

data: The data to use as the contents of the webpage.

Return Value

A new navigation object you use to track the loading progress of the request.

See: https://developer.apple.com/documentation/WebKit/WKWebView/loadSimulatedRequest(_:response:responseData:)

func (WKWebView) Magnification

func (w WKWebView) Magnification() float64

The factor by which the page content is currently scaled.

Discussion

The default value is `1.0`.

See: https://developer.apple.com/documentation/WebKit/WKWebView/magnification

func (WKWebView) MediaType

func (w WKWebView) MediaType() string

The media type for the contents of the web view.

Discussion

When the value of this property is `nil`, the web view derives the current media type from the CSS media property of its content. If you assign a value other than `nil` to this property, the web view uses the value you provide instead. The default value of this property is `nil`.

See: https://developer.apple.com/documentation/WebKit/WKWebView/mediaType

func (WKWebView) MicrophoneCaptureState

func (w WKWebView) MicrophoneCaptureState() WKMediaCaptureState

An enumeration case that indicates whether the webpage is using the microphone to capture audio.

See: https://developer.apple.com/documentation/WebKit/WKWebView/microphoneCaptureState

func (WKWebView) NavigationDelegate

func (w WKWebView) NavigationDelegate() WKNavigationDelegate

The object you use to manage navigation behavior for the web view.

Discussion

Provide a delegate object when you want to manage or restrict navigation in your web content, track the progress of navigation requests, and handle authentication challenges for any new content. The object you specify must conform to the WKNavigationDelegate protocol.

See: https://developer.apple.com/documentation/WebKit/WKWebView/navigationDelegate

func (WKWebView) PageZoom

func (w WKWebView) PageZoom() float64

The scale factor by which the web view scales content relative to its bounds.

Discussion

The default value of this property is `1.0`, which displays the content without any scaling. Changing the value of this property is equivalent to setting the CSS `zoom` property on all page content.

See: https://developer.apple.com/documentation/WebKit/WKWebView/pageZoom

func (WKWebView) PauseAllMediaPlayback

func (w WKWebView) PauseAllMediaPlayback(ctx context.Context) error

PauseAllMediaPlayback is a synchronous wrapper around WKWebView.PauseAllMediaPlaybackWithCompletionHandler. It blocks until the completion handler fires or the context is cancelled.

func (WKWebView) PauseAllMediaPlaybackWithCompletionHandler

func (w WKWebView) PauseAllMediaPlaybackWithCompletionHandler(completionHandler VoidHandler)

Pauses playback of all media in the web view.

completionHandler: A closure the system executes after the web view pauses media playback.

See: https://developer.apple.com/documentation/WebKit/WKWebView/pauseAllMediaPlayback(completionHandler:)

func (WKWebView) PrintOperationWithPrintInfo

func (w WKWebView) PrintOperationWithPrintInfo(printInfo appkit.NSPrintInfo) appkit.NSPrintOperation

Returns the print operation object to use when printing the contents of the web view.

printInfo: The printer information object to use when configuring the print operation.

Return Value

The print operation object to use when printing the web view, or `nil` if printing is not supported.

See: https://developer.apple.com/documentation/WebKit/WKWebView/printOperation(with:)

func (WKWebView) Reload

func (w WKWebView) Reload() IWKNavigation

Reloads the current webpage.

Return Value

A new navigation object to represent the reload operation.

See: https://developer.apple.com/documentation/WebKit/WKWebView/reload()

func (WKWebView) ReloadFromOrigin

func (w WKWebView) ReloadFromOrigin() IWKNavigation

Reloads the current webpage, and performs end-to-end revalidation of the content using cache-validating conditionals, if possible.

Return Value

A new navigation that represents the reloaded webpage.

See: https://developer.apple.com/documentation/WebKit/WKWebView/reloadFromOrigin()

func (WKWebView) ReloadFromOriginWithSender

func (w WKWebView) ReloadFromOriginWithSender(sender objectivec.IObject)

Reloads the current webpage, and performs end-to-end revalidation of the content using cache-validating conditionals, if possible.

sender: The object that sent the message.

Discussion

Make this method the action of any controls that trigger a reload of your web content. Connect your controls to this method programmatically or in Interface Builder.

See: https://developer.apple.com/documentation/WebKit/WKWebView/reloadFromOrigin(_:)

func (WKWebView) ReloadWithSender

func (w WKWebView) ReloadWithSender(sender objectivec.IObject)

Reloads the current webpage.

sender: The object that sent the message.

Discussion

Make this method the action of any controls that trigger a reload of your web content. Connect your controls to this method programmatically or in Interface Builder.

See: https://developer.apple.com/documentation/WebKit/WKWebView/reload(_:)

func (WKWebView) RequestMediaPlaybackState

func (w WKWebView) RequestMediaPlaybackState(ctx context.Context) (int, error)

RequestMediaPlaybackState is a synchronous wrapper around WKWebView.RequestMediaPlaybackStateWithCompletionHandler. It blocks until the completion handler fires or the context is cancelled.

func (WKWebView) RequestMediaPlaybackStateWithCompletionHandler

func (w WKWebView) RequestMediaPlaybackStateWithCompletionHandler(completionHandler WKMediaPlaybackStateHandler)

Requests the playback status of media in the web view.

completionHandler: A closure the system executes after the web view determines the current state of media playback.

See: https://developer.apple.com/documentation/WebKit/WKWebView/requestMediaPlaybackState(completionHandler:)

func (WKWebView) RestoreData

func (w WKWebView) RestoreData(ctx context.Context, data foundation.NSData) error

RestoreData is a synchronous wrapper around WKWebView.RestoreDataCompletionHandler. It blocks until the completion handler fires or the context is cancelled.

func (WKWebView) ResumeDownloadFromResumeData

func (w WKWebView) ResumeDownloadFromResumeData(ctx context.Context, resumeData foundation.NSData) (*WKDownload, error)

ResumeDownloadFromResumeData is a synchronous wrapper around WKWebView.ResumeDownloadFromResumeDataCompletionHandler. It blocks until the completion handler fires or the context is cancelled.

func (WKWebView) ResumeDownloadFromResumeDataCompletionHandler

func (w WKWebView) ResumeDownloadFromResumeDataCompletionHandler(resumeData foundation.NSData, completionHandler WKDownloadHandler)

Resumes a failed or canceled download.

resumeData: An object with data that you use to resume a failed or canceled download.

completionHandler: A closure the system executes when it has resumed a download.

Discussion

To receive progress updates, set the delegate of the download object in the completion handler.

See: https://developer.apple.com/documentation/WebKit/WKWebView/resumeDownload(fromResumeData:completionHandler:)

func (WKWebView) ServerTrust

func (w WKWebView) ServerTrust() security.SecTrustRef

The trust management object you use to evaluate trust for the current webpage.

Discussion

Use the object in this property to validate the webpage’s certificate and associated credentials. WKWebView is key-value observing (KVO) compliant for this property.

See: https://developer.apple.com/documentation/WebKit/WKWebView/serverTrust

func (WKWebView) SetAllMediaPlaybackSuspended

func (w WKWebView) SetAllMediaPlaybackSuspended(ctx context.Context, suspended bool) error

SetAllMediaPlaybackSuspended is a synchronous wrapper around WKWebView.SetAllMediaPlaybackSuspendedCompletionHandler. It blocks until the completion handler fires or the context is cancelled.

func (WKWebView) SetAllMediaPlaybackSuspendedCompletionHandler

func (w WKWebView) SetAllMediaPlaybackSuspendedCompletionHandler(suspended bool, completionHandler VoidHandler)

Changes whether the webpage is suspending playback of all media in the page.

suspended: A Boolean value that indicates whether the webpage should suspend media playback.

completionHandler: A closure the system executes after it completes changing the media playback suspension status.

Discussion

Pass `true` to pause all media the web view is playing. Neither the user nor the webpage can resume playback until you call this method again with `false`.

See: https://developer.apple.com/documentation/WebKit/WKWebView/setAllMediaPlaybackSuspended(_:completionHandler:)

func (WKWebView) SetAllowsBackForwardNavigationGestures

func (w WKWebView) SetAllowsBackForwardNavigationGestures(value bool)

func (WKWebView) SetAllowsLinkPreview

func (w WKWebView) SetAllowsLinkPreview(value bool)

func (WKWebView) SetAllowsMagnification

func (w WKWebView) SetAllowsMagnification(value bool)

func (WKWebView) SetCameraCaptureState

func (w WKWebView) SetCameraCaptureState(ctx context.Context, state WKMediaCaptureState) error

SetCameraCaptureState is a synchronous wrapper around WKWebView.SetCameraCaptureStateCompletionHandler. It blocks until the completion handler fires or the context is cancelled.

func (WKWebView) SetCameraCaptureStateCompletionHandler

func (w WKWebView) SetCameraCaptureStateCompletionHandler(state WKMediaCaptureState, completionHandler VoidHandler)

Changes whether the webpage is using the camera to capture images or video.

state: An enumeration case that indicates whether the webpage should use the camera to capture images or video.

completionHandler: A closure the system executes after changing whether the webpage is using the camera to capture images or video.

See: https://developer.apple.com/documentation/WebKit/WKWebView/setCameraCaptureState(_:completionHandler:)

func (WKWebView) SetCustomUserAgent

func (w WKWebView) SetCustomUserAgent(value string)

func (WKWebView) SetInspectable

func (w WKWebView) SetInspectable(value bool)

func (WKWebView) SetInteractionState

func (w WKWebView) SetInteractionState(value objectivec.IObject)

func (WKWebView) SetMagnification

func (w WKWebView) SetMagnification(value float64)

func (WKWebView) SetMagnificationCenteredAtPoint

func (w WKWebView) SetMagnificationCenteredAtPoint(magnification float64, point corefoundation.CGPoint)

Scales the page content and centers the result on the specified point.

magnification: The factor by which to scale the content.

point: The point (in the web view’s bounds) at which to center magnification.

See: https://developer.apple.com/documentation/WebKit/WKWebView/setMagnification(_:centeredAt:)

func (WKWebView) SetMediaType

func (w WKWebView) SetMediaType(value string)

func (WKWebView) SetMicrophoneCaptureState

func (w WKWebView) SetMicrophoneCaptureState(ctx context.Context, state WKMediaCaptureState) error

SetMicrophoneCaptureState is a synchronous wrapper around WKWebView.SetMicrophoneCaptureStateCompletionHandler. It blocks until the completion handler fires or the context is cancelled.

func (WKWebView) SetMicrophoneCaptureStateCompletionHandler

func (w WKWebView) SetMicrophoneCaptureStateCompletionHandler(state WKMediaCaptureState, completionHandler VoidHandler)

Changes whether the webpage is using the microphone to capture audio.

state: An enumeration case that indicates whether the webpage should use the microphone to capture audio.

completionHandler: A closure the system executes after changing whether the webpage is using the microphone to capture audio.

See: https://developer.apple.com/documentation/WebKit/WKWebView/setMicrophoneCaptureState(_:completionHandler:)

func (WKWebView) SetNavigationDelegate

func (w WKWebView) SetNavigationDelegate(value WKNavigationDelegate)

func (WKWebView) SetObscuredContentInsets

func (w WKWebView) SetObscuredContentInsets(value foundation.NSEdgeInsets)

func (WKWebView) SetPageZoom

func (w WKWebView) SetPageZoom(value float64)

func (WKWebView) SetUIDelegate

func (w WKWebView) SetUIDelegate(value WKUIDelegate)

func (WKWebView) SetUnderPageBackgroundColor

func (w WKWebView) SetUnderPageBackgroundColor(value appkit.NSColor)

func (WKWebView) StartDownloadUsingRequest

func (w WKWebView) StartDownloadUsingRequest(ctx context.Context, request foundation.NSURLRequest) (*WKDownload, error)

StartDownloadUsingRequest is a synchronous wrapper around WKWebView.StartDownloadUsingRequestCompletionHandler. It blocks until the completion handler fires or the context is cancelled.

func (WKWebView) StartDownloadUsingRequestCompletionHandler

func (w WKWebView) StartDownloadUsingRequestCompletionHandler(request foundation.NSURLRequest, completionHandler WKDownloadHandler)

Starts to download the resource at the URL in the request.

request: An object that encapsulates a URL and other parameters that you need to download a resource from a webpage.

completionHandler: A closure the system executes when it has started to download the resource.

Discussion

To receive progress updates, set the delegate of the download object in the completion handler.

See: https://developer.apple.com/documentation/WebKit/WKWebView/startDownload(using:completionHandler:)

func (WKWebView) StopLoading

func (w WKWebView) StopLoading()

Stops loading all resources on the current page.

See: https://developer.apple.com/documentation/WebKit/WKWebView/stopLoading()

func (WKWebView) StopLoadingWithSender

func (w WKWebView) StopLoadingWithSender(sender objectivec.IObject)

Stops loading all resources on the current page.

sender: The object that sent the message.

Discussion

Make this method the action of any controls that stop the loading of your web content. Connect your controls to this method programmatically or in Interface Builder.

See: https://developer.apple.com/documentation/WebKit/WKWebView/stopLoading(_:)

func (WKWebView) TakeSnapshotWithConfiguration added in v0.5.3

func (w WKWebView) TakeSnapshotWithConfiguration(ctx context.Context, snapshotConfiguration IWKSnapshotConfiguration) (*appkit.NSImage, error)

TakeSnapshotWithConfiguration is a synchronous wrapper around WKWebView.TakeSnapshotWithConfigurationCompletionHandler. It blocks until the completion handler fires or the context is cancelled.

func (WKWebView) TakeSnapshotWithConfigurationCompletionHandler added in v0.5.3

func (w WKWebView) TakeSnapshotWithConfigurationCompletionHandler(snapshotConfiguration IWKSnapshotConfiguration, completionHandler ImageErrorHandler)

Generates a platform-native image from the web view’s contents asynchronously.

snapshotConfiguration: The object that specifies the portion of the web view to capture, and other capture-related behaviors.

completionHandler: The completion handler to call when the image is ready. This block has no return value and takes the following parameters:

snapshotImage: A platform-native image that contains the specified portion of the web view. error: An error object if a problem occurred, or `nil` on success.

See: https://developer.apple.com/documentation/WebKit/WKWebView/takeSnapshot(with:completionHandler:)

func (WKWebView) ThemeColor

func (w WKWebView) ThemeColor() appkit.NSColor

The theme color that the system gets from the first valid meta tag in the webpage.

See: https://developer.apple.com/documentation/WebKit/WKWebView/themeColor

func (WKWebView) Title

func (w WKWebView) Title() string

The page title.

Discussion

WKWebView is key-value observing (KVO) compliant for this property.

See: https://developer.apple.com/documentation/WebKit/WKWebView/title

func (WKWebView) UIDelegate

func (w WKWebView) UIDelegate() WKUIDelegate

The object you use to integrate custom user interface elements, such as contextual menus or panels, into web view interactions.

See: https://developer.apple.com/documentation/WebKit/WKWebView/uiDelegate

func (WKWebView) URL

func (w WKWebView) URL() foundation.NSURL

The URL for the current webpage.

Discussion

This property contains the URL for the webpage that the web view currently displays. Use this URL in places where you reflect the webpage address in your app’s user interface.

WKWebView is key-value observing (KVO) compliant for this property.

See: https://developer.apple.com/documentation/WebKit/WKWebView/url

func (WKWebView) UnderPageBackgroundColor

func (w WKWebView) UnderPageBackgroundColor() appkit.NSColor

The color the web view displays behind the active page, visible when the user scrolls beyond the bounds of the page.

Discussion

The web view derives the default value of this property from the content of the page, using the background colors of the “ and “ elements with the background color of the web view. To override the default color, set this property to a new color.

See: https://developer.apple.com/documentation/WebKit/WKWebView/underPageBackgroundColor

type WKWebViewClass

type WKWebViewClass struct {
	// contains filtered or unexported fields
}

func GetWKWebViewClass

func GetWKWebViewClass() WKWebViewClass

GetWKWebViewClass returns the class object for WKWebView.

func (WKWebViewClass) Alloc

func (wc WKWebViewClass) Alloc() WKWebView

Alloc allocates memory for a new instance of the class.

func (WKWebViewClass) Class

func (wc WKWebViewClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

func (WKWebViewClass) HandlesURLScheme

func (_WKWebViewClass WKWebViewClass) HandlesURLScheme(urlScheme string) bool

Returns a Boolean value that indicates whether WebKit natively supports resources with the specified URL scheme.

urlScheme: The URL scheme associated with the resource.

Return Value

true if WebKit provides native support for the URL scheme, or false if it doesn’t.

See: https://developer.apple.com/documentation/WebKit/WKWebView/handlesURLScheme(_:)

type WKWebViewConfiguration

type WKWebViewConfiguration struct {
	objectivec.Object
}

A collection of properties that you use to initialize a web view.

Overview

A WKWebViewConfiguration object provides information about how to configure a WKWebView object. Use your configuration object to specify:

- The initial cookies to make available to your web content - Handlers for any custom URL schemes your web content uses - Settings for how to handle media content - Information about how to manage selections within the web view - Custom scripts to inject into the webpage - Custom rules that determine how to render content

You create a WKWebViewConfiguration object in your code, configure its properties, and pass it to the initializer of your WKWebView object. The web view incorporates your configuration settings only at creation time; you cannot change those settings dynamically later.

Configuring the web view’s behavior

Configuring the web view’s preferences

Adding handlers for custom URL schemes

Configuring the rendering behavior

Setting media playback preferences

Selecting user interface directionality

Instance Properties

See: https://developer.apple.com/documentation/WebKit/WKWebViewConfiguration

func NewWKWebViewConfiguration

func NewWKWebViewConfiguration() WKWebViewConfiguration

NewWKWebViewConfiguration creates a new WKWebViewConfiguration instance.

func NewWebViewConfiguration deprecated

func NewWebViewConfiguration() WKWebViewConfiguration

Deprecated: Use NewWKWebViewConfiguration instead.

func NewWebViewConfigurationWithCoder deprecated added in v0.6.10

func NewWebViewConfigurationWithCoder(coder foundation.INSCoder) WKWebViewConfiguration

Deprecated: Use NewWKWebViewConfigurationWithCoder instead.

func WKWebViewConfigurationFromID

func WKWebViewConfigurationFromID(id objc.ID) WKWebViewConfiguration

WKWebViewConfigurationFromID constructs a WKWebViewConfiguration from an objc.ID.

A collection of properties that you use to initialize a web view.

func (WKWebViewConfiguration) AllowsAirPlayForMediaPlayback

func (w WKWebViewConfiguration) AllowsAirPlayForMediaPlayback() bool

A Boolean value that indicates whether the web view allows media playback over AirPlay.

Discussion

The default value of this property is true.

See: https://developer.apple.com/documentation/WebKit/WKWebViewConfiguration/allowsAirPlayForMediaPlayback

func (WKWebViewConfiguration) ApplicationNameForUserAgent

func (w WKWebViewConfiguration) ApplicationNameForUserAgent() string

The app name that appears in the user agent string.

See: https://developer.apple.com/documentation/WebKit/WKWebViewConfiguration/applicationNameForUserAgent

func (WKWebViewConfiguration) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (WKWebViewConfiguration) DefaultWebpagePreferences

func (w WKWebViewConfiguration) DefaultWebpagePreferences() IWKWebpagePreferences

The default preferences to use when loading and rendering content.

Discussion

Use this property to specify the JavaScript settings and content mode for new webpages. When the web view navigates to a new page, it passes the default preferences to its navigation delegate, which can modify the preferences or pass them as they are.

See: https://developer.apple.com/documentation/WebKit/WKWebViewConfiguration/defaultWebpagePreferences

func (WKWebViewConfiguration) EncodeWithCoder

func (w WKWebViewConfiguration) EncodeWithCoder(coder foundation.INSCoder)

func (WKWebViewConfiguration) Init

Init initializes the instance.

func (WKWebViewConfiguration) LimitsNavigationsToAppBoundDomains

func (w WKWebViewConfiguration) LimitsNavigationsToAppBoundDomains() bool

A Boolean value that indicates whether the web view limits navigation to pages within the app’s domain.

See: https://developer.apple.com/documentation/WebKit/WKWebViewConfiguration/limitsNavigationsToAppBoundDomains

func (WKWebViewConfiguration) MediaTypesRequiringUserActionForPlayback

func (w WKWebViewConfiguration) MediaTypesRequiringUserActionForPlayback() WKAudiovisualMediaTypes

The media types that require a user gesture to begin playing.

Discussion

Use WKAudiovisualMediaTypeNone to indicate that no user gestures are required to begin playing media.

See: https://developer.apple.com/documentation/WebKit/WKWebViewConfiguration/mediaTypesRequiringUserActionForPlayback

func (WKWebViewConfiguration) Preferences

func (w WKWebViewConfiguration) Preferences() IWKPreferences

The object that manages the preference-related settings for the web view.

Discussion

Use the preferences object in this property to customize the rendering, JavaScript, and other preferences related to your web view. You can also change the preferences by assigning a new WKPreferences object to this property.

See: https://developer.apple.com/documentation/WebKit/WKWebViewConfiguration/preferences

func (WKWebViewConfiguration) ProcessPool

func (w WKWebViewConfiguration) ProcessPool() IWKProcessPool

The object that coordinates the processes the web view uses to render its web content and execute scripts.

Discussion

When it initializes a web view, WebKit either creates a new web content process in the specified pool, or uses an existing process from that pool.

See: https://developer.apple.com/documentation/WebKit/WKWebViewConfiguration/processPool

func (WKWebViewConfiguration) SetAllowsAirPlayForMediaPlayback

func (w WKWebViewConfiguration) SetAllowsAirPlayForMediaPlayback(value bool)

func (WKWebViewConfiguration) SetAllowsInlinePredictions

func (w WKWebViewConfiguration) SetAllowsInlinePredictions(value bool)

func (WKWebViewConfiguration) SetApplicationNameForUserAgent

func (w WKWebViewConfiguration) SetApplicationNameForUserAgent(value string)

func (WKWebViewConfiguration) SetDefaultWebpagePreferences

func (w WKWebViewConfiguration) SetDefaultWebpagePreferences(value IWKWebpagePreferences)

func (WKWebViewConfiguration) SetLimitsNavigationsToAppBoundDomains

func (w WKWebViewConfiguration) SetLimitsNavigationsToAppBoundDomains(value bool)

func (WKWebViewConfiguration) SetMediaTypesRequiringUserActionForPlayback

func (w WKWebViewConfiguration) SetMediaTypesRequiringUserActionForPlayback(value WKAudiovisualMediaTypes)

func (WKWebViewConfiguration) SetPreferences

func (w WKWebViewConfiguration) SetPreferences(value IWKPreferences)

func (WKWebViewConfiguration) SetProcessPool

func (w WKWebViewConfiguration) SetProcessPool(value IWKProcessPool)

func (WKWebViewConfiguration) SetShowsSystemScreenTimeBlockingView

func (w WKWebViewConfiguration) SetShowsSystemScreenTimeBlockingView(value bool)

func (WKWebViewConfiguration) SetSupportsAdaptiveImageGlyph

func (w WKWebViewConfiguration) SetSupportsAdaptiveImageGlyph(value bool)

func (WKWebViewConfiguration) SetSuppressesIncrementalRendering

func (w WKWebViewConfiguration) SetSuppressesIncrementalRendering(value bool)

func (WKWebViewConfiguration) SetURLSchemeHandlerForURLScheme

func (w WKWebViewConfiguration) SetURLSchemeHandlerForURLScheme(urlSchemeHandler WKURLSchemeHandler, urlScheme string)

Registers an object to load resources associated with the specified URL scheme.

urlSchemeHandler: The object to handle the URL scheme. This object must adopt the WKURLSchemeHandler protocol.

urlScheme: The URL scheme to handle. Scheme names are case sensitive, must start with an ASCII letter, and may contain only ASCII letters, numbers, the “`+`” character, the “`-`” character, and the “`.`” character. This method raises an invalidArgumentException if the scheme name is an empty string or contains any other characters.

It is a programmer error to register a handler for a scheme WebKit already handles, such as `https`, and this method raises an invalidArgumentException if you try to do so. To determine whether WebKit handles a specific scheme, call the WKWebViewClass.HandlesURLScheme class method of WKWebView.

Discussion

Use this method to register any custom resource types that your web content uses. For example, you might register a custom URL scheme for resources that you provide programmatically from your app.

It is a programmer error to call this method more than once for the same scheme.

See: https://developer.apple.com/documentation/WebKit/WKWebViewConfiguration/setURLSchemeHandler(_:forURLScheme:)

func (WKWebViewConfiguration) SetUpgradeKnownHostsToHTTPS

func (w WKWebViewConfiguration) SetUpgradeKnownHostsToHTTPS(value bool)

func (WKWebViewConfiguration) SetUserContentController

func (w WKWebViewConfiguration) SetUserContentController(value IWKUserContentController)

func (WKWebViewConfiguration) SetUserInterfaceDirectionPolicy

func (w WKWebViewConfiguration) SetUserInterfaceDirectionPolicy(value WKUserInterfaceDirectionPolicy)

func (WKWebViewConfiguration) SetWebExtensionController

func (w WKWebViewConfiguration) SetWebExtensionController(value IWKWebExtensionController)

func (WKWebViewConfiguration) SetWebsiteDataStore

func (w WKWebViewConfiguration) SetWebsiteDataStore(value IWKWebsiteDataStore)

func (WKWebViewConfiguration) SetWritingToolsBehavior

func (w WKWebViewConfiguration) SetWritingToolsBehavior(value appkit.NSWritingToolsBehavior)

func (WKWebViewConfiguration) ShowsSystemScreenTimeBlockingView

func (w WKWebViewConfiguration) ShowsSystemScreenTimeBlockingView() bool

Discussion

A Boolean value indicating whether the System Screen Time blocking view should be shown.

The default value is YES.

See: https://developer.apple.com/documentation/WebKit/WKWebViewConfiguration/showsSystemScreenTimeBlockingView

func (WKWebViewConfiguration) SuppressesIncrementalRendering

func (w WKWebViewConfiguration) SuppressesIncrementalRendering() bool

A Boolean value that indicates whether the web view suppresses content rendering until the content is fully loaded into memory.

Discussion

The default value of this property is false.

See: https://developer.apple.com/documentation/WebKit/WKWebViewConfiguration/suppressesIncrementalRendering

func (WKWebViewConfiguration) UpgradeKnownHostsToHTTPS

func (w WKWebViewConfiguration) UpgradeKnownHostsToHTTPS() bool

A Boolean value that indicates whether the web view should automatically upgrade supported HTTP requests to HTTPS.

See: https://developer.apple.com/documentation/WebKit/WKWebViewConfiguration/upgradeKnownHostsToHTTPS

func (WKWebViewConfiguration) UrlSchemeHandlerForURLScheme

func (w WKWebViewConfiguration) UrlSchemeHandlerForURLScheme(urlScheme string) WKURLSchemeHandler

Returns the currently registered handler object for the specified URL scheme.

urlScheme: The scheme to look up. Scheme names are case sensitive, must start with an ASCII letter, and may contain only ASCII letters, numbers, the “`+`” character, the “`-`” character, and the “`.`” character. If this parameter contains an empty string or the scheme name includes invalid characters, this method returns `nil`.

Return Value

The handler object for the specified scheme, or `nil` if the scheme has no handler.

See: https://developer.apple.com/documentation/WebKit/WKWebViewConfiguration/urlSchemeHandler(forURLScheme:)

func (WKWebViewConfiguration) UserContentController

func (w WKWebViewConfiguration) UserContentController() IWKUserContentController

The object that coordinates interactions between your app’s native code and the webpage’s scripts and other content.

See: https://developer.apple.com/documentation/WebKit/WKWebViewConfiguration/userContentController

func (WKWebViewConfiguration) UserInterfaceDirectionPolicy

func (w WKWebViewConfiguration) UserInterfaceDirectionPolicy() WKUserInterfaceDirectionPolicy

The directionality of user interface elements.

Discussion

The default value is WKUserInterfaceDirectionPolicyContent. For other possible values, see WKUserInterfaceDirectionPolicy.

See: https://developer.apple.com/documentation/WebKit/WKWebViewConfiguration/userInterfaceDirectionPolicy

func (WKWebViewConfiguration) WebExtensionController

func (w WKWebViewConfiguration) WebExtensionController() IWKWebExtensionController

Discussion

The web extension controller to associate with the web view.

See: https://developer.apple.com/documentation/WebKit/WKWebViewConfiguration/webExtensionController

func (WKWebViewConfiguration) WebsiteDataStore

func (w WKWebViewConfiguration) WebsiteDataStore() IWKWebsiteDataStore

The object you use to get and set the site’s cookies and to track the cached data objects.

Discussion

If you don’t assign a value to this property, the configuration object uses the default data store object to store data persistently. To create a private web-browsing session, create a nonpersistent data store using the WKWebsiteDataStoreClass.NonPersistentDataStore method and assign it to this property. For more information, see WKWebsiteDataStore.

See: https://developer.apple.com/documentation/WebKit/WKWebViewConfiguration/websiteDataStore

type WKWebViewConfigurationClass

type WKWebViewConfigurationClass struct {
	// contains filtered or unexported fields
}

func GetWKWebViewConfigurationClass

func GetWKWebViewConfigurationClass() WKWebViewConfigurationClass

GetWKWebViewConfigurationClass returns the class object for WKWebViewConfiguration.

func (WKWebViewConfigurationClass) Alloc

Alloc allocates memory for a new instance of the class.

func (WKWebViewConfigurationClass) Class

Class returns the underlying Objective-C class pointer.

type WKWebViewDataType

type WKWebViewDataType uint

See: https://developer.apple.com/documentation/WebKit/WKWebViewDataType

const (
	WKWebViewDataTypeSessionStorage WKWebViewDataType = 1
)

func (WKWebViewDataType) String

func (e WKWebViewDataType) String() string

type WKWebpagePreferences

type WKWebpagePreferences struct {
	objectivec.Object
}

An object that specifies the behaviors to use when loading and rendering page content.

Overview

Create a WKWebpagePreferences object when you want to change the default rendering behavior of your web view. Typically, iOS devices render web content for a mobile experience, and Mac devices render content for a desktop experience.

Setting the JavaScript preferences

Setting the preferred content mode

Getting Lockdown Mode info

Instance Properties

See: https://developer.apple.com/documentation/WebKit/WKWebpagePreferences

func NewWKWebpagePreferences

func NewWKWebpagePreferences() WKWebpagePreferences

NewWKWebpagePreferences creates a new WKWebpagePreferences instance.

func NewWebpagePreferences deprecated

func NewWebpagePreferences() WKWebpagePreferences

Deprecated: Use NewWKWebpagePreferences instead.

func WKWebpagePreferencesFromID

func WKWebpagePreferencesFromID(id objc.ID) WKWebpagePreferences

WKWebpagePreferencesFromID constructs a WKWebpagePreferences from an objc.ID.

An object that specifies the behaviors to use when loading and rendering page content.

func (WKWebpagePreferences) AllowsContentJavaScript

func (w WKWebpagePreferences) AllowsContentJavaScript() bool

A Boolean value that indicates whether JavaScript from web content is allowed to run.

Discussion

The default value of this property is true. If you change the value to false, the web view doesn’t execute JavaScript code referenced by the web content. That includes JavaScript code found in inline “ elements, “ URLs, and all other referenced JavaScript content.

See: https://developer.apple.com/documentation/WebKit/WKWebpagePreferences/allowsContentJavaScript

func (WKWebpagePreferences) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (WKWebpagePreferences) Init

Init initializes the instance.

func (WKWebpagePreferences) IsLockdownModeEnabled added in v0.6.5

func (w WKWebpagePreferences) IsLockdownModeEnabled() bool

A Boolean value that indicates whether to use Lockdown Mode in the web view.

Discussion

By default, this reflects whether the user has enabled Lockdown Mode on the device. Update this preference to override the device setting when you implement a per-website or similar setting.

For more information about Lockdown Mode, see About Lockdown Mode.

See: https://developer.apple.com/documentation/WebKit/WKWebpagePreferences/isLockdownModeEnabled

func (WKWebpagePreferences) PreferredContentMode

func (w WKWebpagePreferences) PreferredContentMode() WKContentMode

The content mode for the web view to use when it loads and renders a webpage.

Discussion

The default value of this property is WKContentModeRecommended. The web view ignores this preference for subframe navigation.

See: https://developer.apple.com/documentation/WebKit/WKWebpagePreferences/preferredContentMode

func (WKWebpagePreferences) PreferredHTTPSNavigationPolicy

func (w WKWebpagePreferences) PreferredHTTPSNavigationPolicy() WKWebpagePreferencesUpgradeToHTTPSPolicy

Discussion

A WKWebpagePreferencesUpgradeToHTTPSPolicy indicating the desired mode used when performing a top-level navigation to a webpage.

The default value is WKWebpagePreferencesUpgradeToHTTPSPolicyKeepAsRequested. The stated preference is ignored on subframe navigation, and it may be ignored based on system configuration. The upgradeKnownHostsToHTTPS property on WKWebViewConfiguration supercedes this policy for known hosts.

See: https://developer.apple.com/documentation/WebKit/WKWebpagePreferences/preferredHTTPSNavigationPolicy

func (WKWebpagePreferences) SecurityRestrictionMode

func (w WKWebpagePreferences) SecurityRestrictionMode() WKSecurityRestrictionMode

Discussion

Security restriction mode for this navigation.

Security restriction modes provide different levels of security hardening for high-risk browsing contexts. WKSecurityRestrictionModeMaximizeCompatibility provides additional hardening while maintaining full web compatibility:

- JavaScript JIT compilation disabled (interpreter-only execution) - Increased Memory Tagging Extension (MTE) coverage across allocations in the WebContent process Setting a security restriction mode creates separate, isolated WebContent processes for the specified protection level. This preference only applies to main frame navigations and will be ignored for subframe navigations. When set for a main frame, all subframe content and opened windows inherit the same security restrictions. When the system has chosen WKSecurityRestrictionModeLockdown (e.g., in Lockdown Mode), attempts to set a less restrictive mode will fail silently. The default value is WKSecurityRestrictionModeNone.

See: https://developer.apple.com/documentation/WebKit/WKWebpagePreferences/securityRestrictionMode

func (WKWebpagePreferences) SecurityRestrictionModeChecked

func (w WKWebpagePreferences) SecurityRestrictionModeChecked() (WKSecurityRestrictionMode, error)

SecurityRestrictionModeChecked calls SecurityRestrictionMode if the receiver responds to the getter selector. It returns an error matching objc.ErrUnrecognizedSelector when unavailable.

func (WKWebpagePreferences) SetAllowsContentJavaScript

func (w WKWebpagePreferences) SetAllowsContentJavaScript(value bool)

func (WKWebpagePreferences) SetLockdownModeEnabled

func (w WKWebpagePreferences) SetLockdownModeEnabled(value bool)

func (WKWebpagePreferences) SetPreferredContentMode

func (w WKWebpagePreferences) SetPreferredContentMode(value WKContentMode)

func (WKWebpagePreferences) SetPreferredHTTPSNavigationPolicy

func (w WKWebpagePreferences) SetPreferredHTTPSNavigationPolicy(value WKWebpagePreferencesUpgradeToHTTPSPolicy)

func (WKWebpagePreferences) SetSecurityRestrictionMode

func (w WKWebpagePreferences) SetSecurityRestrictionMode(value WKSecurityRestrictionMode)

func (WKWebpagePreferences) SetSecurityRestrictionModeChecked

func (w WKWebpagePreferences) SetSecurityRestrictionModeChecked(value WKSecurityRestrictionMode) error

SetSecurityRestrictionModeChecked calls SetSecurityRestrictionMode if the receiver responds to the setter selector. It returns an error matching objc.ErrUnrecognizedSelector when unavailable.

type WKWebpagePreferencesClass

type WKWebpagePreferencesClass struct {
	// contains filtered or unexported fields
}

func GetWKWebpagePreferencesClass

func GetWKWebpagePreferencesClass() WKWebpagePreferencesClass

GetWKWebpagePreferencesClass returns the class object for WKWebpagePreferences.

func (WKWebpagePreferencesClass) Alloc

Alloc allocates memory for a new instance of the class.

func (WKWebpagePreferencesClass) Class

Class returns the underlying Objective-C class pointer.

type WKWebpagePreferencesUpgradeToHTTPSPolicy

type WKWebpagePreferencesUpgradeToHTTPSPolicy int

See: https://developer.apple.com/documentation/WebKit/WKWebpagePreferences/UpgradeToHTTPSPolicy

const (
	WKWebpagePreferencesUpgradeToHTTPSPolicyAutomaticFallbackToHTTP    WKWebpagePreferencesUpgradeToHTTPSPolicy = 1
	WKWebpagePreferencesUpgradeToHTTPSPolicyErrorOnFailure             WKWebpagePreferencesUpgradeToHTTPSPolicy = 3
	WKWebpagePreferencesUpgradeToHTTPSPolicyKeepAsRequested            WKWebpagePreferencesUpgradeToHTTPSPolicy = 0
	WKWebpagePreferencesUpgradeToHTTPSPolicyUserMediatedFallbackToHTTP WKWebpagePreferencesUpgradeToHTTPSPolicy = 2
)

func (WKWebpagePreferencesUpgradeToHTTPSPolicy) String

type WKWebsiteDataRecord

type WKWebsiteDataRecord struct {
	objectivec.Object
}

A record of the data that a particular website stores persistently.

Overview

Use WKWebsiteDataRecord objects to discover the types of information that a website stores. Records identify the data types a website stores, but don’t identify the actual data. You might use this information to help the user manage website data. For example, Safari provides a way for users to view and remove website data. The domain name of each record contains the website’s domain name and suffix.

You don’t create WKWebsiteDataRecord objects directly. WebKit creates these records and stores them in the web view’s data store. Use the WKWebsiteDataStore.FetchDataRecordsOfTypesCompletionHandler of that data store to retrieve the current record objects. You also use that object to remove unwanted records.

Getting the Record Information

Getting the Data Type

See: https://developer.apple.com/documentation/WebKit/WKWebsiteDataRecord

func NewWKWebsiteDataRecord

func NewWKWebsiteDataRecord() WKWebsiteDataRecord

NewWKWebsiteDataRecord creates a new WKWebsiteDataRecord instance.

func NewWebsiteDataRecord deprecated

func NewWebsiteDataRecord() WKWebsiteDataRecord

Deprecated: Use NewWKWebsiteDataRecord instead.

func WKWebsiteDataRecordFromID

func WKWebsiteDataRecordFromID(id objc.ID) WKWebsiteDataRecord

WKWebsiteDataRecordFromID constructs a WKWebsiteDataRecord from an objc.ID.

A record of the data that a particular website stores persistently.

func (WKWebsiteDataRecord) Autorelease

func (w WKWebsiteDataRecord) Autorelease() WKWebsiteDataRecord

Autorelease adds the receiver to the current autorelease pool.

func (WKWebsiteDataRecord) DataTypes

func (w WKWebsiteDataRecord) DataTypes() foundation.INSSet

The types of data associated with the record.

Discussion

Each record contains the set of types that the associated website stores. For a list of possible types, see Data Store Record Types.

See: https://developer.apple.com/documentation/WebKit/WKWebsiteDataRecord/dataTypes

func (WKWebsiteDataRecord) DisplayName

func (w WKWebsiteDataRecord) DisplayName() string

The display name for the data record.

Discussion

This property contains identifying information that you to display to users. Typically, the value is the website’s domain name and suffix taken from the host information in the resource’s security origin object. For more information, see WKSecurityOrigin.

See: https://developer.apple.com/documentation/WebKit/WKWebsiteDataRecord/displayName

func (WKWebsiteDataRecord) Init

Init initializes the instance.

type WKWebsiteDataRecordArrayHandler

type WKWebsiteDataRecordArrayHandler = func(*[]WKWebsiteDataRecord)

WKWebsiteDataRecordArrayHandler handles The completion handler block to execute asynchronously with the results.

Used by:

type WKWebsiteDataRecordClass

type WKWebsiteDataRecordClass struct {
	// contains filtered or unexported fields
}

func GetWKWebsiteDataRecordClass

func GetWKWebsiteDataRecordClass() WKWebsiteDataRecordClass

GetWKWebsiteDataRecordClass returns the class object for WKWebsiteDataRecord.

func (WKWebsiteDataRecordClass) Alloc

Alloc allocates memory for a new instance of the class.

func (WKWebsiteDataRecordClass) Class

func (wc WKWebsiteDataRecordClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type WKWebsiteDataStore

type WKWebsiteDataStore struct {
	objectivec.Object
}

An object that manages cookies, disk and memory caches, and other types of data for a web view.

Overview

Use a WKWebsiteDataStore object to configure and manage web site data. Specifically, use this object to:

- Manage cookies that your web site uses - Learn about the types of data that websites store - Remove unwanted web site data

Create a data store object and assign it to the WKWebViewConfiguration.WebsiteDataStore property of a WKWebViewConfiguration object before you create your web view.

By default, WKWebViewConfiguration uses the default data store returned by the WKWebsiteDataStoreClass.DefaultDataStore method, which saves website data persistently to disk.

To implement private browsing, create a nonpersistent data store using the WKWebsiteDataStoreClass.NonPersistentDataStore method instead.

To implement profile browsing, create a persistent data store using the [WKWebsiteDataStoreClass.DataStoreForIdentifier] method, passing an identifier that you use to identify the data store.

Inspecting data store properties

Retrieving specific types of data

Removing specific types of data

Instance Properties

Instance Methods

See: https://developer.apple.com/documentation/WebKit/WKWebsiteDataStore

func NewWKWebsiteDataStore

func NewWKWebsiteDataStore() WKWebsiteDataStore

NewWKWebsiteDataStore creates a new WKWebsiteDataStore instance.

func NewWKWebsiteDataStoreForIdentifier

func NewWKWebsiteDataStoreForIdentifier(identifier foundation.NSUUID) WKWebsiteDataStore

Returns the persistent data store with the unique identifier you provide.

identifier: An identifier that uniquely identifies a data store.

Discussion

If the data store for the unique identifier you provide does not exist, the system creates and returns it. Use this method to get a data store for a profile.

This method throws an exception if the identifier is not valid.

See: https://developer.apple.com/documentation/WebKit/WKWebsiteDataStore/init(forIdentifier:)

func NewWebsiteDataStore deprecated

func NewWebsiteDataStore() WKWebsiteDataStore

Deprecated: Use NewWKWebsiteDataStore instead.

func NewWebsiteDataStoreForIdentifier deprecated

func NewWebsiteDataStoreForIdentifier(identifier foundation.NSUUID) WKWebsiteDataStore

Deprecated: Use NewWKWebsiteDataStoreForIdentifier instead.

func NewWebsiteDataStoreWithCoder deprecated added in v0.6.10

func NewWebsiteDataStoreWithCoder(coder foundation.INSCoder) WKWebsiteDataStore

Deprecated: Use NewWKWebsiteDataStoreWithCoder instead.

func WKWebsiteDataStoreFromID

func WKWebsiteDataStoreFromID(id objc.ID) WKWebsiteDataStore

WKWebsiteDataStoreFromID constructs a WKWebsiteDataStore from an objc.ID.

An object that manages cookies, disk and memory caches, and other types of data for a web view.

func (WKWebsiteDataStore) Autorelease

func (w WKWebsiteDataStore) Autorelease() WKWebsiteDataStore

Autorelease adds the receiver to the current autorelease pool.

func (WKWebsiteDataStore) EncodeWithCoder

func (w WKWebsiteDataStore) EncodeWithCoder(coder foundation.INSCoder)

func (WKWebsiteDataStore) FetchDataOfTypes

func (w WKWebsiteDataStore) FetchDataOfTypes(ctx context.Context, dataTypes foundation.INSSet) (*foundation.NSData, error)

FetchDataOfTypes is a synchronous wrapper around WKWebsiteDataStore.FetchDataOfTypesCompletionHandler. It blocks until the completion handler fires or the context is cancelled.

func (WKWebsiteDataStore) FetchDataRecordsOfTypes added in v0.6.10

func (w WKWebsiteDataStore) FetchDataRecordsOfTypes(ctx context.Context, dataTypes foundation.INSSet) ([]WKWebsiteDataRecord, error)

FetchDataRecordsOfTypes is a synchronous wrapper around WKWebsiteDataStore.FetchDataRecordsOfTypesCompletionHandler. It blocks until the completion handler fires or the context is cancelled.

func (WKWebsiteDataStore) FetchDataRecordsOfTypesCompletionHandler added in v0.6.10

func (w WKWebsiteDataStore) FetchDataRecordsOfTypesCompletionHandler(dataTypes foundation.INSSet, completionHandler WKWebsiteDataRecordArrayHandler)

Fetches the specified types of records from the data store.

dataTypes: The types of records to fetch. For a list of all possible types, see Data Store Record Types. To specify all types, specify the set returned by the WKWebsiteDataStoreClass.AllWebsiteDataTypes method.

completionHandler: The completion handler block to execute asynchronously with the results. This block has no return value and takes the following parameter:

dataRecordArray: An array of WKWebsiteDataRecord objects. Each object in this array corresponds to data for one of the requested types. If no records of the requested types exist, this array is empty.

Discussion

Call this method to retrieve information about the types of data that the website saves. The returned records don’t include the data itself, but contain information that you can convey to the user. For example, you might use the returned data records to display the cookies a website uses, or to show which websites cache data.

See: https://developer.apple.com/documentation/WebKit/WKWebsiteDataStore/fetchDataRecords(ofTypes:completionHandler:)

func (WKWebsiteDataStore) HttpCookieStore

func (w WKWebsiteDataStore) HttpCookieStore() IWKHTTPCookieStore

The object that manages the HTTP cookies for your website.

Discussion

Use the WKHTTPCookieStore object in this property to manage your website’s cookies. A cookie store object contains methods to add new cookies, and to remove cookies that don’t apply to your content. For example, you might initially use this object to add a cookie for the user’s login credentials and then delete that cookie when the user logs out.

See: https://developer.apple.com/documentation/WebKit/WKWebsiteDataStore/httpCookieStore

func (WKWebsiteDataStore) Identifier

func (w WKWebsiteDataStore) Identifier() foundation.NSUUID

An identifier that uniquely identifies a data store.

See: https://developer.apple.com/documentation/WebKit/WKWebsiteDataStore/identifier

func (WKWebsiteDataStore) Init

Init initializes the instance.

func (WKWebsiteDataStore) IsPersistent added in v0.6.5

func (w WKWebsiteDataStore) IsPersistent() bool

A Boolean value that indicates whether this object stores data to disk.

Discussion

The value of this property is true if the data store writes data to disk, or false if it doesn’t.

See: https://developer.apple.com/documentation/WebKit/WKWebsiteDataStore/isPersistent

func (WKWebsiteDataStore) RemoveDataOfTypesForDataRecordsCompletionHandler

func (w WKWebsiteDataStore) RemoveDataOfTypesForDataRecordsCompletionHandler(dataTypes foundation.INSSet, dataRecords []WKWebsiteDataRecord, completionHandler VoidHandler)

Removes the specified types of website data from one or more data records.

dataTypes: The website data types to remove from the records.

dataRecords: The records that contain the data.

completionHandler: The completion handler block to execute asynchronously after the web view removes the specified data. This block has no return value and takes no parameters.

See: https://developer.apple.com/documentation/WebKit/WKWebsiteDataStore/removeData(ofTypes:for:completionHandler:)

func (WKWebsiteDataStore) RemoveDataOfTypesModifiedSince

func (w WKWebsiteDataStore) RemoveDataOfTypesModifiedSince(ctx context.Context, dataTypes foundation.INSSet, date foundation.NSDate) error

RemoveDataOfTypesModifiedSince is a synchronous wrapper around WKWebsiteDataStore.RemoveDataOfTypesModifiedSinceCompletionHandler. It blocks until the completion handler fires or the context is cancelled.

func (WKWebsiteDataStore) RemoveDataOfTypesModifiedSinceCompletionHandler

func (w WKWebsiteDataStore) RemoveDataOfTypesModifiedSinceCompletionHandler(dataTypes foundation.INSSet, date foundation.NSDate, completionHandler VoidHandler)

Removes website data that changed after the specified date.

dataTypes: The website data types to remove.

date: The target date for the data removal. The data store removes data that a website changed after this date.

completionHandler: The completion handler block to execute asynchronously after the web view removes the specified data. This block has no return value and takes no parameters.

Discussion

This method removes the specified data type from all records, but only if a website modified the record’s data after the specified `date`.

See: https://developer.apple.com/documentation/WebKit/WKWebsiteDataStore/removeData(ofTypes:modifiedSince:completionHandler:)

func (WKWebsiteDataStore) RestoreData

func (w WKWebsiteDataStore) RestoreData(ctx context.Context, data foundation.NSData) error

RestoreData is a synchronous wrapper around WKWebsiteDataStore.RestoreDataCompletionHandler. It blocks until the completion handler fires or the context is cancelled.

func (WKWebsiteDataStore) SetProxyConfigurations

func (w WKWebsiteDataStore) SetProxyConfigurations(value []objectivec.Object)

type WKWebsiteDataStoreClass

type WKWebsiteDataStoreClass struct {
	// contains filtered or unexported fields
}

func GetWKWebsiteDataStoreClass

func GetWKWebsiteDataStoreClass() WKWebsiteDataStoreClass

GetWKWebsiteDataStoreClass returns the class object for WKWebsiteDataStore.

func (WKWebsiteDataStoreClass) AllWebsiteDataTypes

func (_WKWebsiteDataStoreClass WKWebsiteDataStoreClass) AllWebsiteDataTypes() foundation.INSSet

Returns the set of all the available data types.

Discussion

Potential values in the set are WKWebsiteDataRecord constants.

See: https://developer.apple.com/documentation/WebKit/WKWebsiteDataStore/allWebsiteDataTypes()

func (WKWebsiteDataStoreClass) Alloc

Alloc allocates memory for a new instance of the class.

func (WKWebsiteDataStoreClass) Class

func (wc WKWebsiteDataStoreClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

func (WKWebsiteDataStoreClass) DefaultDataStore

func (_WKWebsiteDataStoreClass WKWebsiteDataStoreClass) DefaultDataStore() WKWebsiteDataStore

Returns the default data store, which stores data persistently to disk.

Return Value

The default data store for websites.

Discussion

A web view configured with the default data store saves website data persistenly to disk. Use this data store to retain the state of web content between browsing sessions.

See: https://developer.apple.com/documentation/WebKit/WKWebsiteDataStore/default()

func (WKWebsiteDataStoreClass) FetchAllDataStoreIdentifiers added in v0.6.10

func (_WKWebsiteDataStoreClass WKWebsiteDataStoreClass) FetchAllDataStoreIdentifiers(completionHandler NSUUIDArrayHandler)

Fetches an array of identifiers from existing data stores that have identifiers.

completionHandler: A block to invoke with the fetched list of unique identifiers.

See: https://developer.apple.com/documentation/WebKit/WKWebsiteDataStore/fetchAllDataStoreIdentifiers(_:)

func (WKWebsiteDataStoreClass) FetchAllDataStoreIdentifiersSync added in v0.6.10

func (wc WKWebsiteDataStoreClass) FetchAllDataStoreIdentifiersSync(ctx context.Context) ([]foundation.NSUUID, error)

FetchAllDataStoreIdentifiersSync is a synchronous wrapper around [WKWebsiteDataStore.FetchAllDataStoreIdentifiers]. It blocks until the completion handler fires or the context is cancelled.

func (WKWebsiteDataStoreClass) NonPersistentDataStore

func (_WKWebsiteDataStoreClass WKWebsiteDataStoreClass) NonPersistentDataStore() WKWebsiteDataStore

Creates a new data store object that stores website data in memory, and doesn’t write that data to disk.

Return Value

A new data store object that doesn’t save data to disk.

Discussion

Use a nonpersistent data store to implement private browsing in your web view. This method creates a new data store that stores data only in memory, and doesn’t write that data to disk.

See: https://developer.apple.com/documentation/WebKit/WKWebsiteDataStore/nonPersistent()

func (WKWebsiteDataStoreClass) RemoveDataStoreForIdentifier

func (wc WKWebsiteDataStoreClass) RemoveDataStoreForIdentifier(ctx context.Context, identifier foundation.NSUUID) error

RemoveDataStoreForIdentifier is a synchronous wrapper around [WKWebsiteDataStore.RemoveDataStoreForIdentifierCompletionHandler]. It blocks until the completion handler fires or the context is cancelled.

func (WKWebsiteDataStoreClass) RemoveDataStoreForIdentifierCompletionHandler

func (_WKWebsiteDataStoreClass WKWebsiteDataStoreClass) RemoveDataStoreForIdentifierCompletionHandler(identifier foundation.NSUUID, completionHandler ErrorHandler)

Removes the data store that matches the identifier you provide.

identifier: An identifier that uniquely identifies a data store.

completionHandler: A block the system invokes after it removes the data store. This block has no return value, and takes the following parameter:

error: An error, if the system could not remove the data store.

Discussion

Call this method to remove the data store for the unique identifier. Release any WKWebView instances using the data store before you call this method. If the system cannot complete removal of the data store, this throws an error.

See: https://developer.apple.com/documentation/WebKit/WKWebsiteDataStore/remove(forIdentifier:completionHandler:)

type WKWindowFeatures

type WKWindowFeatures struct {
	objectivec.Object
}

Display-related attributes that a webpage requests for its window.

Overview

A WKWindowFeatures object contains the attributes that a webpage requests from its containing web view. You don’t create a WKWindowFeatures object directly. When a navigation action results in the display of a new web view, WKWebView creates this object and passes it to the [WebViewCreateWebViewWithConfigurationForNavigationActionWindowFeatures] method of its UI delegate object. The delegate uses the information in this object to configure and return the new web view.

Inspecting Window Position and Dimensions

Inspecting Visibility Properties

See: https://developer.apple.com/documentation/WebKit/WKWindowFeatures

func NewWKWindowFeatures

func NewWKWindowFeatures() WKWindowFeatures

NewWKWindowFeatures creates a new WKWindowFeatures instance.

func NewWindowFeatures deprecated

func NewWindowFeatures() WKWindowFeatures

Deprecated: Use NewWKWindowFeatures instead.

func WKWindowFeaturesFromID

func WKWindowFeaturesFromID(id objc.ID) WKWindowFeatures

WKWindowFeaturesFromID constructs a WKWindowFeatures from an objc.ID.

Display-related attributes that a webpage requests for its window.

func (WKWindowFeatures) AllowsResizing

func (w WKWindowFeatures) AllowsResizing() foundation.NSNumber

A Boolean value that indicates whether to make the containing window window resizable.

Discussion

If the webpage didn’t request a resizable window, this property is `nil`.

See: https://developer.apple.com/documentation/WebKit/WKWindowFeatures/allowsResizing

func (WKWindowFeatures) Autorelease

func (w WKWindowFeatures) Autorelease() WKWindowFeatures

Autorelease adds the receiver to the current autorelease pool.

func (WKWindowFeatures) Height

The requested height of the containing window.

Discussion

The object in this property contains a CGFloat value. If the webpage didn’t request a specific window height, this property is `nil`.

See: https://developer.apple.com/documentation/WebKit/WKWindowFeatures/height

func (WKWindowFeatures) Init

Init initializes the instance.

func (WKWindowFeatures) MenuBarVisibility

func (w WKWindowFeatures) MenuBarVisibility() foundation.NSNumber

A Boolean value that indicates whether the webpage requests a visible menu bar.

Discussion

If the webpage didn’t request a visible menu bar, this property is `nil`.

See: https://developer.apple.com/documentation/WebKit/WKWindowFeatures/menuBarVisibility

func (WKWindowFeatures) StatusBarVisibility

func (w WKWindowFeatures) StatusBarVisibility() foundation.NSNumber

A Boolean value that indicates whether the webpage requested a visible status bar.

Discussion

If the webpage didn’t request a visible status bar, this property is `nil`.

See: https://developer.apple.com/documentation/WebKit/WKWindowFeatures/statusBarVisibility

func (WKWindowFeatures) ToolbarsVisibility

func (w WKWindowFeatures) ToolbarsVisibility() foundation.NSNumber

A Boolean value that indicates whether the webpage requested a visible toolbar.

Discussion

If the webpage didn’t request a visible toolbar, this property is `nil`.

See: https://developer.apple.com/documentation/WebKit/WKWindowFeatures/toolbarsVisibility

func (WKWindowFeatures) Width

The requested width of the containing window.

Discussion

The object in this property contains a CGFloat value. If the webpage didn’t request a specific window width, this property is `nil`.

See: https://developer.apple.com/documentation/WebKit/WKWindowFeatures/width

func (WKWindowFeatures) X

The requested x-coordinate of the containing window.

Discussion

The object in this property contains a CGFloat value. If the webpage didn’t request a specific window position, this property is `nil`.

See: https://developer.apple.com/documentation/WebKit/WKWindowFeatures/x

func (WKWindowFeatures) Y

The requested y-coordinate of the containing window.

Discussion

The object in this property contains a CGFloat value. If the webpage didn’t request a specific window position, this property is `nil`.

See: https://developer.apple.com/documentation/WebKit/WKWindowFeatures/y

type WKWindowFeaturesClass

type WKWindowFeaturesClass struct {
	// contains filtered or unexported fields
}

func GetWKWindowFeaturesClass

func GetWKWindowFeaturesClass() WKWindowFeaturesClass

GetWKWindowFeaturesClass returns the class object for WKWindowFeatures.

func (WKWindowFeaturesClass) Alloc

Alloc allocates memory for a new instance of the class.

func (WKWindowFeaturesClass) Class

func (wc WKWindowFeaturesClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type WebArchive

type WebArchive struct {
	objectivec.Object
}

A WebArchive object represents a webpage that can be archived—for example, archived on disk or on the pasteboard. A WebArchive object contains the main resource, as well as the subresources and subframes of the main resource. The main resource can be an entire webpage, a portion of a webpage, or some other kind of data such as an image. Use this class to archive webpages, or place a portion of a webpage on the pasteboard, or to represent rich web content in any application.

Getting attributes

See: https://developer.apple.com/documentation/WebKit/WebArchive

func NewWebArchive

func NewWebArchive() WebArchive

NewWebArchive creates a new WebArchive instance.

func NewWebArchiveWithData

func NewWebArchiveWithData(data foundation.NSData) WebArchive

Initializes and returns the receiver, specifying the initial content data.

Discussion

Use the WebArchive.Data method to get the receiver’s data.

See: https://developer.apple.com/documentation/WebKit/WebArchive/init(data:)

func NewWebArchiveWithMainResourceSubresourcesSubframeArchives

func NewWebArchiveWithMainResourceSubresourcesSubframeArchives(mainResource IWebResource, subresources foundation.INSArray, subframeArchives foundation.INSArray) WebArchive

Initializes the receiver with a resource and optional subresources and subframe archives..

Discussion

This method initializes and returns the receiver by setting the main resource to `mainResource`, and setting the subresources and subframe archives if supplied. The `subresources` argument should be an array of WebResource objects or `nil` if none are specified. The `subframeArchives` should be and array of WebArchive objects used by the subframes or `nil` if none are specified.

See: https://developer.apple.com/documentation/WebKit/WebArchive/init(mainResource:subresources:subframeArchives:)

func WebArchiveFromID

func WebArchiveFromID(id objc.ID) WebArchive

WebArchiveFromID constructs a WebArchive from an objc.ID.

A WebArchive object represents a webpage that can be archived—for example, archived on disk or on the pasteboard. A WebArchive object contains the main resource, as well as the subresources and subframes of the main resource. The main resource can be an entire webpage, a portion of a webpage, or some other kind of data such as an image. Use this class to archive webpages, or place a portion of a webpage on the pasteboard, or to represent rich web content in any application.

func (WebArchive) Autorelease

func (w WebArchive) Autorelease() WebArchive

Autorelease adds the receiver to the current autorelease pool.

func (WebArchive) Data

func (w WebArchive) Data() foundation.NSData

The data representation of the receiver.

Discussion

Can be used to save the web archive to a file, to put it on the pasteboard using the WebArchivePboardType type, or used to initialize another web archive using the [WebArchive.InitWithData] method.

See: https://developer.apple.com/documentation/WebKit/WebArchive/data

func (WebArchive) EncodeWithCoder

func (w WebArchive) EncodeWithCoder(coder foundation.INSCoder)

func (WebArchive) Init

func (w WebArchive) Init() WebArchive

Init initializes the instance.

func (WebArchive) MainResource

func (w WebArchive) MainResource() IWebResource

The receiver’s main resource.

See: https://developer.apple.com/documentation/WebKit/WebArchive/mainResource

func (WebArchive) SubframeArchives

func (w WebArchive) SubframeArchives() foundation.INSArray

Archives representing the receiver’s subresources or `nil` if there are none.

See: https://developer.apple.com/documentation/WebKit/WebArchive/subframeArchives

func (WebArchive) Subresources

func (w WebArchive) Subresources() foundation.INSArray

The receiver’s subresources, or `nil` if there are none.

See: https://developer.apple.com/documentation/WebKit/WebArchive/subresources

type WebArchiveClass

type WebArchiveClass struct {
	// contains filtered or unexported fields
}

func GetWebArchiveClass

func GetWebArchiveClass() WebArchiveClass

GetWebArchiveClass returns the class object for WebArchive.

func (WebArchiveClass) Alloc

func (wc WebArchiveClass) Alloc() WebArchive

Alloc allocates memory for a new instance of the class.

func (WebArchiveClass) Class

func (wc WebArchiveClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type WebBackForwardList

type WebBackForwardList struct {
	objectivec.Object
}

A WebBackForwardList object maintains a list of visited pages used to go back and forward to the most recent page. A WebBackForwardList object maintains only the list data—it does not perform actual page loads (in other words, it does not make any client requests). If you need to perform a page load, see the load(_:) method in WebFrame to find out how to do this.

Overview

Items are typically inserted in a back-forward list in the order they are visited. A WebBackForwardList object also maintains the notion of the current item (which is always at index `0`), the preceding item (which is at index `-1`), and the following item (which is at index `1`). The goBack() and goForward() methods move the current item backward or forward by one. The go(to:) method sets the current item to the specified item. All other methods that return WebHistoryItem objects do not change the value of the current item, they just return the requested item or items. You can also limit the number of history items stored in the back-forward list using WebBackForwardList.Capacity.

WebBackForwardList objects also control the number of pages cached. You can turn page caching off by setting the page cache size to `0` using the WebBackForwardList.PageCacheSize method, or limit the number of pages cached by passing a value greater than 0.

Querying the Back-Forward List

Page Caching

Setting Attributes

See: https://developer.apple.com/documentation/WebKit/WebBackForwardList

func NewWebBackForwardList

func NewWebBackForwardList() WebBackForwardList

NewWebBackForwardList creates a new WebBackForwardList instance.

func WebBackForwardListFromID

func WebBackForwardListFromID(id objc.ID) WebBackForwardList

WebBackForwardListFromID constructs a WebBackForwardList from an objc.ID.

A WebBackForwardList object maintains a list of visited pages used to go back and forward to the most recent page. A WebBackForwardList object maintains only the list data—it does not perform actual page loads (in other words, it does not make any client requests). If you need to perform a page load, see the load(_:) method in WebFrame to find out how to do this.

func (WebBackForwardList) Autorelease

func (w WebBackForwardList) Autorelease() WebBackForwardList

Autorelease adds the receiver to the current autorelease pool.

func (WebBackForwardList) BackItem

func (w WebBackForwardList) BackItem() IWebHistoryItem

The item that precedes the current item in the back-forward list.

Discussion

`nil` if none precedes it.

See: https://developer.apple.com/documentation/WebKit/WebBackForwardList/backItem

func (WebBackForwardList) BackListCount

func (w WebBackForwardList) BackListCount() int32

The number of items that precede the current item in the back-forward list.

See: https://developer.apple.com/documentation/WebKit/WebBackForwardList/backListCount

func (WebBackForwardList) Capacity

func (w WebBackForwardList) Capacity() int32

The maximum number of items that the back-forward list can contain.

See: https://developer.apple.com/documentation/WebKit/WebBackForwardList/capacity

func (WebBackForwardList) CurrentItem

func (w WebBackForwardList) CurrentItem() IWebHistoryItem

The current item in the back-forward list.

See: https://developer.apple.com/documentation/WebKit/WebBackForwardList/currentItem

func (WebBackForwardList) ForwardItem

func (w WebBackForwardList) ForwardItem() IWebHistoryItem

The item that follows the current item in the back-forward list.

See: https://developer.apple.com/documentation/WebKit/WebBackForwardList/forwardItem

func (WebBackForwardList) ForwardListCount

func (w WebBackForwardList) ForwardListCount() int32

The number of items that follow the current item in the back-forward list.

See: https://developer.apple.com/documentation/WebKit/WebBackForwardList/forwardListCount

func (WebBackForwardList) Init

Init initializes the instance.

func (WebBackForwardList) PageCacheSize

func (w WebBackForwardList) PageCacheSize() uint

Returns the maximum number of pages that the receiver can cache.

Return Value

The maximum number of pages that can be cached.

See: https://developer.apple.com/documentation/WebKit/WebBackForwardList/pageCacheSize()

func (WebBackForwardList) SetCapacity

func (w WebBackForwardList) SetCapacity(value int32)

func (WebBackForwardList) SetPageCacheSize

func (w WebBackForwardList) SetPageCacheSize(size uint)

Sets the maximum number of pages the receiver can cache.

size: The maximum number of pages that can be cached.

Discussion

The default page cache size can vary depending on the computer’s configuration. Use WebBackForwardList.PageCacheSize to get the current setting.

See: https://developer.apple.com/documentation/WebKit/WebBackForwardList/setPageCacheSize(_:)

type WebBackForwardListClass

type WebBackForwardListClass struct {
	// contains filtered or unexported fields
}

func GetWebBackForwardListClass

func GetWebBackForwardListClass() WebBackForwardListClass

GetWebBackForwardListClass returns the class object for WebBackForwardList.

func (WebBackForwardListClass) Alloc

Alloc allocates memory for a new instance of the class.

func (WebBackForwardListClass) Class

func (wc WebBackForwardListClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type WebCacheModel deprecated

type WebCacheModel uint

Deprecated: Deprecated since macOS 10.14. See: https://developer.apple.com/documentation/WebKit/WebCacheModel

const (
	// Deprecated.
	WebCacheModelDocumentBrowser WebCacheModel = 1
	// Deprecated.
	WebCacheModelDocumentViewer WebCacheModel = 0
	// Deprecated.
	WebCacheModelPrimaryWebBrowser WebCacheModel = 2
)

func (WebCacheModel) String

func (e WebCacheModel) String() string

type WebDataSource

type WebDataSource struct {
	objectivec.Object
}

WebDataSource encapsulates the web content to be displayed in a web frame view. A WebDataSource object has a representation object, conforming to the WebDocumentRepresentation protocol, that holds the data in an appropriate format depending on the MIME type. You can extend WebKit to support new MIME types by implementing your own view and representation classes, and specifying the mapping between them using the registerClass(_:representationClass:forMIMEType:) WebView class method.

Overview

WebDataSource objects have an associated initial request, possibly a modified request, and a response object. Since the data source may be in the process of being loaded, you should check the state of a data source using [WebDataSource.Loading] before accessing its data. Use WebDataSource.Data to get the raw data. Use the WebDataSource.Representation method to get the actual representation object and query it for more details.

Querying page data and state

Getting the request and response

Getting the web frame

Getting an unreachable URL

Getting a web archive

Accessing subresources

See: https://developer.apple.com/documentation/WebKit/WebDataSource

func NewWebDataSource

func NewWebDataSource() WebDataSource

NewWebDataSource creates a new WebDataSource instance.

func NewWebDataSourceWithRequest

func NewWebDataSourceWithRequest(request foundation.NSURLRequest) WebDataSource

initializes a data source with a URL request.

request: The URL request used to load the web content.

Return Value

The initialized web data source.

Discussion

This method is the designated initializer for WebDataSource objects. Normally, WebFrame objects create their data sources, so you should not invoke this method directly.

See: https://developer.apple.com/documentation/WebKit/WebDataSource/init(request:)

func WebDataSourceFromID

func WebDataSourceFromID(id objc.ID) WebDataSource

WebDataSourceFromID constructs a WebDataSource from an objc.ID.

WebDataSource encapsulates the web content to be displayed in a web frame view. A WebDataSource object has a representation object, conforming to the WebDocumentRepresentation protocol, that holds the data in an appropriate format depending on the MIME type. You can extend WebKit to support new MIME types by implementing your own view and representation classes, and specifying the mapping between them using the registerClass(_:representationClass:forMIMEType:) WebView class method.

func (WebDataSource) Autorelease

func (w WebDataSource) Autorelease() WebDataSource

Autorelease adds the receiver to the current autorelease pool.

func (WebDataSource) Data

func (w WebDataSource) Data() foundation.NSData

The raw data that represents the data source’s content.

Discussion

The format of the data is dependent on the data source’s MIME type (obtained from the response).

See: https://developer.apple.com/documentation/WebKit/WebDataSource/data

func (WebDataSource) Init

func (w WebDataSource) Init() WebDataSource

Init initializes the instance.

func (WebDataSource) InitialRequest

func (w WebDataSource) InitialRequest() foundation.NSURLRequest

A reference to the original request that was used to load the web content.

See: https://developer.apple.com/documentation/WebKit/WebDataSource/initialRequest

func (WebDataSource) IsLoading

func (w WebDataSource) IsLoading() bool

A Boolean that indicates whether the data source is loading its content.

Discussion

true if the data source is in the process of loading its content; otherwise, false.

See: https://developer.apple.com/documentation/WebKit/WebDataSource/isLoading

func (WebDataSource) MainResource

func (w WebDataSource) MainResource() IWebResource

A[WebResource] object representing the data source.

See: https://developer.apple.com/documentation/WebKit/WebDataSource/mainResource

func (WebDataSource) PageTitle

func (w WebDataSource) PageTitle() string

The title of the data source’s page.

Discussion

The associated web view notifies its frame load delegate when the page title is loaded by invoking the “ delegate method.

`nil` if the page has no title or the page title hasn’t been loaded yet.

See: https://developer.apple.com/documentation/WebKit/WebDataSource/pageTitle

func (WebDataSource) Representation

func (w WebDataSource) Representation() WebDocumentRepresentation

The data source’s representation depending on its MIME type.

Discussion

`nil` if the data source is in the process of being loaded and this method is invoked before loading is complete.

You can specify the mapping between a representation and MIME type using the “WebView/registerClass(_:representationClass:forMIMEType:)```WebView` class method.

See: https://developer.apple.com/documentation/WebKit/WebDataSource/representation

func (WebDataSource) Request

The request that was used to create the data source.

Discussion

This URL may be different from the original request from WebDataSource.InitialRequest.

A web view’s resource load delegate may modify requests by implementing the webView:resource:willSendRequest:redirectResponse:fromDataSource: method.

See: https://developer.apple.com/documentation/WebKit/WebDataSource/request

func (WebDataSource) Response

func (w WebDataSource) Response() foundation.URLResponse

The response for this data source.

See: https://developer.apple.com/documentation/WebKit/WebDataSource/response

func (WebDataSource) Subresources

func (w WebDataSource) Subresources() foundation.INSArray

The data source’s subresources that have finished downloading.

See: https://developer.apple.com/documentation/WebKit/WebDataSource/subresources

func (WebDataSource) TextEncodingName

func (w WebDataSource) TextEncodingName() string

The text encoding for the data source’s web view, if set, or the text encoding of the response.

See: https://developer.apple.com/documentation/WebKit/WebDataSource/textEncodingName

func (WebDataSource) UnreachableURL

func (w WebDataSource) UnreachableURL() foundation.NSURL

The data source’s unreachable URL.

Discussion

The data source has an unreachable URL if it was created using the “WebFrame/loadAlternateHTMLString(_:baseURL:forUnreachableURL:)```WebFrame` method.

See: https://developer.apple.com/documentation/WebKit/WebDataSource/unreachableURL

func (WebDataSource) WebArchive

func (w WebDataSource) WebArchive() IWebArchive

A web archive representing the data source, its subresources, and subframes.

Discussion

In the case of HTML, if the current content is preferred, then send WebDataSource.WebArchive to the appropriate DOM object.

See: https://developer.apple.com/documentation/WebKit/WebDataSource/webArchive

func (WebDataSource) WebFrame

func (w WebDataSource) WebFrame() IWebFrame

The web frame that represents this data source.

See: https://developer.apple.com/documentation/WebKit/WebDataSource/webFrame

type WebDataSourceClass

type WebDataSourceClass struct {
	// contains filtered or unexported fields
}

func GetWebDataSourceClass

func GetWebDataSourceClass() WebDataSourceClass

GetWebDataSourceClass returns the class object for WebDataSource.

func (WebDataSourceClass) Alloc

func (wc WebDataSourceClass) Alloc() WebDataSource

Alloc allocates memory for a new instance of the class.

func (WebDataSourceClass) Class

func (wc WebDataSourceClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type WebDocumentRepresentation

type WebDocumentRepresentation interface {
	objectivec.IObject

	// Sets the receiver’s data source.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebDocumentRepresentation/setDataSource(_:)
	SetDataSource(dataSource IWebDataSource)

	// Invoked when a data source has received some data.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebDocumentRepresentation/receivedData(_:with:)
	ReceivedDataWithDataSource(data foundation.NSData, dataSource IWebDataSource)

	// Invoked when a data source receives an error loading its content.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebDocumentRepresentation/receivedError(_:with:)
	ReceivedErrorWithDataSource(error_ foundation.NSError, dataSource IWebDataSource)

	// Invoked when a data source finishes loading its content.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebDocumentRepresentation/finishedLoading(with:)
	FinishedLoadingWithDataSource(dataSource IWebDataSource)

	// Returns whether the receiver can provide content source.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebDocumentRepresentation/canProvideDocumentSource()
	CanProvideDocumentSource() bool

	// Returns the receiver’s source as text.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebDocumentRepresentation/documentSource()
	DocumentSource() string

	// Returns the receiver’s document title.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebDocumentRepresentation/title()
	Title() string
}

This protocol is adopted by document representation classes that handle specific MIME types. You can implement your own document view classes and document representation classes to render data for specific MIME types, and register those classes using the WebFrame [registerClass(_:representationClass:forMIMEType:)](<https://developer.apple.com/documentation/WebKit/WebView-swift.class/registerClass(_:representationClass:forMIMEType:)>) method.

See: https://developer.apple.com/documentation/WebKit/WebDocumentRepresentation

type WebDocumentRepresentationObject

type WebDocumentRepresentationObject struct {
	objectivec.Object
}

WebDocumentRepresentationObject wraps an existing Objective-C object that conforms to the WebDocumentRepresentation protocol.

func WebDocumentRepresentationObjectFromID

func WebDocumentRepresentationObjectFromID(id objc.ID) WebDocumentRepresentationObject

WebDocumentRepresentationObjectFromID constructs a WebDocumentRepresentationObject from an objc.ID. The object is determined to conform to the protocol at runtime.

func (WebDocumentRepresentationObject) BaseObject

func (WebDocumentRepresentationObject) CanProvideDocumentSource

func (o WebDocumentRepresentationObject) CanProvideDocumentSource() bool

Returns whether the receiver can provide content source.

Return Value

true if the receiver can provide source for the document content (for example, HTML source), false otherwise.

Discussion

The receiver should return true only if it makes sense for someone to view the source of the document in question. For example, a web view returns false if the content is an image, was produced by a plug-in, or contains text content already.

See: https://developer.apple.com/documentation/WebKit/WebDocumentRepresentation/canProvideDocumentSource()

func (WebDocumentRepresentationObject) DocumentSource

func (o WebDocumentRepresentationObject) DocumentSource() string

Returns the receiver’s source as text.

Return Value

Returns the document source associated with the receiver or `nil` if the source cannot be provided.

Discussion

For example, for HTML documents, the receiver should return the HTML source.

See: https://developer.apple.com/documentation/WebKit/WebDocumentRepresentation/documentSource()

func (WebDocumentRepresentationObject) FinishedLoadingWithDataSource

func (o WebDocumentRepresentationObject) FinishedLoadingWithDataSource(dataSource IWebDataSource)

Invoked when a data source finishes loading its content.

dataSource: A WebDataSource object that identifies the request that finished loading.

See: https://developer.apple.com/documentation/WebKit/WebDocumentRepresentation/finishedLoading(with:)

func (WebDocumentRepresentationObject) ReceivedDataWithDataSource

func (o WebDocumentRepresentationObject) ReceivedDataWithDataSource(data foundation.NSData, dataSource IWebDataSource)

Invoked when a data source has received some data.

data: An [NSData] object containing the data received.

dataSource: A WebDataSource object that identifies the request that generated this data.

Discussion

Data is loaded incrementally, so this method may be invoked multiple times. The receiver is responsible for accumulating this data.

See: https://developer.apple.com/documentation/WebKit/WebDocumentRepresentation/receivedData(_:with:)

func (WebDocumentRepresentationObject) ReceivedErrorWithDataSource

func (o WebDocumentRepresentationObject) ReceivedErrorWithDataSource(error_ foundation.NSError, dataSource IWebDataSource)

Invoked when a data source receives an error loading its content.

error: An [NSError] object that indicates what error occurred.

dataSource: A WebDataSource object that identifies the request that caused this error.

Discussion

The `error` argument contains details on the error that occurred.

See: https://developer.apple.com/documentation/WebKit/WebDocumentRepresentation/receivedError(_:with:)

func (WebDocumentRepresentationObject) SetDataSource

func (o WebDocumentRepresentationObject) SetDataSource(dataSource IWebDataSource)

Sets the receiver’s data source.

dataSource: The data source to associate with the object.

Discussion

This method is invoked soon after the document representation is created.

See: https://developer.apple.com/documentation/WebKit/WebDocumentRepresentation/setDataSource(_:)

func (WebDocumentRepresentationObject) Title

Returns the receiver’s document title.

Return Value

The title associated with the receiving document object.

See: https://developer.apple.com/documentation/WebKit/WebDocumentRepresentation/title()

type WebDocumentSearching

type WebDocumentSearching interface {
	objectivec.IObject

	// Searches for a string in a given direction from the current position.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebDocumentSearching/search(for:direction:caseSensitive:wrap:)
	SearchForDirectionCaseSensitiveWrap(string_ string, forward bool, caseFlag bool, wrapFlag bool) bool
}

WebDocumentSearching is an optional protocol for document view objects that support searching. Classes that adopt this protocol should also adopt WebDocumentView and inherit from [NSView].

See: https://developer.apple.com/documentation/WebKit/WebDocumentSearching

type WebDocumentSearchingObject

type WebDocumentSearchingObject struct {
	objectivec.Object
}

WebDocumentSearchingObject wraps an existing Objective-C object that conforms to the WebDocumentSearching protocol.

func WebDocumentSearchingObjectFromID

func WebDocumentSearchingObjectFromID(id objc.ID) WebDocumentSearchingObject

WebDocumentSearchingObjectFromID constructs a WebDocumentSearchingObject from an objc.ID. The object is determined to conform to the protocol at runtime.

func (WebDocumentSearchingObject) BaseObject

func (WebDocumentSearchingObject) SearchForDirectionCaseSensitiveWrap

func (o WebDocumentSearchingObject) SearchForDirectionCaseSensitiveWrap(string_ string, forward bool, caseFlag bool, wrapFlag bool) bool

Searches for a string in a given direction from the current position.

string: The string to search for.

forward: If true, the search is in the forward direction from the current location; otherwise, the search is in the backward direction.

caseFlag: If true then the search is case sensitive; otherwise, it is not.

wrapFlag: If true, the search continues from the end of the document to the current location; otherwise, it stops at the end of the document.

Return Value

true if the receiver contains `string` in the specified direction; otherwise, false.

Discussion

The receiver should select the string if it is found.

See: https://developer.apple.com/documentation/WebKit/WebDocumentSearching/search(for:direction:caseSensitive:wrap:)

type WebDocumentText

type WebDocumentText interface {
	objectivec.IObject

	// Returns the entire content of the web document as a string.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebDocumentText/string()
	String() string

	// Returns the entire content of the web document as an attributed string.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebDocumentText/attributedString()
	AttributedString() foundation.NSAttributedString

	// Selects all the text in the web document.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebDocumentText/selectAll()
	SelectAll()

	// Deselects the currently selected text in the web document.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebDocumentText/deselectAll()
	DeselectAll()

	// Returns the currently selected text in the web document as a string.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebDocumentText/selectedString()
	SelectedString() string

	// Returns the currently selected text in the web document as an attributed string.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebDocumentText/selectedAttributedString()
	SelectedAttributedString() foundation.NSAttributedString

	// Returns a Boolean value that indicates whether the web document supports text encoding.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebDocumentText/supportsTextEncoding()
	SupportsTextEncoding() bool
}

WebDocumentText is an optional protocol for document view objects that display text. This protocol defines methods for accessing document content as strings, and methods for text selection. Classes that adopt this protocol should also adopt WebDocumentView(<https://developer.apple.com/documentation/WebKit/WebDocumentView>) and inherit from [NSView].

See: https://developer.apple.com/documentation/WebKit/WebDocumentText

type WebDocumentTextObject

type WebDocumentTextObject struct {
	objectivec.Object
}

WebDocumentTextObject wraps an existing Objective-C object that conforms to the WebDocumentText protocol.

func WebDocumentTextObjectFromID

func WebDocumentTextObjectFromID(id objc.ID) WebDocumentTextObject

WebDocumentTextObjectFromID constructs a WebDocumentTextObject from an objc.ID. The object is determined to conform to the protocol at runtime.

func (WebDocumentTextObject) AttributedString

Returns the entire content of the web document as an attributed string.

Return Value

An attributed string containing the entire content of the web document.

See: https://developer.apple.com/documentation/WebKit/WebDocumentText/attributedString()

func (WebDocumentTextObject) BaseObject

func (o WebDocumentTextObject) BaseObject() objectivec.Object

func (WebDocumentTextObject) DeselectAll

func (o WebDocumentTextObject) DeselectAll()

Deselects the currently selected text in the web document.

See: https://developer.apple.com/documentation/WebKit/WebDocumentText/deselectAll()

func (WebDocumentTextObject) SelectAll

func (o WebDocumentTextObject) SelectAll()

Selects all the text in the web document.

See: https://developer.apple.com/documentation/WebKit/WebDocumentText/selectAll()

func (WebDocumentTextObject) SelectedAttributedString

func (o WebDocumentTextObject) SelectedAttributedString() foundation.NSAttributedString

Returns the currently selected text in the web document as an attributed string.

Return Value

An attributed string containing the currently selected text in the web document.

See: https://developer.apple.com/documentation/WebKit/WebDocumentText/selectedAttributedString()

func (WebDocumentTextObject) SelectedString

func (o WebDocumentTextObject) SelectedString() string

Returns the currently selected text in the web document as a string.

Return Value

The currently selected text in the web document.

See: https://developer.apple.com/documentation/WebKit/WebDocumentText/selectedString()

func (WebDocumentTextObject) String

func (o WebDocumentTextObject) String() string

Returns the entire content of the web document as a string.

Return Value

The entire content of the web document.

See: https://developer.apple.com/documentation/WebKit/WebDocumentText/string()

func (WebDocumentTextObject) SupportsTextEncoding

func (o WebDocumentTextObject) SupportsTextEncoding() bool

Returns a Boolean value that indicates whether the web document supports text encoding.

Return Value

true if the web document supports text encoding; otherwise, false.

See: https://developer.apple.com/documentation/WebKit/WebDocumentText/supportsTextEncoding()

type WebDocumentView

type WebDocumentView interface {
	objectivec.IObject

	// Invoked when the data source for this document has been changed.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebDocumentView/setDataSource(_:)
	SetDataSource(dataSource IWebDataSource)

	// Invoked when additional data has been received.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebDocumentView/dataSourceUpdated(_:)
	DataSourceUpdated(dataSource IWebDataSource)

	// Sets whether or not the receiver should change its layout.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebDocumentView/setNeedsLayout(_:)
	SetNeedsLayout(flag bool)

	// Invoked when the receiver should change its layout immediately.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebDocumentView/layout()
	Layout()

	// Invoked when a web view’s host window is set.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebDocumentView/viewDidMoveToHostWindow()
	ViewDidMoveToHostWindow()

	// Invoked when a web view’s host window is about to change.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebDocumentView/viewWillMove(toHostWindow:)
	ViewWillMoveToHostWindow(hostWindow appkit.NSWindow)
}

This protocol is adopted by the document view of a WebFrameView. You can extend WebKit to support additional MIME types by implementing your own document view and document representation classes to render data for specific MIME types. You register those classes using the WebFrame [registerClass(_:representationClass:forMIMEType:)](<https://developer.apple.com/documentation/WebKit/WebView-swift.class/registerClass(_:representationClass:forMIMEType:)>) method. Classes that adopt this protocol are expected to be subclasses of [NSView].

See: https://developer.apple.com/documentation/WebKit/WebDocumentView

type WebDocumentViewObject

type WebDocumentViewObject struct {
	objectivec.Object
}

WebDocumentViewObject wraps an existing Objective-C object that conforms to the WebDocumentView protocol.

func WebDocumentViewObjectFromID

func WebDocumentViewObjectFromID(id objc.ID) WebDocumentViewObject

WebDocumentViewObjectFromID constructs a WebDocumentViewObject from an objc.ID. The object is determined to conform to the protocol at runtime.

func (WebDocumentViewObject) BaseObject

func (o WebDocumentViewObject) BaseObject() objectivec.Object

func (WebDocumentViewObject) DataSourceUpdated

func (o WebDocumentViewObject) DataSourceUpdated(dataSource IWebDataSource)

Invoked when additional data has been received.

dataSource: The source of the new data.

See: https://developer.apple.com/documentation/WebKit/WebDocumentView/dataSourceUpdated(_:)

func (WebDocumentViewObject) Layout

func (o WebDocumentViewObject) Layout()

Invoked when the receiver should change its layout immediately.

Discussion

This message is sent to the view as a hint to perform any calculations and update rendering information. For example, at a minimum, the receiver might set the frame rectangle. This method should not perform any drawing operations.

See: https://developer.apple.com/documentation/WebKit/WebDocumentView/layout()

func (WebDocumentViewObject) SetDataSource

func (o WebDocumentViewObject) SetDataSource(dataSource IWebDataSource)

Invoked when the data source for this document has been changed.

dataSource: The new data source for the document.

See: https://developer.apple.com/documentation/WebKit/WebDocumentView/setDataSource(_:)

func (WebDocumentViewObject) SetNeedsLayout

func (o WebDocumentViewObject) SetNeedsLayout(flag bool)

Sets whether or not the receiver should change its layout.

flag: Sets whether the receiver needs to update its layout in the next call to its draw(_:) method.

Discussion

A view conforming to this protocol should store the most recent value of this flag in an internal variable. Then, in its drawRect method, if the most recent value of this flag was true, it should invoke [Layout] and reset the internal variable before updating the contents of the view.

See: https://developer.apple.com/documentation/WebKit/WebDocumentView/setNeedsLayout(_:)

func (WebDocumentViewObject) ViewDidMoveToHostWindow

func (o WebDocumentViewObject) ViewDidMoveToHostWindow()

Invoked when a web view’s host window is set.

See: https://developer.apple.com/documentation/WebKit/WebDocumentView/viewDidMoveToHostWindow()

func (WebDocumentViewObject) ViewWillMoveToHostWindow

func (o WebDocumentViewObject) ViewWillMoveToHostWindow(hostWindow appkit.NSWindow)

Invoked when a web view’s host window is about to change.

hostWindow: The new host window for the view.

See: https://developer.apple.com/documentation/WebKit/WebDocumentView/viewWillMove(toHostWindow:)

type WebDownload

type WebDownload struct {
	foundation.NSURLDownload
}

WebDownload objects initiate download client requests on behalf of a delegate. A download request involves loading the data, decoding it (if necessary), and saving it to a file. Instances of this class behave similar to [NSURLDownload] except delegates of WebDownload may implement an additional delegate method. The method allows the delegate to specify the window to be used for authentication sheets. If the delegate does not implement this method, the WebDownload object will prompt the user for authentication using the standard WebKit authentication panel, as either a sheet or window. There are no additional methods defined in this class. See WebDownloadDelegate for the delegate method.

See: https://developer.apple.com/documentation/WebKit/WebDownload

func NewWebDownload

func NewWebDownload() WebDownload

NewWebDownload creates a new WebDownload instance.

func WebDownloadFromID

func WebDownloadFromID(id objc.ID) WebDownload

WebDownloadFromID constructs a WebDownload from an objc.ID.

WebDownload objects initiate download client requests on behalf of a delegate. A download request involves loading the data, decoding it (if necessary), and saving it to a file. Instances of this class behave similar to [NSURLDownload] except delegates of WebDownload may implement an additional delegate method. The method allows the delegate to specify the window to be used for authentication sheets. If the delegate does not implement this method, the WebDownload object will prompt the user for authentication using the standard WebKit authentication panel, as either a sheet or window. There are no additional methods defined in this class. See WebDownloadDelegate for the delegate method.

func (WebDownload) Autorelease

func (w WebDownload) Autorelease() WebDownload

Autorelease adds the receiver to the current autorelease pool.

func (WebDownload) Init

func (w WebDownload) Init() WebDownload

Init initializes the instance.

type WebDownloadClass

type WebDownloadClass struct {
	// contains filtered or unexported fields
}

func GetWebDownloadClass

func GetWebDownloadClass() WebDownloadClass

GetWebDownloadClass returns the class object for WebDownload.

func (WebDownloadClass) Alloc

func (wc WebDownloadClass) Alloc() WebDownload

Alloc allocates memory for a new instance of the class.

func (WebDownloadClass) Class

func (wc WebDownloadClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type WebDownloadDelegateConfig

type WebDownloadDelegateConfig struct {

	// Other Methods
	// DownloadWindowForAuthenticationSheet — Returns the window to be used by the authentication sheet.
	DownloadWindowForAuthenticationSheet func(download WebDownload) appkit.NSWindow
}

WebDownloadDelegateConfig holds optional typed callbacks for WebDownloadDelegate methods. Set non-nil fields to register the corresponding Objective-C delegate method. Methods with nil callbacks are not registered, so [NSObject.RespondsToSelector] returns false for them — matching the Objective-C delegate pattern exactly.

See Apple Documentation for protocol details.

type WebDownloadDelegateObject

type WebDownloadDelegateObject struct {
	foundation.NSURLDownloadDelegateObject
}

WebDownloadDelegateObject wraps an existing Objective-C object that conforms to the WebDownloadDelegate protocol.

func NewWebDownloadDelegate

func NewWebDownloadDelegate(config WebDownloadDelegateConfig) WebDownloadDelegateObject

NewWebDownloadDelegate creates an Objective-C object implementing the WebDownloadDelegate protocol.

The object implements only the methods set in config, so [NSObject.RespondsToSelector] reports optional delegate methods accurately. Objects with the same set of methods share one Objective-C class, registered on first use, so creating many of them costs no class or callback registration. The caller owns the returned object; config is dropped when it deallocates.

The returned WebDownloadDelegateObject satisfies the WebDownloadDelegate interface and can be passed directly to SetDelegate and similar methods.

See Apple Documentation for protocol details.

func WebDownloadDelegateObjectFromID

func WebDownloadDelegateObjectFromID(id objc.ID) WebDownloadDelegateObject

WebDownloadDelegateObjectFromID constructs a WebDownloadDelegateObject from an objc.ID. The object is determined to conform to the protocol at runtime.

func (WebDownloadDelegateObject) BaseObject

func (WebDownloadDelegateObject) DownloadWindowForAuthenticationSheet

func (o WebDownloadDelegateObject) DownloadWindowForAuthenticationSheet(download IWebDownload) appkit.NSWindow

Returns the window to be used by the authentication sheet.

download: The download object that is requesting the window.

Return Value

An NSWindow object into which the WebDownload object should draw its authentication sheet.

Discussion

The default implementation prompts the user for authentication using the standard WebKit authentication panel, as either a sheet or window.

See: https://developer.apple.com/documentation/WebKit/WebDownloadDelegate/downloadWindow(forAuthenticationSheet:)

type WebDragDestinationAction deprecated

type WebDragDestinationAction uint

Deprecated: Deprecated since macOS 10.14. See: https://developer.apple.com/documentation/WebKit/WebDragDestinationAction

const (
	// Deprecated.
	WebDragDestinationActionAny WebDragDestinationAction = 4294967295
	// Deprecated.
	WebDragDestinationActionDHTML WebDragDestinationAction = 1
	// Deprecated.
	WebDragDestinationActionEdit WebDragDestinationAction = 2
	// Deprecated.
	WebDragDestinationActionLoad WebDragDestinationAction = 4
	// Deprecated.
	WebDragDestinationActionNone WebDragDestinationAction = 0
)

func (WebDragDestinationAction) String

func (e WebDragDestinationAction) String() string

type WebDragSourceAction deprecated

type WebDragSourceAction uint

Deprecated: Deprecated since macOS 10.14. See: https://developer.apple.com/documentation/WebKit/WebDragSourceAction

const (
	// Deprecated.
	WebDragSourceActionAny WebDragSourceAction = 4294967295
	// Deprecated.
	WebDragSourceActionDHTML WebDragSourceAction = 1
	// Deprecated.
	WebDragSourceActionImage WebDragSourceAction = 2
	// Deprecated.
	WebDragSourceActionLink WebDragSourceAction = 4
	// Deprecated.
	WebDragSourceActionNone WebDragSourceAction = 0
	// Deprecated.
	WebDragSourceActionSelection WebDragSourceAction = 8
)

func (WebDragSourceAction) String

func (e WebDragSourceAction) String() string

type WebEditingDelegate

type WebEditingDelegate interface {
	objectivec.IObject
}

WebEditingDelegate protocol.

See: https://developer.apple.com/documentation/WebKit/WebEditingDelegate

type WebEditingDelegateConfig

type WebEditingDelegateConfig struct {

	// Instance Methods
	// WebViewShouldChangeTypingStyleToStyle — Returns whether the user should be allowed to change the typing style in a web view.
	WebViewShouldChangeTypingStyleToStyle func(webView WebView, currentStyle DOMCSSStyleDeclaration, proposedStyle DOMCSSStyleDeclaration) bool
	// WebViewDidBeginEditing — Sent by the default notification center when the user begins editing the web view.
	WebViewDidBeginEditing func(notification foundation.NSNotification)
	// WebViewDidChange — Sent by the default notification center when the user changes content in the web view.
	WebViewDidChange func(notification foundation.NSNotification)
	// WebViewDidChangeSelection — Sent by the default notification center when the user changes the selection in the web view.
	WebViewDidChangeSelection func(notification foundation.NSNotification)
	// WebViewDidChangeTypingStyle — Sent by the default notification center when the user changes the typing style in the web view.
	WebViewDidChangeTypingStyle func(notification foundation.NSNotification)
	// WebViewDidEndEditing — Sent by the default notification center when the user stops editing the web view.
	WebViewDidEndEditing func(notification foundation.NSNotification)

	// Other Methods
	// UndoManagerForWebView — Returns the undo manager to be used by a web view.
	UndoManagerForWebView func(webView WebView) foundation.NSUndoManager
	// WebViewShouldApplyStyleToElementsInDOMRange — Returns whether the user should be allowed to apply a style to a range of content.
	WebViewShouldApplyStyleToElementsInDOMRange func(webView WebView, style DOMCSSStyleDeclaration, range_ DOMRange) bool
	// WebViewShouldBeginEditingInDOMRange — Returns whether the user is allowed to edit a range of content in a web view.
	WebViewShouldBeginEditingInDOMRange func(webView WebView, range_ DOMRange) bool
	// WebViewShouldChangeSelectedDOMRangeToDOMRangeAffinityStillSelecting — Returns whether the user should be allowed to change the selected range.
	WebViewShouldChangeSelectedDOMRangeToDOMRangeAffinityStillSelecting func(webView WebView, currentRange DOMRange, proposedRange DOMRange, selectionAffinity appkit.NSSelectionAffinity, flag bool) bool
	// WebViewShouldDeleteDOMRange — Returns whether the user should be allowed to delete a range of content.
	WebViewShouldDeleteDOMRange func(webView WebView, range_ DOMRange) bool
	// WebViewShouldEndEditingInDOMRange — Returns whether the user should be allowed to end editing.
	WebViewShouldEndEditingInDOMRange func(webView WebView, range_ DOMRange) bool
	// WebViewShouldInsertNodeReplacingDOMRangeGivenAction — Returns whether the user should be allowed to insert a node in place of a range of content.
	WebViewShouldInsertNodeReplacingDOMRangeGivenAction func(webView WebView, node DOMNode, range_ DOMRange, action WebViewInsertAction) bool
}

WebEditingDelegateConfig holds optional typed callbacks for WebEditingDelegate methods. Set non-nil fields to register the corresponding Objective-C delegate method. Methods with nil callbacks are not registered, so [NSObject.RespondsToSelector] returns false for them — matching the Objective-C delegate pattern exactly.

See Apple Documentation for protocol details.

type WebEditingDelegateObject

type WebEditingDelegateObject struct {
	objectivec.Object
}

WebEditingDelegateObject wraps an existing Objective-C object that conforms to the WebEditingDelegate protocol.

func NewWebEditingDelegate

func NewWebEditingDelegate(config WebEditingDelegateConfig) WebEditingDelegateObject

NewWebEditingDelegate creates an Objective-C object implementing the WebEditingDelegate protocol.

The object implements only the methods set in config, so [NSObject.RespondsToSelector] reports optional delegate methods accurately. Objects with the same set of methods share one Objective-C class, registered on first use, so creating many of them costs no class or callback registration. The caller owns the returned object; config is dropped when it deallocates.

The returned WebEditingDelegateObject satisfies the WebEditingDelegate interface and can be passed directly to SetDelegate and similar methods.

See Apple Documentation for protocol details.

func WebEditingDelegateObjectFromID

func WebEditingDelegateObjectFromID(id objc.ID) WebEditingDelegateObject

WebEditingDelegateObjectFromID constructs a WebEditingDelegateObject from an objc.ID. The object is determined to conform to the protocol at runtime.

func (WebEditingDelegateObject) BaseObject

func (WebEditingDelegateObject) UndoManagerForWebView

func (o WebEditingDelegateObject) UndoManagerForWebView(webView IWebView) foundation.UndoManager

Returns the undo manager to be used by a web view.

webView: The web view that the user is editing.

Return Value

The undo manager.

See: https://developer.apple.com/documentation/WebKit/WebEditingDelegate/undoManager(for:)

func (WebEditingDelegateObject) WebViewDidBeginEditing

func (o WebEditingDelegateObject) WebViewDidBeginEditing(notification foundation.NSNotification)

Sent by the default notification center when the user begins editing the web view.

notification: Always set to WebViewDidBeginEditingNotification. You can retrieve the WebView object by sending `object` to `notification`.

See: https://developer.apple.com/documentation/WebKit/WebEditingDelegate/webViewDidBeginEditing(_:)

func (WebEditingDelegateObject) WebViewDidChange

func (o WebEditingDelegateObject) WebViewDidChange(notification foundation.NSNotification)

Sent by the default notification center when the user changes content in the web view.

notification: Always set to WebViewDidChangeNotification. You can retrieve the WebView object by sending `object` to `notification`.

See: https://developer.apple.com/documentation/WebKit/WebEditingDelegate/webViewDidChange(_:)

func (WebEditingDelegateObject) WebViewDidChangeSelection

func (o WebEditingDelegateObject) WebViewDidChangeSelection(notification foundation.NSNotification)

Sent by the default notification center when the user changes the selection in the web view.

notification: Always set to WebViewDidChangeSelectionNotification. You can retrieve the WebView object by sending `object` to `notification`.

See: https://developer.apple.com/documentation/WebKit/WebEditingDelegate/webViewDidChangeSelection(_:)

func (WebEditingDelegateObject) WebViewDidChangeTypingStyle

func (o WebEditingDelegateObject) WebViewDidChangeTypingStyle(notification foundation.NSNotification)

Sent by the default notification center when the user changes the typing style in the web view.

notification: Always set to WebViewDidChangeTypingStyleNotification. You can retrieve the WebView object by sending `object` to `notification`.

See: https://developer.apple.com/documentation/WebKit/WebEditingDelegate/webViewDidChangeTypingStyle(_:)

func (WebEditingDelegateObject) WebViewDidEndEditing

func (o WebEditingDelegateObject) WebViewDidEndEditing(notification foundation.NSNotification)

Sent by the default notification center when the user stops editing the web view.

notification: Always set to WebViewDidEndEditingNotification. You can retrieve the WebView object by sending `object` to `notification`.

See: https://developer.apple.com/documentation/WebKit/WebEditingDelegate/webViewDidEndEditing(_:)

func (WebEditingDelegateObject) WebViewDoCommandBySelector

func (o WebEditingDelegateObject) WebViewDoCommandBySelector(webView IWebView, selector objc.SEL) bool

Returns whether the receiver performs a command instead of the web view.

webView: The web view that the user is editing.

selector: The command to perform.

Return Value

true if the receiver will perform `command`; otherwise, false.

Discussion

Implement this method if you want to perform `command` instead of letting the web view perform `command`.

See: https://developer.apple.com/documentation/WebKit/WebEditingDelegate/webView(_:doCommandBy:)

func (WebEditingDelegateObject) WebViewShouldApplyStyleToElementsInDOMRange

func (o WebEditingDelegateObject) WebViewShouldApplyStyleToElementsInDOMRange(webView IWebView, style IDOMCSSStyleDeclaration, range_ IDOMRange) bool

Returns whether the user should be allowed to apply a style to a range of content.

webView: The web view that the user is editing.

style: The style to apply.

range: The range of the content.

Return Value

true if the user should be allowed to apply the style to the content range; otherwise, false.

See: https://developer.apple.com/documentation/WebKit/WebEditingDelegate/webView(_:shouldApplyStyle:toElementsIn:)

func (WebEditingDelegateObject) WebViewShouldBeginEditingInDOMRange

func (o WebEditingDelegateObject) WebViewShouldBeginEditingInDOMRange(webView IWebView, range_ IDOMRange) bool

Returns whether the user is allowed to edit a range of content in a web view.

webView: The web view that the user is editing.

range: The section of the begin-editing request; used to determine if editing is allowed. Typically, `range` is not the current selection but may becomes the current selection if this method returns true.

Return Value

true if the user is allowed to edit `webView`; otherwise, false.

Discussion

This method is invoked when a web view attempts to become the first responder or when the user drops an object on it.

See: https://developer.apple.com/documentation/WebKit/WebEditingDelegate/webView(_:shouldBeginEditingIn:)

func (WebEditingDelegateObject) WebViewShouldChangeSelectedDOMRangeToDOMRangeAffinityStillSelecting

func (o WebEditingDelegateObject) WebViewShouldChangeSelectedDOMRangeToDOMRangeAffinityStillSelecting(webView IWebView, currentRange IDOMRange, proposedRange IDOMRange, selectionAffinity appkit.NSSelectionAffinity, flag bool) bool

Returns whether the user should be allowed to change the selected range.

webView: The web view that the user is editing.

currentRange: The old range the user wants to change.

proposedRange: The new range the user wants to select.

selectionAffinity: The direction of the selection.

flag: true if the user is still selecting; otherwise, false.

Return Value

true if the user is allowed to change the selected range; otherwise, false.

See: https://developer.apple.com/documentation/WebKit/WebEditingDelegate/webView(_:shouldChangeSelectedDOMRange:to:affinity:stillSelecting:)

func (WebEditingDelegateObject) WebViewShouldChangeTypingStyleToStyle

func (o WebEditingDelegateObject) WebViewShouldChangeTypingStyleToStyle(webView IWebView, currentStyle IDOMCSSStyleDeclaration, proposedStyle IDOMCSSStyleDeclaration) bool

Returns whether the user should be allowed to change the typing style in a web view.

webView: The web view that the user is editing.

currentStyle: The old style the user wants to change.

proposedStyle: The new style the user wants to set.

Return Value

true if the user should be allowed to change the typing style in `webView` to `proposedStyle`; otherwise, false.

Discussion

You can implement this method to take some other action—for example, set the typing style to a different style—and return false .

See: https://developer.apple.com/documentation/WebKit/WebEditingDelegate/webView(_:shouldChangeTypingStyle:toStyle:)

func (WebEditingDelegateObject) WebViewShouldDeleteDOMRange

func (o WebEditingDelegateObject) WebViewShouldDeleteDOMRange(webView IWebView, range_ IDOMRange) bool

Returns whether the user should be allowed to delete a range of content.

webView: The web view that the user is editing.

range: The range of the content to delete.

Return Value

true if the user should be allowed to delete the content specified by `range`; otherwise, false.

Discussion

This method may perform an alternate action—for example, delete a different range—and return false.

See: https://developer.apple.com/documentation/WebKit/WebEditingDelegate/webView(_:shouldDelete:)

func (WebEditingDelegateObject) WebViewShouldEndEditingInDOMRange

func (o WebEditingDelegateObject) WebViewShouldEndEditingInDOMRange(webView IWebView, range_ IDOMRange) bool

Returns whether the user should be allowed to end editing.

webView: The web view that the user is editing.

range: Typically, the current selection, although it might not be. Use the `range` parameter to help determine whether the user can end editing.

Return Value

true if the user should be allowed to end editing `webView`; otherwise, false. If this method returnstrue, `webView` ends editing and resigns as the first responder.

Discussion

This method is invoked when a web view attempts to resign as the first responder.

See: https://developer.apple.com/documentation/WebKit/WebEditingDelegate/webView(_:shouldEndEditingIn:)

func (WebEditingDelegateObject) WebViewShouldInsertNodeReplacingDOMRangeGivenAction

func (o WebEditingDelegateObject) WebViewShouldInsertNodeReplacingDOMRangeGivenAction(webView IWebView, node IDOMNode, range_ IDOMRange, action WebViewInsertAction) bool

Returns whether the user should be allowed to insert a node in place of a range of content.

webView: The web view that the user is editing.

node: The content to insert.

range: The portion of the content that is replaced with `node`.

action: Indicates the type of user action that initiated the insertion.

Return Value

true if the user should be allowed to insert `node` in `webView`; otherwise, false.

Discussion

This method may perform an alternate action—for example, insert a different node—and return false.

See: https://developer.apple.com/documentation/WebKit/WebEditingDelegate/webView(_:shouldInsert:replacing:given:)

func (WebEditingDelegateObject) WebViewShouldInsertTextReplacingDOMRangeGivenAction

func (o WebEditingDelegateObject) WebViewShouldInsertTextReplacingDOMRangeGivenAction(webView IWebView, text string, range_ IDOMRange, action WebViewInsertAction) bool

Returns whether a user should be allowed to insert text in place of a range of content.

webView: The web view that the user is editing.

text: The text to insert.

range: The portion of the document that will be replaced with `text`.

action: Indicates the type of user action that initiated the insertion.

Return Value

true if the user should be allowed to insert `text` in `webView`; otherwise, false.

Discussion

This method may perform an alternate action—for example, insert different text—and return false.

See: https://developer.apple.com/documentation/WebKit/WebEditingDelegate/webView(_:shouldInsertText:replacing:given:)

type WebFrame

type WebFrame struct {
	objectivec.Object
}

A WebFrame object encapsulates the data displayed in a WebFrameView object. There is one WebFrame object per frame displayed in a WebView. An entire webpage is represented by a hierarchy of WebFrame objects in which the root object is called the main frame.

Overview

Each WebFrame also has a WebDataSource object that manages the loading of frame content. You use the load(_:) method to initiate an asynchronous client request which will create a provisional data source. The provisional data source will transition to a committed data source once any data has been received.

There are some special, predefined, frame names that you can use when referring to or finding a WebFrame. Some of the predefined frame names are: “_self”, “_current”, “_parent”, and “_top.” See findNamed(_:) for a description of their meaning. Frame names may also be specified in the HTML source, or set by clients.

However, the group name is an arbitrary identifier used to group related frames. For example, JavaScript running in a frame can access any other frame in the same group. It’s up to the application how it chooses to scope related frames.

Getting the Data Source

Finding Frames

Getting DOM Objects

See: https://developer.apple.com/documentation/WebKit/WebFrame

func NewWebFrame

func NewWebFrame() WebFrame

NewWebFrame creates a new WebFrame instance.

func NewWebFrameWithNameWebFrameViewWebView

func NewWebFrameWithNameWebFrameViewWebView(name string, view IWebFrameView, webView IWebView) WebFrame

Initializes the receiver with a frame name, web frame view, and controlling web view.

name: The frame name. Typically a custom name or `nil` (if none is specified). It would be inappropriate to use one of the predefined frame names described in findNamed(_:) as they have special meanings.

view: The view that displays this web frame—the view associated with the receiver.

webView: The parent view that manages the main frame and its children.

Return Value

An initialized web frame.

Discussion

Normally, you do not invoke this method directly. WebView objects automatically create the main frame and subsequent children when new content is loaded. Send a load(_:) message to the main frame of a WebView to load web content.

This method is the designated initializer for the WebFrame class.

See: https://developer.apple.com/documentation/WebKit/WebFrame/init(name:webFrameView:webView:)

func WebFrameFromID

func WebFrameFromID(id objc.ID) WebFrame

WebFrameFromID constructs a WebFrame from an objc.ID.

A WebFrame object encapsulates the data displayed in a WebFrameView object. There is one WebFrame object per frame displayed in a WebView. An entire webpage is represented by a hierarchy of WebFrame objects in which the root object is called the main frame.

func (WebFrame) Autorelease

func (w WebFrame) Autorelease() WebFrame

Autorelease adds the receiver to the current autorelease pool.

func (WebFrame) ChildFrames

func (w WebFrame) ChildFrames() foundation.INSArray

The frames of the web frame’s immediate children.

Discussion

Each child web frame is an instance of WebFrame and corresponds to an HTML frameset or `iframe` element.

See: https://developer.apple.com/documentation/WebKit/WebFrame/childFrames

func (WebFrame) DOMDocument

func (w WebFrame) DOMDocument() IDOMDocument

The web frame’s DOM document.

Discussion

`nil` if the receiver doesn’t have a DOM document; for example, if it’s a standalone image.

See: https://developer.apple.com/documentation/WebKit/WebFrame/domDocument

func (WebFrame) DataSource

func (w WebFrame) DataSource() IWebDataSource

The committed data source.

Discussion

`nil` if the provisional data source is not done loading.

See: https://developer.apple.com/documentation/WebKit/WebFrame/dataSource

func (WebFrame) FrameElement

func (w WebFrame) FrameElement() IDOMHTMLElement

The web view’s DOM frame element.

See: https://developer.apple.com/documentation/WebKit/WebFrame/frameElement

func (WebFrame) FrameView

func (w WebFrame) FrameView() IWebFrameView

The web frame’s view object.

See: https://developer.apple.com/documentation/WebKit/WebFrame/frameView

func (WebFrame) GlobalContext

func (w WebFrame) GlobalContext() javascriptcore.JSGlobalContextRef

The global JavaScript execution context for bridging between the WebKit and JavaScriptCore C API.

See: https://developer.apple.com/documentation/WebKit/WebFrame/globalContext

func (WebFrame) Init

func (w WebFrame) Init() WebFrame

Init initializes the instance.

func (WebFrame) JavaScriptContext

func (w WebFrame) JavaScriptContext() javascriptcore.JSContext

The frame’s global JavaScript execution context.

Discussion

Use this method to bridge between the WebKit and Objective-C JavaScriptCore API.

See: https://developer.apple.com/documentation/WebKit/WebFrame/javaScriptContext

func (WebFrame) Name

func (w WebFrame) Name() string

The web frame’s name.

See: https://developer.apple.com/documentation/WebKit/WebFrame/name

func (WebFrame) ParentFrame

func (w WebFrame) ParentFrame() IWebFrame

The web frame’s parent web frame.

See: https://developer.apple.com/documentation/WebKit/WebFrame/parent

func (WebFrame) ProvisionalDataSource

func (w WebFrame) ProvisionalDataSource() IWebDataSource

The provisional data source, or `nil` if either a load request is not in progress or a load request has completed.

Discussion

Use the load(_:) method to initiate an asynchronous client request, which creates a provisional data source. The provisional data source transitions to a committed data source once any data is received.

See: https://developer.apple.com/documentation/WebKit/WebFrame/provisionalDataSource

func (WebFrame) WebView

func (w WebFrame) WebView() IWebView

The view object that manages the web frame.

See: https://developer.apple.com/documentation/WebKit/WebFrame/webView

func (WebFrame) WindowObject

func (w WebFrame) WindowObject() IWebScriptObject

The JavaScript window object.

See: https://developer.apple.com/documentation/WebKit/WebFrame/windowObject

type WebFrameClass

type WebFrameClass struct {
	// contains filtered or unexported fields
}

func GetWebFrameClass

func GetWebFrameClass() WebFrameClass

GetWebFrameClass returns the class object for WebFrame.

func (WebFrameClass) Alloc

func (wc WebFrameClass) Alloc() WebFrame

Alloc allocates memory for a new instance of the class.

func (WebFrameClass) Class

func (wc WebFrameClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type WebFrameLoadDelegate

type WebFrameLoadDelegate interface {
	objectivec.IObject

	// Called when a frame’s scripting object for a page is available. Use the [webView(_:didClearWindowObject:for:)](<https://developer.apple.com/documentation/WebKit/WebFrameLoadDelegate/webView(_:didClearWindowObject:for:)>) method instead.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebFrameLoadDelegate/webView:windowScriptObjectAvailable:
	WebViewWindowScriptObjectAvailable(webView IWebView, windowScriptObject IWebScriptObject)
}

WebFrameLoadDelegate protocol.

See: https://developer.apple.com/documentation/WebKit/WebFrameLoadDelegate

type WebFrameLoadDelegateConfig

type WebFrameLoadDelegateConfig struct {

	// Other Methods
	// WebViewWindowScriptObjectAvailable — Called when a frame’s scripting object for a page is available. Use the [webView(_:didClearWindowObject:for:)](<https://developer.apple.com/documentation/WebKit/WebFrameLoadDelegate/webView(_:didClearWindowObject:for:)>) method instead.
	WebViewWindowScriptObjectAvailable func(webView WebView, windowScriptObject WebScriptObject)
	// WebViewDidCancelClientRedirectForFrame — Called when a client redirect is cancelled.
	WebViewDidCancelClientRedirectForFrame func(sender WebView, frame WebFrame)
	// WebViewDidChangeLocationWithinPageForFrame — Called when the scroll position within a frame changes.
	WebViewDidChangeLocationWithinPageForFrame func(sender WebView, frame WebFrame)
	// WebViewDidClearWindowObjectForFrame — Called when the JavaScript window object in a frame is ready for loading.
	WebViewDidClearWindowObjectForFrame func(webView WebView, windowObject WebScriptObject, frame WebFrame)
	// WebViewDidCommitLoadForFrame — Called when content starts arriving for a page load.
	WebViewDidCommitLoadForFrame func(sender WebView, frame WebFrame)
	// WebViewDidCreateJavaScriptContextForFrame — Notifies the delegate that a new JavaScript context has been created.
	WebViewDidCreateJavaScriptContextForFrame func(webView WebView, context *javascriptcore.JSContext, frame WebFrame)
	// WebViewDidFailLoadWithErrorForFrame — Called when an error occurs loading a committed data source.
	WebViewDidFailLoadWithErrorForFrame func(sender WebView, error_ foundation.NSError, frame WebFrame)
	// WebViewDidFailProvisionalLoadWithErrorForFrame — Called if an error occurs when starting to load data for a page.
	WebViewDidFailProvisionalLoadWithErrorForFrame func(sender WebView, error_ foundation.NSError, frame WebFrame)
	// WebViewDidFinishLoadForFrame — Called when a page load completes.
	WebViewDidFinishLoadForFrame func(sender WebView, frame WebFrame)
	// WebViewDidReceiveIconForFrame — Called when a page icon changes.
	WebViewDidReceiveIconForFrame func(sender WebView, image appkit.NSImage, frame WebFrame)
	// WebViewDidReceiveServerRedirectForProvisionalLoadForFrame — Called when a provisional data source for a frame receives a server redirect.
	WebViewDidReceiveServerRedirectForProvisionalLoadForFrame func(sender WebView, frame WebFrame)
	// WebViewDidStartProvisionalLoadForFrame — Called when a page load is in progress in a given frame.
	WebViewDidStartProvisionalLoadForFrame func(sender WebView, frame WebFrame)
	// WebViewWillCloseFrame — Called when a frame will be closed.
	WebViewWillCloseFrame func(sender WebView, frame WebFrame)
	// WebViewWillPerformClientRedirectToURLDelayFireDateForFrame — Called when a frame receives a client redirect and before it is fired.
	WebViewWillPerformClientRedirectToURLDelayFireDateForFrame func(sender WebView, URL foundation.NSURL, seconds foundation.NSTimeInterval, date foundation.NSDate, frame WebFrame)
}

WebFrameLoadDelegateConfig holds optional typed callbacks for WebFrameLoadDelegate methods. Set non-nil fields to register the corresponding Objective-C delegate method. Methods with nil callbacks are not registered, so [NSObject.RespondsToSelector] returns false for them — matching the Objective-C delegate pattern exactly.

See Apple Documentation for protocol details.

type WebFrameLoadDelegateObject

type WebFrameLoadDelegateObject struct {
	objectivec.Object
}

WebFrameLoadDelegateObject wraps an existing Objective-C object that conforms to the WebFrameLoadDelegate protocol.

func NewWebFrameLoadDelegate

func NewWebFrameLoadDelegate(config WebFrameLoadDelegateConfig) WebFrameLoadDelegateObject

NewWebFrameLoadDelegate creates an Objective-C object implementing the WebFrameLoadDelegate protocol.

The object implements only the methods set in config, so [NSObject.RespondsToSelector] reports optional delegate methods accurately. Objects with the same set of methods share one Objective-C class, registered on first use, so creating many of them costs no class or callback registration. The caller owns the returned object; config is dropped when it deallocates.

The returned WebFrameLoadDelegateObject satisfies the WebFrameLoadDelegate interface and can be passed directly to SetDelegate and similar methods.

See Apple Documentation for protocol details.

func WebFrameLoadDelegateObjectFromID

func WebFrameLoadDelegateObjectFromID(id objc.ID) WebFrameLoadDelegateObject

WebFrameLoadDelegateObjectFromID constructs a WebFrameLoadDelegateObject from an objc.ID. The object is determined to conform to the protocol at runtime.

func (WebFrameLoadDelegateObject) BaseObject

func (WebFrameLoadDelegateObject) WebViewDidCancelClientRedirectForFrame

func (o WebFrameLoadDelegateObject) WebViewDidCancelClientRedirectForFrame(sender IWebView, frame IWebFrame)

Called when a client redirect is cancelled.

sender: The web view containing the frame.

frame: The frame being loaded.

Discussion

This might happen if a frame changes locations before a pending client redirect is fired. The client redirect occurred in `frame`.

See: https://developer.apple.com/documentation/WebKit/WebFrameLoadDelegate/webView(_:didCancelClientRedirectFor:)

func (WebFrameLoadDelegateObject) WebViewDidChangeLocationWithinPageForFrame

func (o WebFrameLoadDelegateObject) WebViewDidChangeLocationWithinPageForFrame(sender IWebView, frame IWebFrame)

Called when the scroll position within a frame changes.

sender: The web view containing the frame.

frame: The frame being loaded.

Discussion

Typically invoked when the user clicks on an anchor within a page. Additional information about the request can be obtained from the data source of `frame`.

See: https://developer.apple.com/documentation/WebKit/WebFrameLoadDelegate/webView(_:didChangeLocationWithinPageFor:)

func (WebFrameLoadDelegateObject) WebViewDidClearWindowObjectForFrame

func (o WebFrameLoadDelegateObject) WebViewDidClearWindowObjectForFrame(webView IWebView, windowObject IWebScriptObject, frame IWebFrame)

Called when the JavaScript window object in a frame is ready for loading.

webView: The web view sending this message.

windowObject: The cleared JavaScript window object.

frame: The frame containing the JavaScript window object.

Discussion

Use this method to set custom properties on the window object before the page is actually loaded. Every time a frame loads or is reloaded all DOM properties are cleared from the window object so the new page has a fresh window object to use. If the page you are loading depends on specific window object properties to exist, they should be added at this point before any scripts are executed.

See: https://developer.apple.com/documentation/WebKit/WebFrameLoadDelegate/webView(_:didClearWindowObject:for:)

func (WebFrameLoadDelegateObject) WebViewDidCommitLoadForFrame

func (o WebFrameLoadDelegateObject) WebViewDidCommitLoadForFrame(sender IWebView, frame IWebFrame)

Called when content starts arriving for a page load.

sender: The web view containing the frame.

frame: The frame being loaded.

Discussion

This method is invoked when a data source transitions from a provisional to committed state—that is, once the data source of `frame` has received one byte or more of data. This method is invoked after a [WebViewDidStartProvisionalLoadForFrame] message but before a “ message is sent to the delegate.

In some cases, a single frame load may be committed more than once. This happens in the case of multipart/x-mixed-replace, also known as a “server push.” In this case, a single frame load results in multiple documents loaded in sequence. This method is invoked once for each document that is successfully loaded.

See: https://developer.apple.com/documentation/WebKit/WebFrameLoadDelegate/webView(_:didCommitLoadFor:)

func (WebFrameLoadDelegateObject) WebViewDidCreateJavaScriptContextForFrame

func (o WebFrameLoadDelegateObject) WebViewDidCreateJavaScriptContextForFrame(webView IWebView, context *javascriptcore.JSContext, frame IWebFrame)

Notifies the delegate that a new JavaScript context has been created.

webView: The view sending the message.

context: The JSContext representing the frame’s JavaScript window object.

frame: The WebFrame to which the context belongs.

Discussion

If a delegate implements this method along with either [WebViewDidClearWindowObjectForFrame] or [WebViewWindowScriptObjectAvailable], only “ will be invoked. This lets the delegate implement multiple versions to maintain backwards compatibility with older versions of WebKit.

See: https://developer.apple.com/documentation/WebKit/WebFrameLoadDelegate/webView(_:didCreateJavaScriptContext:for:)

func (WebFrameLoadDelegateObject) WebViewDidFailLoadWithErrorForFrame

func (o WebFrameLoadDelegateObject) WebViewDidFailLoadWithErrorForFrame(sender IWebView, error_ foundation.NSError, frame IWebFrame)

Called when an error occurs loading a committed data source.

sender: The web view containing the frame.

error: The type of error that occurred during the load.

frame: The frame being loaded.

Discussion

This method is called after the data source has been committed but resulted in an error.

See: https://developer.apple.com/documentation/WebKit/WebFrameLoadDelegate/webView(_:didFailLoadWithError:for:)

func (WebFrameLoadDelegateObject) WebViewDidFailProvisionalLoadWithErrorForFrame

func (o WebFrameLoadDelegateObject) WebViewDidFailProvisionalLoadWithErrorForFrame(sender IWebView, error_ foundation.NSError, frame IWebFrame)

Called if an error occurs when starting to load data for a page.

sender: The web view containing the frame.

error: Specifies the type of error that occurred during the load.

frame: The frame being loaded.

Discussion

The frame continues to display the committed data source if there is one.

See: https://developer.apple.com/documentation/WebKit/WebFrameLoadDelegate/webView(_:didFailProvisionalLoadWithError:for:)

func (WebFrameLoadDelegateObject) WebViewDidFinishLoadForFrame

func (o WebFrameLoadDelegateObject) WebViewDidFinishLoadForFrame(sender IWebView, frame IWebFrame)

Called when a page load completes.

sender: The web view containing the frame.

frame: The frame being loaded.

Discussion

This method is invoked when a location request for `frame` has completed; that is, when all the resources are done loading. Additional information about the request can be obtained from the data source of `frame`.

See: https://developer.apple.com/documentation/WebKit/WebFrameLoadDelegate/webView(_:didFinishLoadFor:)

func (WebFrameLoadDelegateObject) WebViewDidReceiveIconForFrame

func (o WebFrameLoadDelegateObject) WebViewDidReceiveIconForFrame(sender IWebView, image appkit.NSImage, frame IWebFrame)

Called when a page icon changes.

sender: The web view containing the frame.

image: The page icon for a data source.

frame: The frame being loaded.

Discussion

This method may be invoked multiple times before all resources for `frame` are completely loaded. Sometimes a page uses a default icon or stored image that changes when the actual images is loaded.

See: https://developer.apple.com/documentation/WebKit/WebFrameLoadDelegate/webView(_:didReceiveIcon:for:)

func (WebFrameLoadDelegateObject) WebViewDidReceiveServerRedirectForProvisionalLoadForFrame

func (o WebFrameLoadDelegateObject) WebViewDidReceiveServerRedirectForProvisionalLoadForFrame(sender IWebView, frame IWebFrame)

Called when a provisional data source for a frame receives a server redirect.

sender: The web view containing the frame.

frame: The frame being loaded.

Discussion

A server redirect is when one URL location is redirected to another. Additional information about the new request can be obtained from the data source of `frame`.

See: https://developer.apple.com/documentation/WebKit/WebFrameLoadDelegate/webView(_:didReceiveServerRedirectForProvisionalLoadFor:)

func (WebFrameLoadDelegateObject) WebViewDidReceiveTitleForFrame

func (o WebFrameLoadDelegateObject) WebViewDidReceiveTitleForFrame(sender IWebView, title string, frame IWebFrame)

Called when the page title of a frame loads or changes.

sender: The web view containing the frame.

title: The newly loaded title.

frame: The frame being loaded.

Discussion

This method may be invoked multiple times before all resources for `frame` are completely loaded. Delegates can implement this message to display the page title to the user.

See: https://developer.apple.com/documentation/WebKit/WebFrameLoadDelegate/webView(_:didReceiveTitle:for:)

func (WebFrameLoadDelegateObject) WebViewDidStartProvisionalLoadForFrame

func (o WebFrameLoadDelegateObject) WebViewDidStartProvisionalLoadForFrame(sender IWebView, frame IWebFrame)

Called when a page load is in progress in a given frame.

sender: The web view containing the frame.

frame: The frame being loaded.

Discussion

This method is invoked when a new client request is made by `sender` to load a provisional data source for `frame`. This method may be invoked after sending load(_:) to a WebFrame object or as a consequence of the user clicking a link displayed in a web frame view. Delegates might implement this method to notify the user that a request is in progress. Additional information about the request can be obtained from the data source of `frame`.

See: https://developer.apple.com/documentation/WebKit/WebFrameLoadDelegate/webView(_:didStartProvisionalLoadFor:)

func (WebFrameLoadDelegateObject) WebViewWillCloseFrame

func (o WebFrameLoadDelegateObject) WebViewWillCloseFrame(sender IWebView, frame IWebFrame)

Called when a frame will be closed.

sender: The web view containing the frame.

frame: The frame being loaded.

Discussion

Called right before WebKit is done with `frame` and the objects it owns.

See: https://developer.apple.com/documentation/WebKit/WebFrameLoadDelegate/webView(_:willClose:)

func (WebFrameLoadDelegateObject) WebViewWillPerformClientRedirectToURLDelayFireDateForFrame

func (o WebFrameLoadDelegateObject) WebViewWillPerformClientRedirectToURLDelayFireDateForFrame(sender IWebView, URL foundation.NSURL, seconds foundation.NSTimeInterval, date foundation.NSDate, frame IWebFrame)

Called when a frame receives a client redirect and before it is fired.

sender: The web view containing the frame.

URL: The redirect location.

seconds: The number of seconds from `date` before the redirect will be fired.

date: The date and time to call the redirect.

frame: The frame where the redirect occurred.

Discussion

Delegates might implement this method to display progress while a client redirect is pending. If a client redirect is cancelled the [WebViewDidCancelClientRedirectForFrame] delegate method is invoked.

See: https://developer.apple.com/documentation/WebKit/WebFrameLoadDelegate/webView(_:willPerformClientRedirectTo:delay:fire:for:)

func (WebFrameLoadDelegateObject) WebViewWindowScriptObjectAvailable

func (o WebFrameLoadDelegateObject) WebViewWindowScriptObjectAvailable(webView IWebView, windowScriptObject IWebScriptObject)

Called when a frame’s scripting object for a page is available. Use the [WebViewDidClearWindowObjectForFrame] method instead.

webView: The web view containing the frame.

windowScriptObject: The window object in the scripting environment.

Discussion

This method is invoked before the page is actually loaded.

See: https://developer.apple.com/documentation/WebKit/WebFrameLoadDelegate/webView:windowScriptObjectAvailable:

type WebFrameView

type WebFrameView struct {
	appkit.NSView
}

WebFrameView objects and their subviews display the web content contained in a frame. You never create instances of WebFrameView directly—WebView objects create and manage a hierarchy of WebFrameView objects, one for each frame. WebFrameView objects use a scroll view whose document view conforms to the WebDocumentView protocol.

Getting the Web Frame

Getting Subviews

Setting Scrolling Behavior

Printing Views

See: https://developer.apple.com/documentation/WebKit/WebFrameView

func NewWebFrameView

func NewWebFrameView() WebFrameView

NewWebFrameView creates a new WebFrameView instance.

func WebFrameViewFromID

func WebFrameViewFromID(id objc.ID) WebFrameView

WebFrameViewFromID constructs a WebFrameView from an objc.ID.

WebFrameView objects and their subviews display the web content contained in a frame. You never create instances of WebFrameView directly—WebView objects create and manage a hierarchy of WebFrameView objects, one for each frame. WebFrameView objects use a scroll view whose document view conforms to the WebDocumentView protocol.

func (WebFrameView) AllowsScrolling

func (w WebFrameView) AllowsScrolling() bool

A Boolean that indicates whether the frame view should allow users to scroll.

Discussion

If true, scrolling is allowed; if false, it is not. If the frame contains a scrolling element, then that value is used as the default; otherwise, the default is true.

See: https://developer.apple.com/documentation/WebKit/WebFrameView/allowsScrolling

func (WebFrameView) Autorelease

func (w WebFrameView) Autorelease() WebFrameView

Autorelease adds the receiver to the current autorelease pool.

func (WebFrameView) CanPrintHeadersAndFooters

func (w WebFrameView) CanPrintHeadersAndFooters() bool

A Boolean value indicating whether the receiver can print headers and footers.

Discussion

true if the receiver can print headers and footers; otherwise, false.

See: https://developer.apple.com/documentation/WebKit/WebFrameView/canPrintHeadersAndFooters

func (WebFrameView) DocumentView

func (w WebFrameView) DocumentView() appkit.NSView

The subview that displays the web content.

Discussion

Use WebFrameView.AllowsScrolling to enable scrolling of this view.

See: https://developer.apple.com/documentation/WebKit/WebFrameView/documentView

func (WebFrameView) DocumentViewShouldHandlePrint

func (w WebFrameView) DocumentViewShouldHandlePrint() bool

A Boolean value indicating whether the document view should handle a print operation.

Discussion

If this method returns false, the application terminates its print operation and sends printDocumentView() to the web frame view.

See: https://developer.apple.com/documentation/WebKit/WebFrameView/documentViewShouldHandlePrint

func (WebFrameView) Init

func (w WebFrameView) Init() WebFrameView

Init initializes the instance.

func (WebFrameView) SetAllowsScrolling

func (w WebFrameView) SetAllowsScrolling(value bool)

type WebFrameViewClass

type WebFrameViewClass struct {
	// contains filtered or unexported fields
}

func GetWebFrameViewClass

func GetWebFrameViewClass() WebFrameViewClass

GetWebFrameViewClass returns the class object for WebFrameView.

func (WebFrameViewClass) Alloc

func (wc WebFrameViewClass) Alloc() WebFrameView

Alloc allocates memory for a new instance of the class.

func (WebFrameViewClass) Class

func (wc WebFrameViewClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type WebHistory

type WebHistory struct {
	objectivec.Object
}

WebHistory objects are used to maintain the pages visited by users. Visited pages are represented by WebHistoryItem objects. You add and remove history items using the addItems(_:) and removeItems(_:) methods. These methods post appropriate notifications when items are added or removed so you can update the display. WebHistory organizes the WebHistoryItem objects by the day they were visited, ordered from most recent to oldest. You can request all the days that contain history items using the WebHistory.OrderedLastVisitedDays method or request the items visited on a particular day using the orderedItemsLastVisited(onDay:) method. WebHistory objects can be loaded and saved by specifying a file URL (see load(from:)).

Getting Web History Items

Getting and Setting Attributes

See: https://developer.apple.com/documentation/WebKit/WebHistory

func NewWebHistory

func NewWebHistory() WebHistory

NewWebHistory creates a new WebHistory instance.

func WebHistoryFromID

func WebHistoryFromID(id objc.ID) WebHistory

WebHistoryFromID constructs a WebHistory from an objc.ID.

WebHistory objects are used to maintain the pages visited by users. Visited pages are represented by WebHistoryItem objects. You add and remove history items using the addItems(_:) and removeItems(_:) methods. These methods post appropriate notifications when items are added or removed so you can update the display. WebHistory organizes the WebHistoryItem objects by the day they were visited, ordered from most recent to oldest. You can request all the days that contain history items using the WebHistory.OrderedLastVisitedDays method or request the items visited on a particular day using the orderedItemsLastVisited(onDay:) method. WebHistory objects can be loaded and saved by specifying a file URL (see load(from:)).

func (WebHistory) Autorelease

func (w WebHistory) Autorelease() WebHistory

Autorelease adds the receiver to the current autorelease pool.

func (WebHistory) HistoryAgeInDaysLimit

func (w WebHistory) HistoryAgeInDaysLimit() int32

The maximum age of web history items that can be retrieved.

See: https://developer.apple.com/documentation/WebKit/WebHistory/historyAgeInDaysLimit

func (WebHistory) HistoryItemLimit

func (w WebHistory) HistoryItemLimit() int32

The maximum number of web history items that can be stored.

See: https://developer.apple.com/documentation/WebKit/WebHistory/historyItemLimit

func (WebHistory) Init

func (w WebHistory) Init() WebHistory

Init initializes the instance.

func (WebHistory) OrderedLastVisitedDays

func (w WebHistory) OrderedLastVisitedDays() foundation.INSArray

An array of all calendar days represented in the web history.

See: https://developer.apple.com/documentation/WebKit/WebHistory/orderedLastVisitedDays

func (WebHistory) SetHistoryAgeInDaysLimit

func (w WebHistory) SetHistoryAgeInDaysLimit(value int32)

func (WebHistory) SetHistoryItemLimit

func (w WebHistory) SetHistoryItemLimit(value int32)

type WebHistoryClass

type WebHistoryClass struct {
	// contains filtered or unexported fields
}

func GetWebHistoryClass

func GetWebHistoryClass() WebHistoryClass

GetWebHistoryClass returns the class object for WebHistory.

func (WebHistoryClass) Alloc

func (wc WebHistoryClass) Alloc() WebHistory

Alloc allocates memory for a new instance of the class.

func (WebHistoryClass) Class

func (wc WebHistoryClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type WebHistoryItem

type WebHistoryItem struct {
	objectivec.Object
}

WebHistoryItem objects encapsulate information about visiting a page so that users can return to that page. WebHistory and WebBackForwardList objects manage lists of WebHistoryItem objects. WebHistoryItem objects are created and added to these lists automatically when loading pages, so you do not need to create WebHistoryItem objects directly.

Getting URL information

Getting and setting page titles

Getting other attributes

See: https://developer.apple.com/documentation/WebKit/WebHistoryItem

func NewWebHistoryItem

func NewWebHistoryItem() WebHistoryItem

NewWebHistoryItem creates a new WebHistoryItem instance.

func NewWebHistoryItemWithURLStringTitleLastVisitedTimeInterval

func NewWebHistoryItemWithURLStringTitleLastVisitedTimeInterval(URLString string, title string, time foundation.NSTimeInterval) WebHistoryItem

Initializes the receiver with a URL,[URLString], a title specified by `title` and the last time this item was visited specified by `time` title, and time last visited.

Discussion

WebKit normally creates WebHistoryItem objects for you but on occasion you might want to create an item and add it to the WebBackForwardList yourself. Note that when an instance is first initialized the strings returned by WebHistoryItem.URLString and WebHistoryItem.OriginalURLString are the same.

See: https://developer.apple.com/documentation/WebKit/WebHistoryItem/init(urlString:title:lastVisitedTimeInterval:)

func WebHistoryItemFromID

func WebHistoryItemFromID(id objc.ID) WebHistoryItem

WebHistoryItemFromID constructs a WebHistoryItem from an objc.ID.

WebHistoryItem objects encapsulate information about visiting a page so that users can return to that page. WebHistory and WebBackForwardList objects manage lists of WebHistoryItem objects. WebHistoryItem objects are created and added to these lists automatically when loading pages, so you do not need to create WebHistoryItem objects directly.

func (WebHistoryItem) AlternateTitle

func (w WebHistoryItem) AlternateTitle() string

An alternate title that may be used in place of the receiver’s page title.

Discussion

This method returns `nil` if no alternate title exists.

See: https://developer.apple.com/documentation/WebKit/WebHistoryItem/alternateTitle

func (WebHistoryItem) Autorelease

func (w WebHistoryItem) Autorelease() WebHistoryItem

Autorelease adds the receiver to the current autorelease pool.

func (WebHistoryItem) Icon

func (w WebHistoryItem) Icon() appkit.NSImage

The icon for the receiver’s page, or `nil` if none exists.

See: https://developer.apple.com/documentation/WebKit/WebHistoryItem/icon

func (WebHistoryItem) Init

func (w WebHistoryItem) Init() WebHistoryItem

Init initializes the instance.

func (WebHistoryItem) LastVisitedTimeInterval

func (w WebHistoryItem) LastVisitedTimeInterval() foundation.TimeInterval

The last time and date the receiver’s page was visited.

Discussion

The interval is from a reference date as determined by NSDate.

See: https://developer.apple.com/documentation/WebKit/WebHistoryItem/lastVisitedTimeInterval

func (WebHistoryItem) OriginalURLString

func (w WebHistoryItem) OriginalURLString() string

The string representation of the original URL for the receiver’s page.

See: https://developer.apple.com/documentation/WebKit/WebHistoryItem/originalURLString

func (WebHistoryItem) SetAlternateTitle

func (w WebHistoryItem) SetAlternateTitle(value string)

func (WebHistoryItem) Title

func (w WebHistoryItem) Title() string

The receiver’s original page title.

Discussion

The title returned comes from the title HTML tag for HTML documents.

See: https://developer.apple.com/documentation/WebKit/WebHistoryItem/title

func (WebHistoryItem) URLString

func (w WebHistoryItem) URLString() string

The string representation of the URL for the receiver’s page.

Discussion

This URL may differ from the original URL if the page was, for example, redirected to a new location.

See: https://developer.apple.com/documentation/WebKit/WebHistoryItem/urlString

type WebHistoryItemClass

type WebHistoryItemClass struct {
	// contains filtered or unexported fields
}

func GetWebHistoryItemClass

func GetWebHistoryItemClass() WebHistoryItemClass

GetWebHistoryItemClass returns the class object for WebHistoryItem.

func (WebHistoryItemClass) Alloc

Alloc allocates memory for a new instance of the class.

func (WebHistoryItemClass) Class

func (wc WebHistoryItemClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type WebKitErrorCannotFindPlugInConstants added in v0.6.17

type WebKitErrorCannotFindPlugInConstants uint32
const (
	WebKitErrorBlockedPlugInVersion WebKitErrorCannotFindPlugInConstants = 203
	WebKitErrorCannotFindPlugIn     WebKitErrorCannotFindPlugInConstants = 200
	WebKitErrorCannotLoadPlugIn     WebKitErrorCannotFindPlugInConstants = 201
	WebKitErrorJavaUnavailable      WebKitErrorCannotFindPlugInConstants = 202
)

func (WebKitErrorCannotFindPlugInConstants) String added in v0.6.17

type WebKitErrorCannotShowMIMETypeConstants added in v0.6.17

type WebKitErrorCannotShowMIMETypeConstants uint32
const (
	WebKitErrorCannotShowMIMEType                 WebKitErrorCannotShowMIMETypeConstants = 100
	WebKitErrorCannotShowURL                      WebKitErrorCannotShowMIMETypeConstants = 101
	WebKitErrorFrameLoadInterruptedByPolicyChange WebKitErrorCannotShowMIMETypeConstants = 102
)

func (WebKitErrorCannotShowMIMETypeConstants) String added in v0.6.17

type WebMenuItem

type WebMenuItem uint32
const (
	// WebMenuItemPDFActualSize: Display a PDF document at its original size.
	WebMenuItemPDFActualSize WebMenuItem = 24
	// WebMenuItemPDFAutoSize: Display a PDF document at a user-specified size.
	WebMenuItemPDFAutoSize WebMenuItem = 27
	// WebMenuItemPDFContinuous: Display all pages in a PDF document continuously, using a vertical scroll bar, if necessary.
	WebMenuItemPDFContinuous WebMenuItem = 30
	// WebMenuItemPDFFacingPages: Display a PDF document two pages at a time.
	WebMenuItemPDFFacingPages WebMenuItem = 29
	// WebMenuItemPDFNextPage: Display the next page of a PDF document.
	WebMenuItemPDFNextPage WebMenuItem = 31
	// WebMenuItemPDFPreviousPage: Display the previous page of a PDF document.
	WebMenuItemPDFPreviousPage WebMenuItem = 32
	// WebMenuItemPDFSinglePage: Display a PDF document one page at a time.
	WebMenuItemPDFSinglePage WebMenuItem = 28
	// WebMenuItemPDFZoomIn: Scale up a PDF document.
	WebMenuItemPDFZoomIn WebMenuItem = 25
	// WebMenuItemPDFZoomOut: Scale down a PDF document.
	WebMenuItemPDFZoomOut WebMenuItem = 26
	// WebMenuItemTagCopy: Copy the element to the clipboard.
	WebMenuItemTagCopy WebMenuItem = 8
	// WebMenuItemTagCopyImageToClipboard: Copy the image to the clipboard.
	WebMenuItemTagCopyImageToClipboard WebMenuItem = 6
	// WebMenuItemTagCopyLinkToClipboard: Copy the link to the clipboard.
	WebMenuItemTagCopyLinkToClipboard WebMenuItem = 3
	// WebMenuItemTagCut: Cut the currently selected content.
	WebMenuItemTagCut WebMenuItem = 13
	// WebMenuItemTagDownloadImageToDisk: Download the image to disk.
	WebMenuItemTagDownloadImageToDisk WebMenuItem = 5
	// WebMenuItemTagDownloadLinkToDisk: Download the link to a disk.
	WebMenuItemTagDownloadLinkToDisk WebMenuItem = 2
	// WebMenuItemTagGoBack: Load the previous page.
	WebMenuItemTagGoBack WebMenuItem = 9
	// WebMenuItemTagGoForward: Load the next page.
	WebMenuItemTagGoForward WebMenuItem = 10
	// WebMenuItemTagIgnoreSpelling: Ignore the misspelled word.
	WebMenuItemTagIgnoreSpelling WebMenuItem = 17
	// WebMenuItemTagLearnSpelling: Add the misspelled word to the user’s list of acceptable words.
	WebMenuItemTagLearnSpelling WebMenuItem = 18
	// WebMenuItemTagLookUpInDictionary: Look up the current selection in the Dictionary.
	WebMenuItemTagLookUpInDictionary WebMenuItem = 22
	// WebMenuItemTagNoGuessesFound: Indicate whether any suggested spellings for the misspelled word could be found.
	WebMenuItemTagNoGuessesFound WebMenuItem = 16
	// WebMenuItemTagOpenFrameInNewWindow: Open the frame in a new window.
	WebMenuItemTagOpenFrameInNewWindow WebMenuItem = 7
	// WebMenuItemTagOpenImageInNewWindow: Open the image in a new window.
	WebMenuItemTagOpenImageInNewWindow WebMenuItem = 4
	// WebMenuItemTagOpenLinkInNewWindow: Open the link in a new window.
	WebMenuItemTagOpenLinkInNewWindow WebMenuItem = 1
	// WebMenuItemTagOpenWithDefaultApplication: Open the current selection using the default application.
	WebMenuItemTagOpenWithDefaultApplication WebMenuItem = 23
	// WebMenuItemTagOther: Used when a tag for an item in the context menu can’t be determined.
	WebMenuItemTagOther WebMenuItem = 19
	// WebMenuItemTagPaste: Paste the content on the clipboard onto the current selection.
	WebMenuItemTagPaste WebMenuItem = 14
	// WebMenuItemTagReload: Reload the current page.
	WebMenuItemTagReload WebMenuItem = 12
	// WebMenuItemTagSearchInSpotlight: Search SpotLight for the current selection.
	WebMenuItemTagSearchInSpotlight WebMenuItem = 20
	// WebMenuItemTagSearchWeb: Search the web for the current selection.
	WebMenuItemTagSearchWeb WebMenuItem = 21
	// WebMenuItemTagSpellingGuess: Suggest spellings for the misspelled word.
	WebMenuItemTagSpellingGuess WebMenuItem = 15
	// WebMenuItemTagStop: Stop loading the current page.
	WebMenuItemTagStop WebMenuItem = 11
)

func (WebMenuItem) String

func (e WebMenuItem) String() string

type WebNavigationType deprecated

type WebNavigationType int

Deprecated: Deprecated since macOS 10.14. See: https://developer.apple.com/documentation/WebKit/WebNavigationType

const (
	// Deprecated.
	WebNavigationTypeBackForward WebNavigationType = 2
	// Deprecated.
	WebNavigationTypeFormResubmitted WebNavigationType = 4
	// Deprecated.
	WebNavigationTypeFormSubmitted WebNavigationType = 1
	// Deprecated.
	WebNavigationTypeLinkClicked WebNavigationType = 0
	// Deprecated.
	WebNavigationTypeOther WebNavigationType = 5
	// Deprecated.
	WebNavigationTypeReload WebNavigationType = 3
)

func (WebNavigationType) String

func (e WebNavigationType) String() string

type WebOpenPanelResultListener

type WebOpenPanelResultListener interface {
	objectivec.IObject

	// Displays a file open panel and returns the selected filename.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebOpenPanelResultListener/chooseFilename(_:)
	ChooseFilename(fileName string)

	// Displays a file open panel and returns the multiple selected filenames.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebOpenPanelResultListener/chooseFilenames(_:)
	ChooseFilenames(fileNames foundation.INSArray)

	// Invoked when a file open operation was cancelled.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebOpenPanelResultListener/cancel()
	Cancel()
}

WebView user interface delegates that implement the webView:runOpenPanelForFileButtonWithResultListener: method use the methods defined in this protocol to communicate with the listener object. The methods allow the delegate to send a cancel message, or set the selected file name.

See: https://developer.apple.com/documentation/WebKit/WebOpenPanelResultListener

type WebOpenPanelResultListenerObject

type WebOpenPanelResultListenerObject struct {
	objectivec.Object
}

WebOpenPanelResultListenerObject wraps an existing Objective-C object that conforms to the WebOpenPanelResultListener protocol.

func WebOpenPanelResultListenerObjectFromID

func WebOpenPanelResultListenerObjectFromID(id objc.ID) WebOpenPanelResultListenerObject

WebOpenPanelResultListenerObjectFromID constructs a WebOpenPanelResultListenerObject from an objc.ID. The object is determined to conform to the protocol at runtime.

func (WebOpenPanelResultListenerObject) BaseObject

func (WebOpenPanelResultListenerObject) Cancel

Invoked when a file open operation was cancelled.

See: https://developer.apple.com/documentation/WebKit/WebOpenPanelResultListener/cancel()

func (WebOpenPanelResultListenerObject) ChooseFilename

func (o WebOpenPanelResultListenerObject) ChooseFilename(fileName string)

Displays a file open panel and returns the selected filename.

fileName: The selected file name.

See: https://developer.apple.com/documentation/WebKit/WebOpenPanelResultListener/chooseFilename(_:)

func (WebOpenPanelResultListenerObject) ChooseFilenames

func (o WebOpenPanelResultListenerObject) ChooseFilenames(fileNames foundation.INSArray)

Displays a file open panel and returns the multiple selected filenames.

fileNames: An array of selected file names.

See: https://developer.apple.com/documentation/WebKit/WebOpenPanelResultListener/chooseFilenames(_:)

type WebPlugInViewFactory

type WebPlugInViewFactory interface {
	objectivec.IObject
}

WebPlugInViewFactory protocol.

See: https://developer.apple.com/documentation/WebKit/WebPlugInViewFactory

type WebPlugInViewFactoryObject

type WebPlugInViewFactoryObject struct {
	objectivec.Object
}

WebPlugInViewFactoryObject wraps an existing Objective-C object that conforms to the WebPlugInViewFactory protocol.

func WebPlugInViewFactoryObjectFromID

func WebPlugInViewFactoryObjectFromID(id objc.ID) WebPlugInViewFactoryObject

WebPlugInViewFactoryObjectFromID constructs a WebPlugInViewFactoryObject from an objc.ID. The object is determined to conform to the protocol at runtime.

func (WebPlugInViewFactoryObject) BaseObject

type WebPolicyDecisionListener

type WebPolicyDecisionListener interface {
	objectivec.IObject

	// Tells the listener to download the resource instead of displaying it.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebPolicyDecisionListener/download()
	Download()

	// Tells the listener to ignore the resource.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebPolicyDecisionListener/ignore()
	Ignore()

	// Tells the listener to use the resource.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebPolicyDecisionListener/use()
	Use()
}

This protocol enables WebView(<https://developer.apple.com/documentation/WebKit/WebView-swift.class>) policy delegates to communicate with listener objects. A listener object conforming to this protocol is passed as one of the arguments to web view policy delegate methods.

See: https://developer.apple.com/documentation/WebKit/WebPolicyDecisionListener

type WebPolicyDecisionListenerObject

type WebPolicyDecisionListenerObject struct {
	objectivec.Object
}

WebPolicyDecisionListenerObject wraps an existing Objective-C object that conforms to the WebPolicyDecisionListener protocol.

func WebPolicyDecisionListenerObjectFromID

func WebPolicyDecisionListenerObjectFromID(id objc.ID) WebPolicyDecisionListenerObject

WebPolicyDecisionListenerObjectFromID constructs a WebPolicyDecisionListenerObject from an objc.ID. The object is determined to conform to the protocol at runtime.

func (WebPolicyDecisionListenerObject) BaseObject

func (WebPolicyDecisionListenerObject) Download

func (o WebPolicyDecisionListenerObject) Download()

Tells the listener to download the resource instead of displaying it.

Discussion

This method converts a location change that may be in progress to a download operation without having to stop and restart the download. You might invoke this method based on the content’s MIME type.

See: https://developer.apple.com/documentation/WebKit/WebPolicyDecisionListener/download()

func (WebPolicyDecisionListenerObject) Ignore

Tells the listener to ignore the resource.

Discussion

You might invoke this method to handle the resource request yourself. For example, you might want to open a new window, open a window behind the current window, open a URL in an external application, or show a file URL location in the Finder.

See: https://developer.apple.com/documentation/WebKit/WebPolicyDecisionListener/ignore()

func (WebPolicyDecisionListenerObject) Use

Tells the listener to use the resource.

Discussion

If there are pending policy decisions, the next policy delegate method has the opportunity to decide what to do with the resource. This will be either the next navigation policy delegate (if there is a redirect), or the content policy delegate. If there are no pending policy decisions, the resource will be displayed if possible. If there is no document view available to display the resource, then the webView:unableToImplementPolicyWithError:frame: message will be sent to the web view policy delegate with an appropriate error. Invoking this method creates any new windows needed to handle the resource.

See: https://developer.apple.com/documentation/WebKit/WebPolicyDecisionListener/use()

type WebPolicyDelegate

type WebPolicyDelegate interface {
	objectivec.IObject
}

WebPolicyDelegate protocol.

See: https://developer.apple.com/documentation/WebKit/WebPolicyDelegate

type WebPolicyDelegateConfig

type WebPolicyDelegateConfig struct {

	// Instance Methods
	// WebViewUnableToImplementPolicyWithErrorFrame — Handles or drops events that were rejected by a policy maker.
	WebViewUnableToImplementPolicyWithErrorFrame func(webView WebView, error_ foundation.NSError, frame WebFrame)
}

WebPolicyDelegateConfig holds optional typed callbacks for WebPolicyDelegate methods. Set non-nil fields to register the corresponding Objective-C delegate method. Methods with nil callbacks are not registered, so [NSObject.RespondsToSelector] returns false for them — matching the Objective-C delegate pattern exactly.

See Apple Documentation for protocol details.

type WebPolicyDelegateObject

type WebPolicyDelegateObject struct {
	objectivec.Object
}

WebPolicyDelegateObject wraps an existing Objective-C object that conforms to the WebPolicyDelegate protocol.

func NewWebPolicyDelegate

func NewWebPolicyDelegate(config WebPolicyDelegateConfig) WebPolicyDelegateObject

NewWebPolicyDelegate creates an Objective-C object implementing the WebPolicyDelegate protocol.

The object implements only the methods set in config, so [NSObject.RespondsToSelector] reports optional delegate methods accurately. Objects with the same set of methods share one Objective-C class, registered on first use, so creating many of them costs no class or callback registration. The caller owns the returned object; config is dropped when it deallocates.

The returned WebPolicyDelegateObject satisfies the WebPolicyDelegate interface and can be passed directly to SetDelegate and similar methods.

See Apple Documentation for protocol details.

func WebPolicyDelegateObjectFromID

func WebPolicyDelegateObjectFromID(id objc.ID) WebPolicyDelegateObject

WebPolicyDelegateObjectFromID constructs a WebPolicyDelegateObject from an objc.ID. The object is determined to conform to the protocol at runtime.

func (WebPolicyDelegateObject) BaseObject

func (o WebPolicyDelegateObject) BaseObject() objectivec.Object

func (WebPolicyDelegateObject) WebViewDecidePolicyForMIMETypeRequestFrameDecisionListener

func (o WebPolicyDelegateObject) WebViewDecidePolicyForMIMETypeRequestFrameDecisionListener(webView IWebView, type_ string, request foundation.NSURLRequest, frame IWebFrame, listener WebPolicyDecisionListener)

Decides whether to display content with a given MIME type.

webView: The associated web view.

type: The MIME type of the content.

request: The request to load the content.

frame: The frame for displaying the content.

listener: The object that receives the policy decision.

Discussion

This method is invoked during the process of loading content for `request` after the “ method in the WebFrameLoadDelegate protocol is called by the WebView object. The web view implements a policy decision by sending one of the WebPolicyDecisionListener protocol messages to `listener`.

If you do not implement this method, the default behavior is used. The listener is told to ignore the MIME type unless `webView` specifies it can handle the type in its canShowMIMEType(_:) method.

In some rare cases, multiple responses may be received for a single resource. This happens in the case of multipart/x-mixed-replace, also known as a “server push.” In this case, this method will be invoked multiple times.

See: https://developer.apple.com/documentation/WebKit/WebPolicyDelegate/webView(_:decidePolicyForMIMEType:request:frame:decisionListener:)

func (WebPolicyDelegateObject) WebViewDecidePolicyForNavigationActionRequestFrameDecisionListener

func (o WebPolicyDelegateObject) WebViewDecidePolicyForNavigationActionRequestFrameDecisionListener(webView IWebView, actionInformation foundation.INSDictionary, request foundation.NSURLRequest, frame IWebFrame, listener WebPolicyDecisionListener)

Routes a navigation action internally or to an external viewer.

webView: The WebView object for which this object is the policy delegate.

actionInformation: A description of the action that triggered the navigation request. The possible key-value pairs in this dictionary are defined in `Action Dictionary Keys`.

request: The request for which the navigation is made.

frame: The WebFrame object in which the action occurred.

listener: The WebPolicyDecisionListener object that receives the policy decision.

Discussion

This method is invoked when a navigation decision needs to be made. The web view implements a policy decision by sending one of the WebPolicyDecisionListener protocol messages to `listener`. This method is invoked whenever a server redirect is encountered, and before loading starts.

If you do not implement this method, the default behavior is used. The listener handles the navigation internally if the request is for an error page or if the canHandle(_:) method of the [NSURLConnection] class returns true when passed `request`. Otherwise, the listener ignores the navigation, and it is handled externally.

See: https://developer.apple.com/documentation/WebKit/WebPolicyDelegate/webView(_:decidePolicyForNavigationAction:request:frame:decisionListener:)

func (WebPolicyDelegateObject) WebViewDecidePolicyForNewWindowActionRequestNewFrameNameDecisionListener

func (o WebPolicyDelegateObject) WebViewDecidePolicyForNewWindowActionRequestNewFrameNameDecisionListener(webView IWebView, actionInformation foundation.INSDictionary, request foundation.NSURLRequest, frameName string, listener WebPolicyDecisionListener)

Decides whether to allow a targeted navigation event, such as opening a link in a new window.

webView: The WebView object for which this object is the policy delegate.

actionInformation: A description of the action that triggered the navigation request. The possible key-value pairs in this dictionary are defined in `Making content decisions`.

request: The request for which the new window action is performed.

frameName: The name of the new frame that contains the content returned from the request.

listener: The WebPolicyDecisionListener object that receives the policy decision.

Discussion

This method is invoked when a targeted navigation decision needs to be made. A targeted navigation typically opens a new window to display content. The receiver implements a policy decision by sending one of the WebPolicyDecisionListener protocol messages to `listener`. This method allows delegates to modify the behavior of targeted links which normally open a new window. Delegates might do something else, such as download or present the content in a special way. If this method sends [Use] to `listener` then the new window will be opened, and [WebViewDecidePolicyForNavigationActionRequestFrameDecisionListener] will be invoked with a WebNavigationTypeOther as the value for the WebActionNavigationTypeKey key in the action dictionary.

The default behavior sends [Use] to `listener`.

See: https://developer.apple.com/documentation/WebKit/WebPolicyDelegate/webView(_:decidePolicyForNewWindowAction:request:newFrameName:decisionListener:)

func (WebPolicyDelegateObject) WebViewUnableToImplementPolicyWithErrorFrame

func (o WebPolicyDelegateObject) WebViewUnableToImplementPolicyWithErrorFrame(webView IWebView, error_ foundation.NSError, frame IWebFrame)

Handles or drops events that were rejected by a policy maker.

webView: The WebView object for which this object is the policy delegate.

error: The error that occurred.

frame: The frame in which the error occurred.

Discussion

Delegates might implement this method to display or log an error message. If you do not implement this method, no action is taken.

See: https://developer.apple.com/documentation/WebKit/WebPolicyDelegate/webView(_:unableToImplementPolicyWithError:frame:)

type WebPreferences

type WebPreferences struct {
	objectivec.Object
}

WebPreferences encapsulates the preferences you can change per WebView object. These preferences include font, text encoding, and image settings. Normally a WebView object uses the standard preferences returned by the standard() class method. However, you can modify the preferences for individual WebView instances too. Use the WebView.PreferencesIdentifier WebView method to change a WebView object’s preferences, or to share preferences between WebView objects. Use the WebPreferences.Autosaves method to specify if the preferences object should be automatically saved to the user defaults database.

Overview

WebPreferences also manages the font preferences for a web view. You can set custom font families for each of the primary web font styles (standard, serif, sans-serif, cursive, and fantasy) as well as their font sizes. The font size preferences alter the display font sizes in a certain way. If the HTML or CSS in the web view’s content specifies font sizes in a relative fashion (such as `font size=-1` in HTML or `font-medium` in CSS), the default font size settings (set by the font size methods prefaced with “default”) have an effect. They do not have an effect for font sizes specified absolutely. The values specified by the minimum font size settings (set by the font size methods prefaced with “minimum”) override all the HTML and CSS font size definitions, and so have an effect on the entirety of the content. The values specified by the minimum logical font size settings (set by the font size methods prefaced with “minimumLogical”) affect all relative font size declarations for HTML and CSS, but also override any CSS font size declarations in the content, whether they are relative or absolute.

The font size for a web view is different than its logical font size. The minimum logical font size, for example, is the absolute minimum size at which the font will display onscreen. This is meant to be a functional boundary and not a style boundary. For example, the default value for a web view’s minimum logical font size is 9 points, because typical web content looks good in macOS at font sizes of 9 point and above. The constraint assures that web content will always look good in a web view. If you know that your content will look good only at 12 points or above, you should change the minimum font size to 12 points and leave the minimum logical font size alone. This will assure that your content will never display at sizes less than 12 points, but the functional font size boundary of the web view will remain at 9 points to prevent any chance of displaying unnecessarily small text.

Getting the Identifier

Saving Preferences to the User Defaults Database

Enabling Java

Enabling JavaScript

Enabling Plug-ins

Enabling Style Sheets

Getting and Setting Fonts

Getting and Setting Font Sizes

Getting and Setting Text Encoding

Getting and Setting Incremental Rendering

Handling Images

Printing Backgrounds

Enabling Private Browsing

Controlling User Focus

Caching

Instance Properties

See: https://developer.apple.com/documentation/WebKit/WebPreferences

func NewWebPreferences

func NewWebPreferences() WebPreferences

NewWebPreferences creates a new WebPreferences instance.

func NewWebPreferencesWithIdentifier

func NewWebPreferencesWithIdentifier(anIdentifier string) WebPreferences

Returns an initialized WebPreferences object, creating one if it does not exist.

anIdentifier: A unique identifier for the WebPreferences object

Return Value

A newly initialized WebPreferences object with the identifier; if an existing WebPreferences object with that identifier exists, it is returned instead.

Discussion

The `anIdentifier` argument should be unique—it is prepended to the keys used to store the receiver’s attributes in the user defaults database. WebView objects can share a WebPreferences object by using the same preferences identifier.

Typically, you do not invoke this method directly. Instead, you set the preferences identifier by sending a WebView.PreferencesIdentifier message to your WebView object. This method is the designated initializer for the WebPreferences class.

See: https://developer.apple.com/documentation/WebKit/WebPreferences/init(identifier:)

func WebPreferencesFromID

func WebPreferencesFromID(id objc.ID) WebPreferences

WebPreferencesFromID constructs a WebPreferences from an objc.ID.

WebPreferences encapsulates the preferences you can change per WebView object. These preferences include font, text encoding, and image settings. Normally a WebView object uses the standard preferences returned by the standard() class method. However, you can modify the preferences for individual WebView instances too. Use the WebView.PreferencesIdentifier WebView method to change a WebView object’s preferences, or to share preferences between WebView objects. Use the WebPreferences.Autosaves method to specify if the preferences object should be automatically saved to the user defaults database.

func (WebPreferences) AllowsAnimatedImageLooping

func (w WebPreferences) AllowsAnimatedImageLooping() bool

A Boolean that indicates whether or not the receiver allows animated images to loop.

Discussion

true if the web view should loop animated images, false otherwise.

If image looping is disabled, the web view displays it as a static image. The number of times that an image loops is determined by parameters of the image file itself and cannot be set in the web view.

See: https://developer.apple.com/documentation/WebKit/WebPreferences/allowsAnimatedImageLooping

func (WebPreferences) AllowsAnimatedImages

func (w WebPreferences) AllowsAnimatedImages() bool

A Boolean that indicates whether or not the receiver allows animated images.

Discussion

Set to true if the web view should allow animated images, otherwise false.

See: https://developer.apple.com/documentation/WebKit/WebPreferences/allowsAnimatedImages

func (WebPreferences) Autorelease

func (w WebPreferences) Autorelease() WebPreferences

Autorelease adds the receiver to the current autorelease pool.

func (WebPreferences) Autosaves

func (w WebPreferences) Autosaves() bool

A Boolean that indicates whether or not the receiver’s attributes are automatically stored in the user defaults database.

Discussion

true if the receiver’s attributes are automatically stored, false otherwise.

The default value is false.

See: https://developer.apple.com/documentation/WebKit/WebPreferences/autosaves

func (WebPreferences) CacheModel

func (w WebPreferences) CacheModel() WebCacheModel

The cache model for the web views associated with the receiver.

Discussion

Possible values are described in WebCacheModel.

Set this property to optimize WebKit’s cache footprint (on disk and in memory) to best fit the use of the web view. If a web view is used only for a single webpage, use the WebCacheModelDocumentViewer constant instead.

See: https://developer.apple.com/documentation/WebKit/WebPreferences/cacheModel

func (WebPreferences) CursiveFontFamily

func (w WebPreferences) CursiveFontFamily() string

The cursive font family of the web view.

Discussion

This preference affects text whose properties indicate that it should be displayed in a cursive font but do not specify a particular font.

See: https://developer.apple.com/documentation/WebKit/WebPreferences/cursiveFontFamily

func (WebPreferences) DefaultFixedFontSize

func (w WebPreferences) DefaultFixedFontSize() int32

The default fixed font size of the web view.

Discussion

The default font size to use for content displayed in a fixed font if no font size is specified.

See: https://developer.apple.com/documentation/WebKit/WebPreferences/defaultFixedFontSize

func (WebPreferences) DefaultFontSize

func (w WebPreferences) DefaultFontSize() int32

The default font size of the web view.

Discussion

The default font size to use for content displayed in a fixed font if no font size or font family is specified.

The font size specified by `size` should always be greater than zero.

See: https://developer.apple.com/documentation/WebKit/WebPreferences/defaultFontSize

func (WebPreferences) DefaultTextEncodingName

func (w WebPreferences) DefaultTextEncodingName() string

The default text encoding of the web view.

See: https://developer.apple.com/documentation/WebKit/WebPreferences/defaultTextEncodingName

func (WebPreferences) EncodeWithCoder

func (w WebPreferences) EncodeWithCoder(coder foundation.INSCoder)

func (WebPreferences) FantasyFontFamily

func (w WebPreferences) FantasyFontFamily() string

The fantasy font family of the web view.

Discussion

This preference affects text whose properties indicate that it should be displayed in a fantasy font but do not specify a particular font.

See: https://developer.apple.com/documentation/WebKit/WebPreferences/fantasyFontFamily

func (WebPreferences) FixedFontFamily

func (w WebPreferences) FixedFontFamily() string

The fixed font family of the web view.

Discussion

This preference affects text whose properties indicate that it should be displayed in a fixed font but do not specify a particular font.

See: https://developer.apple.com/documentation/WebKit/WebPreferences/fixedFontFamily

func (WebPreferences) Identifier

func (w WebPreferences) Identifier() string

The receiver’s identifier.

See: https://developer.apple.com/documentation/WebKit/WebPreferences/identifier

func (WebPreferences) Init

func (w WebPreferences) Init() WebPreferences

Init initializes the instance.

func (WebPreferences) IsJavaEnabled

func (w WebPreferences) IsJavaEnabled() bool

A Boolean that indicates whether or not the web view allows Java.

Discussion

Set to true to indicate that the web view allows Java, otherwise false.

See: https://developer.apple.com/documentation/WebKit/WebPreferences/isJavaEnabled

func (WebPreferences) IsJavaScriptEnabled

func (w WebPreferences) IsJavaScriptEnabled() bool

A Boolean that indicates whether or not the web view allows JavaScript.

Discussion

Set to true if the web view should allow JavaScript, otherwise false.

See: https://developer.apple.com/documentation/WebKit/WebPreferences/isJavaScriptEnabled

func (WebPreferences) JavaScriptCanOpenWindowsAutomatically

func (w WebPreferences) JavaScriptCanOpenWindowsAutomatically() bool

A Boolean that indicates whether or not the web view allows JavaScript to open windows automatically.

Discussion

Set to true if the web view should allow JavaScript to open windows automatically, otherwise false.

Explicit calls to a JavaScript window opener that are activated by user action (such as a button click) are not affected by this setting.

See: https://developer.apple.com/documentation/WebKit/WebPreferences/javaScriptCanOpenWindowsAutomatically

func (WebPreferences) LoadsImagesAutomatically

func (w WebPreferences) LoadsImagesAutomatically() bool

A Boolean that indicates whether or not the web view allows images to be loaded automatically.

Discussion

true if the web view should allow images to be loaded automatically, otherwise false.

See: https://developer.apple.com/documentation/WebKit/WebPreferences/loadsImagesAutomatically

func (WebPreferences) MinimumFontSize

func (w WebPreferences) MinimumFontSize() int32

The minimum font size of the web view.

Discussion

This sets the minimum display font size for the web view, overriding all content-specified styles, including explicitly specified font sizes.

The font size specified by `size` should always be greater than zero.

See: https://developer.apple.com/documentation/WebKit/WebPreferences/minimumFontSize

func (WebPreferences) MinimumLogicalFontSize

func (w WebPreferences) MinimumLogicalFontSize() int32

The minimum logical font size of the web view.

Discussion

The minimum logical font size is the smallest font size that will display in a web view when the content’s font size is imprecisely specified. This includes content with logical sizes (such as `small`) or with a font size specified as a percentage of the default.

Most clients will not want to use this ; rather, explicitly set the minimum display font size using the WebPreferences.MinimumFontSize property.

The font size specified by `size` should always be greater than zero.

See: https://developer.apple.com/documentation/WebKit/WebPreferences/minimumLogicalFontSize

func (WebPreferences) PlugInsEnabled

func (w WebPreferences) PlugInsEnabled() bool

A Boolean that indicates whether or not the web view allows plug-ins.

Discussion

Set to true if the web view should allow plug-ins, otherwise false.

See: https://developer.apple.com/documentation/WebKit/WebPreferences/arePlugInsEnabled

func (WebPreferences) PrivateBrowsingEnabled

func (w WebPreferences) PrivateBrowsingEnabled() bool

A Boolean that indicates whether or not private browsing is enabled.

Discussion

Private browsing prevents the web view from maintaining any history, cache, or AutoFill information for the pages being visited.

See: https://developer.apple.com/documentation/WebKit/WebPreferences/privateBrowsingEnabled

func (WebPreferences) SansSerifFontFamily

func (w WebPreferences) SansSerifFontFamily() string

The sans serif font family of the web view.

Discussion

This preference affects text whose properties indicate that it should be displayed in a sans-serif font but do not specify a particular font.

See: https://developer.apple.com/documentation/WebKit/WebPreferences/sansSerifFontFamily

func (WebPreferences) SerifFontFamily

func (w WebPreferences) SerifFontFamily() string

The serif font family of the web view.

Discussion

This preference affects text whose properties indicate that it should be displayed in a serif font but do not specify a particular font.

See: https://developer.apple.com/documentation/WebKit/WebPreferences/serifFontFamily

func (WebPreferences) SetAllowsAirPlayForMediaPlayback

func (w WebPreferences) SetAllowsAirPlayForMediaPlayback(value bool)

func (WebPreferences) SetAllowsAnimatedImageLooping

func (w WebPreferences) SetAllowsAnimatedImageLooping(value bool)

func (WebPreferences) SetAllowsAnimatedImages

func (w WebPreferences) SetAllowsAnimatedImages(value bool)

func (WebPreferences) SetAutosaves

func (w WebPreferences) SetAutosaves(value bool)

func (WebPreferences) SetCacheModel

func (w WebPreferences) SetCacheModel(value WebCacheModel)

func (WebPreferences) SetCursiveFontFamily

func (w WebPreferences) SetCursiveFontFamily(value string)

func (WebPreferences) SetDefaultFixedFontSize

func (w WebPreferences) SetDefaultFixedFontSize(value int32)

func (WebPreferences) SetDefaultFontSize

func (w WebPreferences) SetDefaultFontSize(value int32)

func (WebPreferences) SetDefaultTextEncodingName

func (w WebPreferences) SetDefaultTextEncodingName(value string)

func (WebPreferences) SetFantasyFontFamily

func (w WebPreferences) SetFantasyFontFamily(value string)

func (WebPreferences) SetFixedFontFamily

func (w WebPreferences) SetFixedFontFamily(value string)

func (WebPreferences) SetJavaEnabled

func (w WebPreferences) SetJavaEnabled(value bool)

func (WebPreferences) SetJavaScriptCanOpenWindowsAutomatically

func (w WebPreferences) SetJavaScriptCanOpenWindowsAutomatically(value bool)

func (WebPreferences) SetJavaScriptEnabled

func (w WebPreferences) SetJavaScriptEnabled(value bool)

func (WebPreferences) SetLoadsImagesAutomatically

func (w WebPreferences) SetLoadsImagesAutomatically(value bool)

func (WebPreferences) SetMinimumFontSize

func (w WebPreferences) SetMinimumFontSize(value int32)

func (WebPreferences) SetMinimumLogicalFontSize

func (w WebPreferences) SetMinimumLogicalFontSize(value int32)

func (WebPreferences) SetPlugInsEnabled

func (w WebPreferences) SetPlugInsEnabled(value bool)

func (WebPreferences) SetPrivateBrowsingEnabled

func (w WebPreferences) SetPrivateBrowsingEnabled(value bool)

func (WebPreferences) SetSansSerifFontFamily

func (w WebPreferences) SetSansSerifFontFamily(value string)

func (WebPreferences) SetSerifFontFamily

func (w WebPreferences) SetSerifFontFamily(value string)

func (WebPreferences) SetShouldPrintBackgrounds

func (w WebPreferences) SetShouldPrintBackgrounds(value bool)

func (WebPreferences) SetStandardFontFamily

func (w WebPreferences) SetStandardFontFamily(value string)

func (WebPreferences) SetSuppressesIncrementalRendering

func (w WebPreferences) SetSuppressesIncrementalRendering(value bool)
func (w WebPreferences) SetTabsToLinks(value bool)

func (WebPreferences) SetUserStyleSheetEnabled

func (w WebPreferences) SetUserStyleSheetEnabled(value bool)

func (WebPreferences) SetUserStyleSheetLocation

func (w WebPreferences) SetUserStyleSheetLocation(value foundation.NSURL)

func (WebPreferences) SetUsesPageCache

func (w WebPreferences) SetUsesPageCache(value bool)

func (WebPreferences) ShouldPrintBackgrounds

func (w WebPreferences) ShouldPrintBackgrounds() bool

A Boolean that indicates whether or not the web view should include backgrounds when printing.

Discussion

Set to true if the web view should print backgrounds, otherwise false.

See: https://developer.apple.com/documentation/WebKit/WebPreferences/shouldPrintBackgrounds

func (WebPreferences) StandardFontFamily

func (w WebPreferences) StandardFontFamily() string

The standard font family of the web view.

Discussion

This preference affects text whose properties do not indicate that they should be displayed in a particular font or class of fonts (such as sans-serif).

See: https://developer.apple.com/documentation/WebKit/WebPreferences/standardFontFamily

func (WebPreferences) SuppressesIncrementalRendering

func (w WebPreferences) SuppressesIncrementalRendering() bool

A Boolean that indicates whether incremental rendering should be suppressed.

Discussion

Pass true to suppress incremental rendering, or false otherwise.

See: https://developer.apple.com/documentation/WebKit/WebPreferences/suppressesIncrementalRendering

func (w WebPreferences) TabsToLinks() bool

A Boolean that indicates whether or not the tab key will focus links.

true if the user should be able to navigate to links by pressing the tab key, false otherwise.

See: https://developer.apple.com/documentation/WebKit/WebPreferences/tabsToLinks

func (WebPreferences) UserStyleSheetEnabled

func (w WebPreferences) UserStyleSheetEnabled() bool

A Boolean that indicates whether or not user style sheets are enabled in the web view.

Discussion

Set to true if the user style sheets should be enabled in the web view, otherwise false.

See: https://developer.apple.com/documentation/WebKit/WebPreferences/userStyleSheetEnabled

func (WebPreferences) UsesPageCache

func (w WebPreferences) UsesPageCache() bool

A Boolean that indicates whether the web views associated with the receiver should use the shared page cache.

Discussion

true if the web views should use a page cache; otherwise, false.

Pages are cached when they are added to a back-forward list, and removed from the cache when they are removed from a back-forward list. Because the page cache is global, caching a page in one back-forward list may cause a page in another back-forward list to be removed from the cache.

See: https://developer.apple.com/documentation/WebKit/WebPreferences/usesPageCache

type WebPreferencesClass

type WebPreferencesClass struct {
	// contains filtered or unexported fields
}

func GetWebPreferencesClass

func GetWebPreferencesClass() WebPreferencesClass

GetWebPreferencesClass returns the class object for WebPreferences.

func (WebPreferencesClass) Alloc

Alloc allocates memory for a new instance of the class.

func (WebPreferencesClass) Class

func (wc WebPreferencesClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type WebResource

type WebResource struct {
	objectivec.Object
}

A WebResource object represents a downloaded URL. It encapsulates the data of the download as well as other resource properties such as the URL, MIME type, and frame name.

Overview

Use the WebResource.InitWithDataURLMIMETypeTextEncodingNameFrameName method to initialize a newly created WebResource object. Use the other methods in this class to get the properties of a WebResource object.

Initializing

Getting attributes

See: https://developer.apple.com/documentation/WebKit/WebResource

func NewWebResource

func NewWebResource() WebResource

NewWebResource creates a new WebResource instance.

func NewWebResourceWithDataURLMIMETypeTextEncodingNameFrameName

func NewWebResourceWithDataURLMIMETypeTextEncodingNameFrameName(data foundation.NSData, URL foundation.NSURL, MIMEType string, textEncodingName string, frameName string) WebResource

Initializes and returns a web resource instance.

data: The download data.

URL: The download URL.

MIMEType: The MIME type of the data.

textEncodingName: The IANA encoding name (for example, “utf-8” or “utf-16”). This parameter may be `nil`.

frameName: The name of the frame. Use this parameter if the resource represents the contents of an entire HTML frame; otherwise pass `nil`.

Return Value

An initialized web resource.

See: https://developer.apple.com/documentation/WebKit/WebResource/init(data:url:mimeType:textEncodingName:frameName:)

func WebResourceFromID

func WebResourceFromID(id objc.ID) WebResource

WebResourceFromID constructs a WebResource from an objc.ID.

A WebResource object represents a downloaded URL. It encapsulates the data of the download as well as other resource properties such as the URL, MIME type, and frame name.

func (WebResource) Autorelease

func (w WebResource) Autorelease() WebResource

Autorelease adds the receiver to the current autorelease pool.

func (WebResource) Data

func (w WebResource) Data() foundation.NSData

The receiver’s data.

See: https://developer.apple.com/documentation/WebKit/WebResource/data

func (WebResource) EncodeWithCoder

func (w WebResource) EncodeWithCoder(coder foundation.INSCoder)

func (WebResource) FrameName

func (w WebResource) FrameName() string

The name of the frame. If the receiver does not represent the contents of an entire HTML frame, this is `nil`.

See: https://developer.apple.com/documentation/WebKit/WebResource/frameName

func (WebResource) Init

func (w WebResource) Init() WebResource

Init initializes the instance.

func (WebResource) InitWithDataURLMIMETypeTextEncodingNameFrameName

func (w WebResource) InitWithDataURLMIMETypeTextEncodingNameFrameName(data foundation.NSData, URL foundation.NSURL, MIMEType string, textEncodingName string, frameName string) WebResource

Initializes and returns a web resource instance.

data: The download data.

URL: The download URL.

MIMEType: The MIME type of the data.

textEncodingName: The IANA encoding name (for example, “utf-8” or “utf-16”). This parameter may be `nil`.

frameName: The name of the frame. Use this parameter if the resource represents the contents of an entire HTML frame; otherwise pass `nil`.

Return Value

An initialized web resource.

See: https://developer.apple.com/documentation/WebKit/WebResource/init(data:url:mimeType:textEncodingName:frameName:)

func (WebResource) MIMEType

func (w WebResource) MIMEType() string

The receiver’s MIME type.

See: https://developer.apple.com/documentation/WebKit/WebResource/mimeType

func (WebResource) TextEncodingName

func (w WebResource) TextEncodingName() string

The receiver’s text encoding name.

See: https://developer.apple.com/documentation/WebKit/WebResource/textEncodingName

func (WebResource) URL

func (w WebResource) URL() foundation.NSURL

The receiver’s URL.

See: https://developer.apple.com/documentation/WebKit/WebResource/url

type WebResourceClass

type WebResourceClass struct {
	// contains filtered or unexported fields
}

func GetWebResourceClass

func GetWebResourceClass() WebResourceClass

GetWebResourceClass returns the class object for WebResource.

func (WebResourceClass) Alloc

func (wc WebResourceClass) Alloc() WebResource

Alloc allocates memory for a new instance of the class.

func (WebResourceClass) Class

func (wc WebResourceClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type WebResourceLoadDelegate

type WebResourceLoadDelegate interface {
	objectivec.IObject
}

Web view resource load delegates implement this protocol to be notified on the progress of loading individual resources. Note that there can be hundreds of resources, such as images and other media, per page. So, if you just want to get page loading status see the WebFrameLoadDelegate protocol.

See: https://developer.apple.com/documentation/WebKit/WebResourceLoadDelegate

type WebResourceLoadDelegateConfig

type WebResourceLoadDelegateConfig struct {

	// Loading Content
	// WebViewPlugInFailedWithErrorDataSource — Invoked when a plug-in fails to load.
	WebViewPlugInFailedWithErrorDataSource func(sender WebView, error_ foundation.NSError, dataSource WebDataSource)
}

WebResourceLoadDelegateConfig holds optional typed callbacks for WebResourceLoadDelegate methods. Set non-nil fields to register the corresponding Objective-C delegate method. Methods with nil callbacks are not registered, so [NSObject.RespondsToSelector] returns false for them — matching the Objective-C delegate pattern exactly.

See Apple Documentation for protocol details.

type WebResourceLoadDelegateObject

type WebResourceLoadDelegateObject struct {
	objectivec.Object
}

WebResourceLoadDelegateObject wraps an existing Objective-C object that conforms to the WebResourceLoadDelegate protocol.

func NewWebResourceLoadDelegate

func NewWebResourceLoadDelegate(config WebResourceLoadDelegateConfig) WebResourceLoadDelegateObject

NewWebResourceLoadDelegate creates an Objective-C object implementing the WebResourceLoadDelegate protocol.

The object implements only the methods set in config, so [NSObject.RespondsToSelector] reports optional delegate methods accurately. Objects with the same set of methods share one Objective-C class, registered on first use, so creating many of them costs no class or callback registration. The caller owns the returned object; config is dropped when it deallocates.

The returned WebResourceLoadDelegateObject satisfies the WebResourceLoadDelegate interface and can be passed directly to SetDelegate and similar methods.

See Apple Documentation for protocol details.

func WebResourceLoadDelegateObjectFromID

func WebResourceLoadDelegateObjectFromID(id objc.ID) WebResourceLoadDelegateObject

WebResourceLoadDelegateObjectFromID constructs a WebResourceLoadDelegateObject from an objc.ID. The object is determined to conform to the protocol at runtime.

func (WebResourceLoadDelegateObject) BaseObject

func (WebResourceLoadDelegateObject) WebViewIdentifierForInitialRequestFromDataSource

func (o WebResourceLoadDelegateObject) WebViewIdentifierForInitialRequestFromDataSource(sender IWebView, request foundation.NSURLRequest, dataSource IWebDataSource) objectivec.IObject

Returns an identifier object used to track the progress of loading a single resource.

sender: The web view that sent this message.

request: The request that initiated this load for `dataSource`.

dataSource: The data source for this web view.

Return Value

An identifier object that is retained by `sender` and passed as a parameter to all other delegate messages pertaining to this resource.

Discussion

Delegates might implement this method to begin tracking the progress of loading an individual resource. Note that this method is invoked once per load where as the [WebViewResourceWillSendRequestRedirectResponseFromDataSource] method may be invoked multiple times.

See: https://developer.apple.com/documentation/WebKit/WebResourceLoadDelegate/webView(_:identifierForInitialRequest:from:)

func (WebResourceLoadDelegateObject) WebViewPlugInFailedWithErrorDataSource

func (o WebResourceLoadDelegateObject) WebViewPlugInFailedWithErrorDataSource(sender IWebView, error_ foundation.NSError, dataSource IWebDataSource)

Invoked when a plug-in fails to load.

sender: The web view that sent this message.

error: The error that occurred during the process of loading that resource.

The `userInfo` dictionary of `error` may contain additional information about the failure. If the `userInfo` dictionary is not `nil`, it may contain some or all of these key-value pairs. The value of the [NSErrorFailingURLKey] key is a URL string of the [SRC] attribute. The value of the WebKitErrorPlugInNameKey key is a string containing the plug-in’s name. The value for the WebKitErrorPlugInPageURLStringKey key is a URL string of the [PLUGINSPAGE] attribute. The value of the WebKitErrorMIMETypeKey key is a string of the [TYPE] attribute.

dataSource: The data source for this web view.

Discussion

This method might be invoked if a plug-in is not found, fails to load, or is not available for some reason. Delegates might implement this method to display or log a detailed error message. If you do not implement this method, no action is taken.

See: https://developer.apple.com/documentation/WebKit/WebResourceLoadDelegate/webView(_:plugInFailedWithError:dataSource:)

func (WebResourceLoadDelegateObject) WebViewResourceDidCancelAuthenticationChallengeFromDataSource

func (o WebResourceLoadDelegateObject) WebViewResourceDidCancelAuthenticationChallengeFromDataSource(sender IWebView, identifier objectivec.IObject, challenge foundation.NSURLAuthenticationChallenge, dataSource IWebDataSource)

Invoked when an authentication challenge for a resource was canceled.

sender: The web view that sent this message.

identifier: An identifier object used to track the resource being loaded by `dataSource`.

challenge: The authentication challenge that was canceled.

dataSource: The data source for this web view.

See: https://developer.apple.com/documentation/WebKit/WebResourceLoadDelegate/webView(_:resource:didCancel:from:)

func (WebResourceLoadDelegateObject) WebViewResourceDidFailLoadingWithErrorFromDataSource

func (o WebResourceLoadDelegateObject) WebViewResourceDidFailLoadingWithErrorFromDataSource(sender IWebView, identifier objectivec.IObject, error_ foundation.NSError, dataSource IWebDataSource)

Invoked when a resource failed to load.

sender: The web view that sent this message.

identifier: An identifier object used to track the resource being loaded by `dataSource`.

error: The error that occurred loading that resource.

dataSource: The data source for this web view.

Discussion

Delegates might implement this method to display or log a detailed error message.

See: https://developer.apple.com/documentation/WebKit/WebResourceLoadDelegate/webView(_:resource:didFailLoadingWithError:from:)

func (WebResourceLoadDelegateObject) WebViewResourceDidFinishLoadingFromDataSource

func (o WebResourceLoadDelegateObject) WebViewResourceDidFinishLoadingFromDataSource(sender IWebView, identifier objectivec.IObject, dataSource IWebDataSource)

Invoked when all of the data for a given resource is loaded.

sender: The web view that sent this message.

identifier: An identifier object used to track the resource being loaded by `dataSource`.

dataSource: The data source for this web view.

Discussion

The `identifier` parameter is used to track the resource being loaded by `dataSource`. Delegates might implement this method to update the load status of an individual resource.

See: https://developer.apple.com/documentation/WebKit/WebResourceLoadDelegate/webView(_:resource:didFinishLoadingFrom:)

func (WebResourceLoadDelegateObject) WebViewResourceDidReceiveAuthenticationChallengeFromDataSource

func (o WebResourceLoadDelegateObject) WebViewResourceDidReceiveAuthenticationChallengeFromDataSource(sender IWebView, identifier objectivec.IObject, challenge foundation.NSURLAuthenticationChallenge, dataSource IWebDataSource)

Invoked when an authentication challenge has been received for a resource.

sender: The web view that sent this message.

identifier: An identifier object used to track the resource being loaded by `dataSource`.

challenge: The authentication challenge that was received.

dataSource: The data source for this web view.

See: https://developer.apple.com/documentation/WebKit/WebResourceLoadDelegate/webView(_:resource:didReceive:from:)-54xbd

func (WebResourceLoadDelegateObject) WebViewResourceDidReceiveContentLengthFromDataSource

func (o WebResourceLoadDelegateObject) WebViewResourceDidReceiveContentLengthFromDataSource(sender IWebView, identifier objectivec.IObject, length int, dataSource IWebDataSource)

Invoked when some of the data for a given resource has arrived.

sender: The web view that sent this message.

identifier: An identifier object used to track the resource being loaded by `dataSource`.

length: The amount of incremental data received for this resource—the amount of data loaded since the last time this method was invoked for this resource, not the total amount received for this resource.

The `length` parameter type was changed from type `unsigned int` to type [NSUInteger] in OS X v10.5.

dataSource: The data source for this web view.

Discussion

Delegates might implement this method to update the load status of an individual resource.

See: https://developer.apple.com/documentation/WebKit/WebResourceLoadDelegate/webView(_:resource:didReceiveContentLength:from:)

func (WebResourceLoadDelegateObject) WebViewResourceDidReceiveResponseFromDataSource

func (o WebResourceLoadDelegateObject) WebViewResourceDidReceiveResponseFromDataSource(sender IWebView, identifier objectivec.IObject, response foundation.NSURLResponse, dataSource IWebDataSource)

Invoked after a resource has been loaded.

sender: The web view that sent this message.

identifier: An identifier object used to track the resource being loaded by `dataSource`.

response: The reply that was received.

dataSource: The data source for this web view.

Discussion

In some rare cases, multiple responses may be received for a single resource. This happens in the case of multipart/x-mixed-replace, also known as a server push. In this case, delegates should assume that the progress of loading this resource restarts, and the expected content length may change.

See: https://developer.apple.com/documentation/WebKit/WebResourceLoadDelegate/webView(_:resource:didReceive:from:)-22bdg

func (WebResourceLoadDelegateObject) WebViewResourceWillSendRequestRedirectResponseFromDataSource

func (o WebResourceLoadDelegateObject) WebViewResourceWillSendRequestRedirectResponseFromDataSource(sender IWebView, identifier objectivec.IObject, request foundation.NSURLRequest, redirectResponse foundation.NSURLResponse, dataSource IWebDataSource) foundation.NSURLRequest

Invoked before a request is initiated for a resource and returns a possibly modified request.

sender: The web view that sent this message.

identifier: An identifier object used to track the resource being loaded by `dataSource`.

request: The request that is sent.

redirectResponse: The redirect server response. If `nil`, there is no redirect in progress.

dataSource: The data source for this web view.

Return Value

A possibly modified request.

Discussion

Delegates might implement this method to modify resource requests before they are sent. Note that this method might be invoked multiple times per load (as a result of a server redirect) where as the [WebViewIdentifierForInitialRequestFromDataSource] method is invoked once.

See: https://developer.apple.com/documentation/WebKit/WebResourceLoadDelegate/webView(_:resource:willSend:redirectResponse:from:)

type WebScriptObject

type WebScriptObject struct {
	objectivec.Object
}

A WebScriptObject object is an Objective-C wrapper for a scripting object passed to your application from the scripting environment.

Overview

You can not create a WebScriptObject object directly. You get a window WebScriptObject object by sending WebView.WindowScriptObject to your WebView object.

You can use key-value coding methods—for example, “ and “—to get and set properties of a WebScriptObject object. You can also access properties by index using the setWebScriptValueAt(_:value:) and webScriptValue(at:) methods. Use the removeWebScriptKey(_:) method to remove a scripting object property.

Not all properties and methods of a class are exported. Use the setValue(_:forUndefinedKey:) and value(forUndefinedKey:) methods to intercept access to properties that are not exported. Similarly, use the invokeUndefinedMethod(fromWebScript:withArguments:) method to intercept method invocations that are not exported.

If you want access to properties and methods defined in your own classes, use the methods in the WebScripting informal protocol to specify the properties and methods the class should export to WebKit’s JavaScript environment.

Use the callWebScriptMethod(_:withArguments:) and evaluateWebScript(_:) methods to execute scripts in the scripting environment.

See: https://developer.apple.com/documentation/WebKit/WebScriptObject

func NewWebScriptObject

func NewWebScriptObject() WebScriptObject

NewWebScriptObject creates a new WebScriptObject instance.

func WebScriptObjectFromID

func WebScriptObjectFromID(id objc.ID) WebScriptObject

WebScriptObjectFromID constructs a WebScriptObject from an objc.ID.

A WebScriptObject object is an Objective-C wrapper for a scripting object passed to your application from the scripting environment.

func (WebScriptObject) Autorelease

func (w WebScriptObject) Autorelease() WebScriptObject

Autorelease adds the receiver to the current autorelease pool.

func (WebScriptObject) Init

Init initializes the instance.

func (WebScriptObject) SetValueForKey

func (w WebScriptObject) SetValueForKey(value objectivec.IObject, key string)

Sets the value of the property identified by the given key. [Full Topic]

func (WebScriptObject) ValueForKey

func (w WebScriptObject) ValueForKey(key string) objectivec.IObject

Returns the value of the property identified by the given key. [Full Topic]

type WebScriptObjectClass

type WebScriptObjectClass struct {
	// contains filtered or unexported fields
}

func GetWebScriptObjectClass

func GetWebScriptObjectClass() WebScriptObjectClass

GetWebScriptObjectClass returns the class object for WebScriptObject.

func (WebScriptObjectClass) Alloc

Alloc allocates memory for a new instance of the class.

func (WebScriptObjectClass) Class

func (wc WebScriptObjectClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type WebUIDelegate

type WebUIDelegate interface {
	objectivec.IObject

	// Returns a web view window’s content rectangle.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebUIDelegate/webViewContentRect:
	WebViewContentRect(sender IWebView) corefoundation.CGRect

	// Displays a JavaScript alert panel.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebUIDelegate/webView:runJavaScriptAlertPanelWithMessage:
	WebViewRunJavaScriptAlertPanelWithMessage(sender IWebView, message string)

	// Displays a JavaScript confirm panel.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebUIDelegate/webView:runJavaScriptConfirmPanelWithMessage:
	WebViewRunJavaScriptConfirmPanelWithMessage(sender IWebView, message string) bool

	// Displays a JavaScript text input panel and returns the entered text.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebUIDelegate/webView:runJavaScriptTextInputPanelWithPrompt:defaultText:
	WebViewRunJavaScriptTextInputPanelWithPromptDefaultText(sender IWebView, prompt string, defaultText string) string

	// Sets the window’s content view frame to the specified content rectangle.
	//
	// See: https://developer.apple.com/documentation/WebKit/WebUIDelegate/webView:setContentRect:
	WebViewSetContentRect(sender IWebView, frame corefoundation.CGRect)
}

Web view user interface delegates implement this protocol to control the opening of new windows, augment the behavior of default menu items displayed when the user clicks elements, and perform other user interface–related tasks. These methods can be invoked as a result of handling JavaScript or other plug-in content. Delegates that display more than one web view per window, for example, need to implement some of these methods to handle that case. The default implementation assumes one window per web view, so non-conventional user interfaces might implement a user interface delegate.

See: https://developer.apple.com/documentation/WebKit/WebUIDelegate

type WebUIDelegateConfig

type WebUIDelegateConfig struct {

	// Creating and Closing Windows
	// WebViewRunModal — Displays a web view in a modal window.
	WebViewRunModal func(sender WebView)
	// WebViewClose — Closes a web view in a window.
	WebViewClose func(sender WebView)

	// Moving and Resizing Windows
	// WebViewIsResizable — Returns a Boolean value indicating whether a web view’s window can be resized.
	WebViewIsResizable func(sender WebView) bool
	// WebViewSetResizable — Sets whether a web view’s window can be resized.
	WebViewSetResizable func(sender WebView, resizable bool)

	// Making Windows Key and Main
	// WebViewFocus — Brings a web view’s window to the front and makes it the active window.
	WebViewFocus func(sender WebView)
	// WebViewUnfocus — Relinquishes focus on a web view’s window.
	WebViewUnfocus func(sender WebView)

	// Ordering Windows
	// WebViewShow — Displays a web view’s window and moves it to the front.
	WebViewShow func(sender WebView)

	// Working with the Responder Chain
	// WebViewFirstResponder — Returns the first responder of the web view’s window.
	WebViewFirstResponder func(sender WebView) appkit.NSResponder
	// WebViewMakeFirstResponder — Sets the first responder of a web view’s window to the specified view.
	WebViewMakeFirstResponder func(sender WebView, responder appkit.NSResponder)

	// Handling Mouse Events
	// WebViewMouseDidMoveOverElementModifierFlags — Updates information about the element the user is mousing over.
	WebViewMouseDidMoveOverElementModifierFlags func(sender WebView, elementInformation foundation.INSDictionary, modifierFlags uint)
	// WebViewContextMenuItemsForElementDefaultMenuItems — Returns menu items to display in an element’s contextual menu.
	WebViewContextMenuItemsForElementDefaultMenuItems func(sender WebView, element foundation.INSDictionary, defaultMenuItems foundation.INSArray) foundation.INSArray

	// Managing Toolbars and the Status Bar
	// WebViewAreToolbarsVisible — Returns a Boolean value indicating whether any toolbars are visible in a web view’s window.
	WebViewAreToolbarsVisible func(sender WebView) bool
	// WebViewSetToolbarsVisible — Sets whether a web view’s toolbars should be visible.
	WebViewSetToolbarsVisible func(sender WebView, visible bool)
	// WebViewIsStatusBarVisible — Returns a Boolean value indicating whether the status bar in a web view’s window is visible.
	WebViewIsStatusBarVisible func(sender WebView) bool
	// WebViewSetStatusBarVisible — Sets the visibility of the status bar in a web view’s window.
	WebViewSetStatusBarVisible func(sender WebView, visible bool)

	// Other Methods
	// WebViewCreateWebViewModalDialogWithRequest — Creates a modal window containing a web view that loads the specified request.
	WebViewCreateWebViewModalDialogWithRequest func(sender WebView, request foundation.NSURLRequest) WebView
	// WebViewCreateWebViewWithRequest — Creates a window containing a web view to load the specified request.
	WebViewCreateWebViewWithRequest func(sender WebView, request foundation.NSURLRequest) WebView
	// WebViewDragDestinationActionMaskForDraggingInfo — Returns a mask indicating which drag operations are allowed by the sender.
	WebViewDragDestinationActionMaskForDraggingInfo func(webView WebView, draggingInfo appkit.NSDraggingInfo) uint
	// WebViewWillPerformDragDestinationActionForDraggingInfo — Tells the receiver that the sending web view will perform the specified drag-destination action.
	WebViewWillPerformDragDestinationActionForDraggingInfo func(webView WebView, action WebDragDestinationAction, draggingInfo appkit.NSDraggingInfo)
	// WebViewValidateUserInterfaceItemDefaultValidation — Returns a Boolean value that indicates whether the specified user interface item is valid.
	WebViewValidateUserInterfaceItemDefaultValidation func(webView WebView, item appkit.NSValidatedUserInterfaceItem, defaultValidation bool) bool
	// WebViewPrintFrameView — Prints the contents of a web frame view.
	WebViewPrintFrameView func(sender WebView, frameView WebFrameView)
}

WebUIDelegateConfig holds optional typed callbacks for WebUIDelegate methods. Set non-nil fields to register the corresponding Objective-C delegate method. Methods with nil callbacks are not registered, so [NSObject.RespondsToSelector] returns false for them — matching the Objective-C delegate pattern exactly.

See Apple Documentation for protocol details.

type WebUIDelegateObject

type WebUIDelegateObject struct {
	objectivec.Object
}

WebUIDelegateObject wraps an existing Objective-C object that conforms to the WebUIDelegate protocol.

func NewWebUIDelegate

func NewWebUIDelegate(config WebUIDelegateConfig) WebUIDelegateObject

NewWebUIDelegate creates an Objective-C object implementing the WebUIDelegate protocol.

The object implements only the methods set in config, so [NSObject.RespondsToSelector] reports optional delegate methods accurately. Objects with the same set of methods share one Objective-C class, registered on first use, so creating many of them costs no class or callback registration. The caller owns the returned object; config is dropped when it deallocates.

The returned WebUIDelegateObject satisfies the WebUIDelegate interface and can be passed directly to SetDelegate and similar methods.

See Apple Documentation for protocol details.

func WebUIDelegateObjectFromID

func WebUIDelegateObjectFromID(id objc.ID) WebUIDelegateObject

WebUIDelegateObjectFromID constructs a WebUIDelegateObject from an objc.ID. The object is determined to conform to the protocol at runtime.

func (WebUIDelegateObject) BaseObject

func (o WebUIDelegateObject) BaseObject() objectivec.Object

func (WebUIDelegateObject) WebViewAreToolbarsVisible

func (o WebUIDelegateObject) WebViewAreToolbarsVisible(sender IWebView) bool

Returns a Boolean value indicating whether any toolbars are visible in a web view’s window.

sender: The web view that sent the message.

Return Value

true if a web view’s window has any toolbars that are currently visible (other than the status bar); otherwise, false.

See: https://developer.apple.com/documentation/WebKit/WebUIDelegate/webViewAreToolbarsVisible(_:)

func (WebUIDelegateObject) WebViewClose

func (o WebUIDelegateObject) WebViewClose(sender IWebView)

Closes a web view in a window.

sender: The web view that sent the message.

Discussion

If you display multiple web views in a window then you might want to close only `sender` in your implementation. By default, this method sends the close() method to the NSWindow object that contains `sender`.

See: https://developer.apple.com/documentation/WebKit/WebUIDelegate/webViewClose(_:)

func (WebUIDelegateObject) WebViewContentRect

func (o WebUIDelegateObject) WebViewContentRect(sender IWebView) corefoundation.CGRect

Returns a web view window’s content rectangle.

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.

See: https://developer.apple.com/documentation/WebKit/WebUIDelegate/webViewContentRect:

func (WebUIDelegateObject) WebViewContextMenuItemsForElementDefaultMenuItems

func (o WebUIDelegateObject) WebViewContextMenuItemsForElementDefaultMenuItems(sender IWebView, element foundation.INSDictionary, defaultMenuItems foundation.INSArray) foundation.INSArray

Returns menu items to display in an element’s contextual menu.

sender: The web view that sent the message.

element: A dictionary that describes the element that was clicked. See “Constants” in WebView for information about the key-value pairs in this dictionary.

defaultMenuItems: The menu items included by default in the element’s contextual menu. See Menu Item Tags for values you can use to differentiate among specific menu items.

Return Value

An array of menu items to display in the element’s contextual menu.

Discussion

This method is invoked every time the user clicks the right mouse button, or control-clicks, on an element to reveal a contextual menu. The receiver typically returns a modified copy of the default menu items dictionary, adding and removing menu items as appropriate for this type of element. You can use this mechanism to remove items that are not appropriate for a particular environment or task, such as saving files to the desktop in a web kiosk. You do not need to set the actions and targets of the default items.

See: https://developer.apple.com/documentation/WebKit/WebUIDelegate/webView(_:contextMenuItemsForElement:defaultMenuItems:)

func (WebUIDelegateObject) WebViewCreateWebViewModalDialogWithRequest

func (o WebUIDelegateObject) WebViewCreateWebViewModalDialogWithRequest(sender IWebView, request foundation.NSURLRequest) IWebView

Creates a modal window containing a web view that loads the specified request.

sender: The web view that sent the message.

request: The request to load.

Return Value

The web view that is loading the specified request.

Discussion

This method is invoked when JavaScript calls `window.ShowModalDialog()`. It should create a new modal window containing the web view and initially hide the window. The [WebViewRunModal] message is sent to the delegate to display the web view.

See: https://developer.apple.com/documentation/WebKit/WebUIDelegate/webView(_:createWebViewModalDialogWith:)

func (WebUIDelegateObject) WebViewCreateWebViewWithRequest

func (o WebUIDelegateObject) WebViewCreateWebViewWithRequest(sender IWebView, request foundation.NSURLRequest) IWebView

Creates a window containing a web view to load the specified request.

sender: The web view that sent the message.

request: The request to load.

Return Value

The web view that is loading the request.

Discussion

This method should begin loading the content for the specified request by sending load(_:) to its main frame. The new window should initially be hidden. Later, a [WebViewShow] message is sent to the delegate of the new web view. By default, this method returns `nil`.

See: https://developer.apple.com/documentation/WebKit/WebUIDelegate/webView(_:createWebViewWith:)

func (WebUIDelegateObject) WebViewDragDestinationActionMaskForDraggingInfo

func (o WebUIDelegateObject) WebViewDragDestinationActionMaskForDraggingInfo(webView IWebView, draggingInfo appkit.NSDraggingInfo) uint

Returns a mask indicating which drag operations are allowed by the sender.

webView: The web view that sent the message.

draggingInfo: The information object for the dragging operation.

Return Value

A mask that indicates which drag operations are allowed when content is dragged over the sending web view. (Note that the return value changed from an `unsigned int` to an [NSUInteger] in OS X v10.5.) See WebDragDestinationAction for a list of return values.

Discussion

This method can be invoked multiple times while content is dragged over the sending web view. When the content is dropped, the web view sends a notification ([WebViewWillPerformDragDestinationActionForDraggingInfo]) to the receiver.

If you do not implement this method, it returns WebDragDestinationActionAny by default.

See: https://developer.apple.com/documentation/WebKit/WebUIDelegate/webView(_:dragDestinationActionMaskFor:)

func (WebUIDelegateObject) WebViewDragSourceActionMaskForPoint

func (o WebUIDelegateObject) WebViewDragSourceActionMaskForPoint(webView IWebView, point corefoundation.CGPoint) uint

Returns a mask indicating which drag-source actions are allowed for a drag that begins at the specified location.

webView: The web view that sent the message.

point: The point at which the drag began, specified in the coordinates of the web view.

Return Value

A mask indicating which drag-source actions are allowed. (Note that the return value changed from an `unsigned int` to an [NSUInteger] in OS X v10.5.) See WebDragSourceAction for a list of return values.

Discussion

This method is called after the user has begun a drag from a point in a web view. This method can be invoked multiple times while content is dragged from the sending web view. When the content is dropped, the sender sends [WebViewWillPerformDragSourceActionFromPointWithPasteboard] to the receiver.

If you do not implement this method, it returns `(WebDragSourceActionAny & ~WebDragSourceActionLink)` if the cursor is in an editable part of the web view; otherwise, it returns WebDragDestinationActionAny.

See: https://developer.apple.com/documentation/WebKit/WebUIDelegate/webView(_:dragSourceActionMaskFor:)

func (WebUIDelegateObject) WebViewDrawFooterInRect

func (o WebUIDelegateObject) WebViewDrawFooterInRect(sender IWebView, rect corefoundation.CGRect)

Draws the web view’s footer in the specified rectangle.

sender: The web view that sent the message.

rect: The rectangle reserved for drawing the footer.

See: https://developer.apple.com/documentation/WebKit/WebUIDelegate/webView(_:drawFooterIn:)

func (WebUIDelegateObject) WebViewDrawHeaderInRect

func (o WebUIDelegateObject) WebViewDrawHeaderInRect(sender IWebView, rect corefoundation.CGRect)

Draws the web view’s header in the specified rectangle.

sender: The web view that sent the message.

rect: The rectangle reserved for drawing the header.

See: https://developer.apple.com/documentation/WebKit/WebUIDelegate/webView(_:drawHeaderIn:)

func (WebUIDelegateObject) WebViewFirstResponder

func (o WebUIDelegateObject) WebViewFirstResponder(sender IWebView) appkit.NSResponder

Returns the first responder of the web view’s window.

sender: The web view that sent the message.

Return Value

The view or subview that currently has the input focus. It can return `nil` or the default first responder if the sender is not attached to a window or if another view (not in the window) has the focus.

See: https://developer.apple.com/documentation/WebKit/WebUIDelegate/webViewFirstResponder(_:)

func (WebUIDelegateObject) WebViewFocus

func (o WebUIDelegateObject) WebViewFocus(sender IWebView)

Brings a web view’s window to the front and makes it the active window.

sender: The web view that sent the message.

Discussion

By default, this method brings a web view’s window into focus. If you display multiple web views in a window then you might also want to focus the input on `sender`, using [WebViewMakeFirstResponder].

See: https://developer.apple.com/documentation/WebKit/WebUIDelegate/webViewFocus(_:)

func (WebUIDelegateObject) WebViewFooterHeight

func (o WebUIDelegateObject) WebViewFooterHeight(sender IWebView) float32

Returns the height of the web view’s printed page footer.

sender: The web view that sent the message.

Return Value

The height of the web view’s printed page footer. Returns `0.0` if no space is reserved for the footer.

Discussion

The height returned by this method is used to calculate the rectangle passed to the [WebViewDrawFooterInRect] method.

See: https://developer.apple.com/documentation/WebKit/WebUIDelegate/webViewFooterHeight(_:)

func (WebUIDelegateObject) WebViewFrame

func (o WebUIDelegateObject) WebViewFrame(sender IWebView) corefoundation.CGRect

Returns the frame rectangle of a web view’s window.

sender: The web view that sent the message.

Return Value

The frame rectangle of the web view’s window.

See: https://developer.apple.com/documentation/WebKit/WebUIDelegate/webViewFrame(_:)

func (WebUIDelegateObject) WebViewHeaderHeight

func (o WebUIDelegateObject) WebViewHeaderHeight(sender IWebView) float32

Returns the height of the web view’s printed page header.

sender: The web view that sent the message.

Return Value

The height of the web view’s printed page header. Returns `0.0` if no space is reserved for the header.

Discussion

The height returned by this method is used to calculate the rectangle passed to the [WebViewDrawHeaderInRect] method.

See: https://developer.apple.com/documentation/WebKit/WebUIDelegate/webViewHeaderHeight(_:)

func (WebUIDelegateObject) WebViewIsResizable

func (o WebUIDelegateObject) WebViewIsResizable(sender IWebView) bool

Returns a Boolean value indicating whether a web view’s window can be resized.

sender: The web view that sent the message.

Return Value

true if the web view’s window can be resized; otherwise, false.

Discussion

If you display multiple web views in a window then your user interface delegate should implement this method to handle this special case.

See: https://developer.apple.com/documentation/WebKit/WebUIDelegate/webViewIsResizable(_:)

func (WebUIDelegateObject) WebViewIsStatusBarVisible

func (o WebUIDelegateObject) WebViewIsStatusBarVisible(sender IWebView) bool

Returns a Boolean value indicating whether the status bar in a web view’s window is visible.

sender: The web view that sent the message.

Return Value

true if a web view’s status bar (if any) is visible; otherwise, false.

Discussion

If you do not implement this method, it returns false by default.

See: https://developer.apple.com/documentation/WebKit/WebUIDelegate/webViewIsStatusBarVisible(_:)

func (WebUIDelegateObject) WebViewMakeFirstResponder

func (o WebUIDelegateObject) WebViewMakeFirstResponder(sender IWebView, responder appkit.NSResponder)

Sets the first responder of a web view’s window to the specified view.

sender: The web view that sent the message.

responder: A view in the web view’s hierarchy.

Discussion

You can ignore this message if `sender` is not yet attached to a window.

See: https://developer.apple.com/documentation/WebKit/WebUIDelegate/webView(_:makeFirstResponder:)

func (WebUIDelegateObject) WebViewMouseDidMoveOverElementModifierFlags

func (o WebUIDelegateObject) WebViewMouseDidMoveOverElementModifierFlags(sender IWebView, elementInformation foundation.INSDictionary, modifierFlags uint)

Updates information about the element the user is mousing over.

sender: The web view that sent the message.

elementInformation: A dictionary that describes the element under the mouse, or `nil`. See “Constants” in WebView for information about the key-value pairs in this dictionary.

modifierFlags: An integer bit field that indicates the modifier keys in effect during the event. See “Modifier Flags” in NSEvent for information about possible modifiers. Note that this parameter was changed from an `unsigned int` to an [NSUInteger] in OS X v10.5.

See: https://developer.apple.com/documentation/WebKit/WebUIDelegate/webView(_:mouseDidMoveOverElement:modifierFlags:)

func (WebUIDelegateObject) WebViewPrintFrameView

func (o WebUIDelegateObject) WebViewPrintFrameView(sender IWebView, frameView IWebFrameView)

Prints the contents of a web frame view.

sender: The web view that sent the message.

frameView: The web frame view whose contents to print.

Discussion

This method is invoked when a script or a user wants to print a webpage. Typically, the delegate implements this method to prepare the web frame view content for printing. The web frame view can handle some content without intervention by the delegate. Send the WebFrameView.DocumentViewShouldHandlePrint message to the web frame view to determine if it can handle printing. If this method returns true, then the delegate can print the content by sending the printDocumentView() message to the web frame view. Otherwise, the delegate can use printOperation(with:) to get an NSPrintOperation object to print the web frame view.

See: https://developer.apple.com/documentation/WebKit/WebUIDelegate/webView(_:print:)

func (WebUIDelegateObject) WebViewRunBeforeUnloadConfirmPanelWithMessageInitiatedByFrame

func (o WebUIDelegateObject) WebViewRunBeforeUnloadConfirmPanelWithMessageInitiatedByFrame(sender IWebView, message string, frame IWebFrame) bool

Displays a confirmation panel containing the specified message before a window closes.

sender: The web view that sent the message.

message: The message to display in the panel.

frame: The web frame whose JavaScript initiated this call.

Return Value

true if the user clicked the OK button; otherwise, false.

Discussion

Use this method to include a message in the confirmation panel in addition to the message supplied by the webpage. The confirmation panel should contain OK and Cancel buttons.

See: https://developer.apple.com/documentation/WebKit/WebUIDelegate/webView(_:runBeforeUnloadConfirmPanelWithMessage:initiatedBy:)

func (WebUIDelegateObject) WebViewRunJavaScriptAlertPanelWithMessage

func (o WebUIDelegateObject) WebViewRunJavaScriptAlertPanelWithMessage(sender IWebView, message string)

Displays a JavaScript alert panel.

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.

See: https://developer.apple.com/documentation/WebKit/WebUIDelegate/webView:runJavaScriptAlertPanelWithMessage:

func (WebUIDelegateObject) WebViewRunJavaScriptAlertPanelWithMessageInitiatedByFrame

func (o WebUIDelegateObject) WebViewRunJavaScriptAlertPanelWithMessageInitiatedByFrame(sender IWebView, message string, frame IWebFrame)

Displays a JavaScript alert panel containing the specified message.

sender: The web view that sent the message.

message: The message to display in the alert panel.

frame: The web frame whose JavaScript initiated this call.

Discussion

This method displays an alert panel when JavaScript code calls `alert`. Delegates should visually indicate that this panel comes from JavaScript. The panel should contain a single OK button. No action is taken if you do not implement this method.

See: https://developer.apple.com/documentation/WebKit/WebUIDelegate/webView(_:runJavaScriptAlertPanelWithMessage:initiatedBy:)

func (WebUIDelegateObject) WebViewRunJavaScriptConfirmPanelWithMessage

func (o WebUIDelegateObject) WebViewRunJavaScriptConfirmPanelWithMessage(sender IWebView, message string) bool

Displays a JavaScript confirm panel.

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 true if confirmed, false 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.

See: https://developer.apple.com/documentation/WebKit/WebUIDelegate/webView:runJavaScriptConfirmPanelWithMessage:

func (WebUIDelegateObject) WebViewRunJavaScriptConfirmPanelWithMessageInitiatedByFrame

func (o WebUIDelegateObject) WebViewRunJavaScriptConfirmPanelWithMessageInitiatedByFrame(sender IWebView, message string, frame IWebFrame) bool

Displays a JavaScript confirmation panel with the specified message.

sender: The web view that sent the message.

message: The message to display in the confirmation panel.

frame: The web frame whose JavaScript initiated this call.

Return Value

true if the user clicks OK; otherwise, false.

Discussion

This method displays a confirmation panel when JavaScript code calls `confirm`. Delegates should visually indicate that this panel comes from JavaScript. The panel should contain an OK and a Cancel button. No action is taken if you do not implement this method.

See: https://developer.apple.com/documentation/WebKit/WebUIDelegate/webView(_:runJavaScriptConfirmPanelWithMessage:initiatedBy:)

func (WebUIDelegateObject) WebViewRunJavaScriptTextInputPanelWithPromptDefaultText

func (o WebUIDelegateObject) WebViewRunJavaScriptTextInputPanelWithPromptDefaultText(sender IWebView, prompt string, defaultText string) string

Displays a JavaScript text input panel and returns the entered text.

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.

See: https://developer.apple.com/documentation/WebKit/WebUIDelegate/webView:runJavaScriptTextInputPanelWithPrompt:defaultText:

func (WebUIDelegateObject) WebViewRunJavaScriptTextInputPanelWithPromptDefaultTextInitiatedByFrame

func (o WebUIDelegateObject) WebViewRunJavaScriptTextInputPanelWithPromptDefaultTextInitiatedByFrame(sender IWebView, prompt string, defaultText string, frame IWebFrame) string

Displays a JavaScript text input panel and returns the entered text.

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.

frame: The web frame whose JavaScript initiated this call.

Return Value

The text entered by the user if the user clicks OK; otherwise, `nil`.

Discussion

This method is used to provide an alternate text input panel when JavaScript code calls `prompt`. Delegates should visually indicate that this panel comes from JavaScript. The panel should contain an OK and a Cancel button, and an editable text field. If you do not implement this method, a JavaScript text input panel is displayed.

See: https://developer.apple.com/documentation/WebKit/WebUIDelegate/webView(_:runJavaScriptTextInputPanelWithPrompt:defaultText:initiatedBy:)

func (WebUIDelegateObject) WebViewRunModal

func (o WebUIDelegateObject) WebViewRunModal(sender IWebView)

Displays a web view in a modal window.

sender: The web view that sent the message.

Discussion

This method should display and order front a modal window containing the specified web view. This method is invoked after the [WebViewCreateWebViewModalDialogWithRequest] method is used to create a new window.

See: https://developer.apple.com/documentation/WebKit/WebUIDelegate/webViewRunModal(_:)

func (WebUIDelegateObject) WebViewRunOpenPanelForFileButtonWithResultListener

func (o WebUIDelegateObject) WebViewRunOpenPanelForFileButtonWithResultListener(sender IWebView, resultListener WebOpenPanelResultListener)

Displays an open panel for a file input control.

sender: The web view that sent the message.

resultListener: See the WebOpenPanelResultListener protocol for how to set these values.

Discussion

This method uses a listener object to set the results of the open panel, instead of returning the value directly. This approach allows delegates to implement the open panel as a modal dialog. No action is taken if you do not implement this method.

See: https://developer.apple.com/documentation/WebKit/WebUIDelegate/webView(_:runOpenPanelForFileButtonWith:)

func (WebUIDelegateObject) WebViewRunOpenPanelForFileButtonWithResultListenerAllowMultipleFiles

func (o WebUIDelegateObject) WebViewRunOpenPanelForFileButtonWithResultListenerAllowMultipleFiles(sender IWebView, resultListener WebOpenPanelResultListener, allowMultipleFiles bool)

Displays an open panel for a file input control.

sender: The web view that sent the message.

resultListener: See the WebOpenPanelResultListener protocol for how to set these values.

allowMultipleFiles: If true, the open panel should allow multiple files to be selected; otherwise, it should not.

See: https://developer.apple.com/documentation/WebKit/WebUIDelegate/webView(_:runOpenPanelForFileButtonWith:allowMultipleFiles:)

func (WebUIDelegateObject) WebViewSetContentRect

func (o WebUIDelegateObject) WebViewSetContentRect(sender IWebView, frame corefoundation.CGRect)

Sets the window’s content view frame to the specified content rectangle.

sender: The web view that sent the message.

frame: 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 [WebViewSetFrame] is invoked with the rectangle returned by sending the [NSWindow] method frameRect(forContentRect:styleMask:) to the window.

See: https://developer.apple.com/documentation/WebKit/WebUIDelegate/webView:setContentRect:

func (WebUIDelegateObject) WebViewSetFrame

func (o WebUIDelegateObject) WebViewSetFrame(sender IWebView, frame corefoundation.CGRect)

Sets the frame rectangle of a web view’s window to the specified frame size.

sender: The web view that sent the message.

frame: The frame size.

Discussion

The sender invokes this method instead of setting the window’s frame directly, allowing delegates to augment the behavior by, for example, saving the original window size before resizing as a result of JavaScript running. If you do not implement this method, the [NSWindow] method setFrame(_:display:) is sent to the window that contains `sender`, with true passed as the display argument.

See: https://developer.apple.com/documentation/WebKit/WebUIDelegate/webView(_:setFrame:)

func (WebUIDelegateObject) WebViewSetResizable

func (o WebUIDelegateObject) WebViewSetResizable(sender IWebView, resizable bool)

Sets whether a web view’s window can be resized.

sender: The web view that sent the message.

resizable: If true, the web view’s window can be resized; if false, the window is not resizable.

Discussion

By default, this method sets the window containing a web view to be resizable. If you display multiple web views in a window then your user interface delegate should implement this method to handle this special case. If you do not implement this method, the [NSWindow] method showsResizeIndicator is sent to the window that contains `sender`.

See: https://developer.apple.com/documentation/WebKit/WebUIDelegate/webView(_:setResizable:)

func (WebUIDelegateObject) WebViewSetStatusBarVisible

func (o WebUIDelegateObject) WebViewSetStatusBarVisible(sender IWebView, visible bool)

Sets the visibility of the status bar in a web view’s window.

sender: The web view that sent the message.

visible: If true, the delegate should display the status bar (if any); if false, the delegate should hide the status bar.

Discussion

No action is taken if you do not implement this method.

See: https://developer.apple.com/documentation/WebKit/WebUIDelegate/webView(_:setStatusBarVisible:)

func (WebUIDelegateObject) WebViewSetStatusText

func (o WebUIDelegateObject) WebViewSetStatusText(sender IWebView, text string)

Sets the status message displayed by a web view’s window, if any, to the specified text.

sender: The web view that sent the message.

text: The status message to display.

Discussion

The delegate receives this message when a JavaScript function in the web view explicitly sets the status text. No action is taken if you do not implement this method.

See: https://developer.apple.com/documentation/WebKit/WebUIDelegate/webView(_:setStatusText:)

func (WebUIDelegateObject) WebViewSetToolbarsVisible

func (o WebUIDelegateObject) WebViewSetToolbarsVisible(sender IWebView, visible bool)

Sets whether a web view’s toolbars should be visible.

sender: The web view that sent the message.

visible: If true, all toolbars (with the exception of the status bar) are shown; otherwise, all toolbars (with the exception of the status bar) are removed.

Discussion

No action is taken if you do not implement this method.

See: https://developer.apple.com/documentation/WebKit/WebUIDelegate/webView(_:setToolbarsVisible:)

func (WebUIDelegateObject) WebViewShouldPerformActionFromSender

func (o WebUIDelegateObject) WebViewShouldPerformActionFromSender(webView IWebView, action objc.SEL, sender objectivec.IObject) bool

Returns a Boolean value that indicates whether the action sent by the specified object should be performed.

webView: The web view that sent the message.

action: The action to perform. See WebView for information on actions a web view can perform.

sender: The object that sent the action.

Return Value

true if the action should be performed; otherwise, false.

Discussion

This method allows the delegate to control the web view’s behavior when action methods are invoked. For example, if the action is “, the delegate can return false to perform a copy in some other way than the default.

See: https://developer.apple.com/documentation/WebKit/WebUIDelegate/webView(_:shouldPerformAction:fromSender:)

func (WebUIDelegateObject) WebViewShow

func (o WebUIDelegateObject) WebViewShow(sender IWebView)

Displays a web view’s window and moves it to the front.

sender: The web view that sent the message.

Discussion

This method is typically used after a call to [WebViewCreateWebViewWithRequest], which creates a new window. The new window is not ordered to the front (or even shown) unless you implement this method.

See: https://developer.apple.com/documentation/WebKit/WebUIDelegate/webViewShow(_:)

func (WebUIDelegateObject) WebViewStatusText

func (o WebUIDelegateObject) WebViewStatusText(sender IWebView) string

Returns the current status message from a web view’s window.

sender: The web view that sent the message.

Return Value

The status message displayed in the web view’s window if one has been set with the [WebViewSetStatusText] method; otherwise, `nil`.

See: https://developer.apple.com/documentation/WebKit/WebUIDelegate/webViewStatusText(_:)

func (WebUIDelegateObject) WebViewUnfocus

func (o WebUIDelegateObject) WebViewUnfocus(sender IWebView)

Relinquishes focus on a web view’s window.

sender: The web view that sent the message.

Discussion

This method releases focus for the entire window. If you display multiple web views in a window, you might instead want to change the input focus to another view, using the [WebViewMakeFirstResponder] method.

See: https://developer.apple.com/documentation/WebKit/WebUIDelegate/webViewUnfocus(_:)

func (WebUIDelegateObject) WebViewValidateUserInterfaceItemDefaultValidation

func (o WebUIDelegateObject) WebViewValidateUserInterfaceItemDefaultValidation(webView IWebView, item appkit.NSValidatedUserInterfaceItem, defaultValidation bool) bool

Returns a Boolean value that indicates whether the specified user interface item is valid.

webView: The web view that sent the message.

item: The user interface item being validated.

defaultValidation: true if the web view believes the user interface item is valid; otherwise, false.

Return Value

true if the specified user interface item is valid; otherwise, false.

Discussion

See NSUserInterfaceValidations and NSValidatedUserInterfaceItem for more information about user interface validation. If you do not implement this method, the value of `defaultValidation` is used.

See: https://developer.apple.com/documentation/WebKit/WebUIDelegate/webView(_:validate:defaultValidation:)

func (WebUIDelegateObject) WebViewWillPerformDragDestinationActionForDraggingInfo

func (o WebUIDelegateObject) WebViewWillPerformDragDestinationActionForDraggingInfo(webView IWebView, action WebDragDestinationAction, draggingInfo appkit.NSDraggingInfo)

Tells the receiver that the sending web view will perform the specified drag-destination action.

webView: The web view that sent the message.

action: The drag-destination action to perform. See WebDragDestinationAction for a list of actions.

draggingInfo: The information object for the dragging operation.

Discussion

This method is invoked after the last invocation of the [WebViewDragDestinationActionMaskForDraggingInfo] method, when the dragged content is dropped and the sender is about to perform the destination action. No action is taken if you do not implement this method.

See: https://developer.apple.com/documentation/WebKit/WebUIDelegate/webView(_:willPerform:for:)

func (WebUIDelegateObject) WebViewWillPerformDragSourceActionFromPointWithPasteboard

func (o WebUIDelegateObject) WebViewWillPerformDragSourceActionFromPointWithPasteboard(webView IWebView, action WebDragSourceAction, point corefoundation.CGPoint, pasteboard appkit.NSPasteboard)

Tells the receiver that the sending web view will perform the specified drag-source action.

webView: The web view that sent the message.

action: The drag-source action to perform. See WebDragSourceAction for a list of actions.

point: The point at which the drag began, specified in the coordinates of the web view.

pasteboard: The drag pasteboard.

Discussion

This method is invoked after the last invocation of the [WebViewDragSourceActionMaskForPoint] method, when the dragged content is dropped and the sender is about to perform the drag-source action. The delegate has the opportunity to modify the contents of the object on the pasteboard before completing the drag-source action. No action is taken if you do not implement this method.

See: https://developer.apple.com/documentation/WebKit/WebUIDelegate/webView(_:willPerform:from:with:)

type WebUndefined

type WebUndefined struct {
	objectivec.Object
}

WebUndefined objects are simply used to represent the JavaScript “undefined” value in methods when bridging between JavaScript and Objective-C. For example, if you invoke a JavaScript function that returns the JavaScript “undefined” value, then a WebUndefined object is returned to the Objective-C calling context.

See: https://developer.apple.com/documentation/WebKit/WebUndefined

func NewWebUndefined

func NewWebUndefined() WebUndefined

NewWebUndefined creates a new WebUndefined instance.

func WebUndefinedFromID

func WebUndefinedFromID(id objc.ID) WebUndefined

WebUndefinedFromID constructs a WebUndefined from an objc.ID.

WebUndefined objects are simply used to represent the JavaScript “undefined” value in methods when bridging between JavaScript and Objective-C. For example, if you invoke a JavaScript function that returns the JavaScript “undefined” value, then a WebUndefined object is returned to the Objective-C calling context.

func (WebUndefined) Autorelease

func (w WebUndefined) Autorelease() WebUndefined

Autorelease adds the receiver to the current autorelease pool.

func (WebUndefined) EncodeWithCoder

func (w WebUndefined) EncodeWithCoder(coder foundation.INSCoder)

func (WebUndefined) Init

func (w WebUndefined) Init() WebUndefined

Init initializes the instance.

type WebUndefinedClass

type WebUndefinedClass struct {
	// contains filtered or unexported fields
}

func GetWebUndefinedClass

func GetWebUndefinedClass() WebUndefinedClass

GetWebUndefinedClass returns the class object for WebUndefined.

func (WebUndefinedClass) Alloc

func (wc WebUndefinedClass) Alloc() WebUndefined

Alloc allocates memory for a new instance of the class.

func (WebUndefinedClass) Class

func (wc WebUndefinedClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type WebView

type WebView struct {
	appkit.NSView
}

WebView is the core view class in the WebKit framework that manages interactions between the WebFrame and WebFrameView classes. To embed web content in your application, you just create a WebView object, attach it to a window, and send a load(_:) message to its main frame.

Overview

Behind the scenes, WebFrame objects encapsulate the content contained in a single frame element. A hierarchy of WebFrame objects is used to model an entire webpage where the root is called the main frame. There is a WebFrameView object per WebFrame object used to display the frame content. Therefore, there is a parallel hierarchy of WebFrameView objects used to render an entire page. The WebView object is also the parent view of this hierarchy. You do not need to create WebFrame and WebFrameView objects directly. These objects are automatically created when the page loads, either programmatically or by the user clicking a link.

You customize your embedded web content by implementing WebView delegates to handle certain aspects of the process. WebView objects have multiple delegates because the process of loading a webpage is asynchronous and complicated if errors occur. All the WebView delegates use informal protocols so you only need to implement only the delegates and methods that define the behavior you wish to change—default implementations are already provided.

For example, you might want to implement the frame load and resource load delegates to monitor the load progress and display status messages. Applications that use multiple windows may want to implement a user interface delegate. See the individual informal delegate protocols for more details: WebFrameLoadDelegate, WebPolicyDelegate, WebResourceLoadDelegate, and WebUIDelegate.

Another way to monitor load progress with less control is to observe the WebViewProgressEstimateChangedNotification, WebViewProgressFinishedNotification, and WebViewProgressStartedNotification notifications. For example, you could observe these notifications to implement a simple progress indicator in your application. You update the progress indicator by invoking the WebView.EstimatedProgress method to get an estimate of the amount of content that is currently loaded.

A WebView object is intended to support most features you would expect in a web browser except that it doesn’t implement the specific user interface for those features. You are responsible for implementing the user interface objects such as status bars, toolbars, buttons, and text fields. For example, a WebView object manages a back-forward list by default, and has WebView.GoBack and WebView.GoForward action methods. It is your responsibility to create the buttons that would send theses action messages. Note, there is some overhead in maintaining a back-forward list and page cache, so you should disable it if your application doesn’t use it.

You use a WebPreferences object to encapsulate the preferences of a WebView object, such as the font, text encoding, and image settings. You can modify the preferences for individual WebView objects or specify a shared WebPreferences object using the WebView.PreferencesIdentifier method. Use the WebPreferences.Autosaves WebPreferences method to specify whether the preferences should be automatically saved to the user defaults database.

You can also extend WebKit by implementing your own document view and representation classes for specific MIME types. Use the registerClass(_:representationClass:forMIMEType:) class method to register your custom classes with a WebView object.

Closing the View

Getting the Main Frame

  • WebView.MainFrame: The main frame, the root of the web frame hierarchy for this page.

Loading Content

Drawing

Moving Back and Forward

Changing the Text Size

Getting and Setting Delegates

Getting and Setting the Window

Getting and Setting Preferences

Getting and Setting Frame Contents

Getting and Setting Content Information

Getting and Setting the Group Name

Getting and Setting User-agent Strings

Using the Pasteboard

Cut, Copy and Paste Action Methods

  • WebView.Copy: Action method that copies the selected content to the general pasteboard.
  • WebView.CopyFont: An action method that copies font information onto the font pasteboard.
  • WebView.Cut: An action method that deletes selected content and puts it on the general pasteboard.
  • WebView.Delete: An action method that deletes the selected content.
  • WebView.Paste: An action method that pastes content from the pasteboard at the insertion point or over the selection.
  • WebView.PasteFont: An action method that pastes font information from the font pasteboard.
  • WebView.PasteAsPlainText: An action method that pastes pasteboard content as plain text.
  • WebView.PasteAsRichText: An action method that pastes pasteboard content into the receiver as rich text, maintaining its attributes.

Content Alignment Action Methods

  • WebView.AlignCenter: An action method that applies center alignment to selected content or all content if there’s no selection.
  • WebView.AlignJustified: An action method that applies full justification to selected content or all content if there’s no selection.
  • WebView.AlignLeft: An action method that applies left justification to selected content or all content if there’s no selection.
  • WebView.AlignRight: An action method that applies right justification to selected content or all content if there is no selection.

Changing the Font, Color and Other Attributes When Editing

Spell-checking Action Methods

Find Panel Action Method

Controlling Speakable Text

Getting and Setting Document Editing Attributes

Editing Documents

Selecting Content in the Document

Getting and Setting CSS Properties

Using WebScript

Instance Methods

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class

func NewWebView

func NewWebView() WebView

NewWebView creates a new WebView instance.

func NewWebViewWithFrameFrameNameGroupName

func NewWebViewWithFrameFrameNameGroupName(frame corefoundation.CGRect, frameName string, groupName string) WebView

Initializes the receiver with a frame rectangle, frame name, and group name.

frame: The frame rectangle for the created view object.

frameName: The web frame’s name. This should not be one of the predefined frame names (see the `WebFrame```WebFrame/findNamed(_:)“ method for a description of their meaning), but a custom name or a name used in HTML source. This parameter can be `nil`.

groupName: An arbitrary identifier used to group related frames. For example, JavaScript running in a frame can access any other frame in the same group. It’s up to the application how it chooses to scope related frames. This parameter can be `nil`.

Return Value

An initialized view object or `nil` if the object couldn’t be created.

Discussion

This method is the designated initializer for the WebView class.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/init(frame:frameName:groupName:)

func WebViewFromID

func WebViewFromID(id objc.ID) WebView

WebViewFromID constructs a WebView from an objc.ID.

WebView is the core view class in the WebKit framework that manages interactions between the WebFrame and WebFrameView classes. To embed web content in your application, you just create a WebView object, attach it to a window, and send a load(_:) message to its main frame.

func (WebView) AlignCenter

func (w WebView) AlignCenter(sender objectivec.IObject)

An action method that applies center alignment to selected content or all content if there’s no selection.

sender: The object that sent this message.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/alignCenter(_:)

func (WebView) AlignJustified

func (w WebView) AlignJustified(sender objectivec.IObject)

An action method that applies full justification to selected content or all content if there’s no selection.

sender: The object that sent this message.

Discussion

This method behaves similar to the alignJustified(_:) method in NSTextView.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/alignJustified(_:)

func (WebView) AlignLeft

func (w WebView) AlignLeft(sender objectivec.IObject)

An action method that applies left justification to selected content or all content if there’s no selection.

sender: The object that sent this message.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/alignLeft(_:)

func (WebView) AlignRight

func (w WebView) AlignRight(sender objectivec.IObject)

An action method that applies right justification to selected content or all content if there is no selection.

sender: The object that sent this message.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/alignRight(_:)

func (WebView) ApplicationNameForUserAgent

func (w WebView) ApplicationNameForUserAgent() string

The receiver’s application name that is used in the user-agent string.

Discussion

The user-agent is used by websites to identify the client browser.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/applicationNameForUserAgent

func (WebView) ApplyStyle

func (w WebView) ApplyStyle(style IDOMCSSStyleDeclaration)

Applies the CSS typing style to the current selection.

style: The style to apply to the current selection.

Discussion

This method does nothing if there is no current selection or if the current selection is collapsed.

This method hides the complexities of applying styles to elements. If necessary, this method will make multiple passes over the range of the current selection to ensure that the requested style is applied to the elements in that range, and takes into account the complexities of CSS style application rules. This method also simplifies styling attributes so that the minimum number of styling directives are used to yield a given computed style.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/applyStyle(_:)

func (WebView) Autorelease

func (w WebView) Autorelease() WebView

Autorelease adds the receiver to the current autorelease pool.

func (WebView) BackForwardList

func (w WebView) BackForwardList() IWebBackForwardList

The receiver’s back-forward list.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/backForwardList

func (WebView) CanGoBack

func (w WebView) CanGoBack() bool

A Boolean that indicates whether the previous location can be loaded.

Discussion

true if able to move backward; otherwise, false.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/canGoBack

func (WebView) CanGoForward

func (w WebView) CanGoForward() bool

A Boolean that indicates whether the next location can be loaded.

Discussion

true if able to move forward; otherwise, false.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/canGoForward

func (WebView) CanMakeTextLarger

func (w WebView) CanMakeTextLarger() bool

A Boolean that indicates whether the text can be made larger.

Discussion

true if able to make the text larger; otherwise, false.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/canMakeTextLarger

func (WebView) CanMakeTextSmaller

func (w WebView) CanMakeTextSmaller() bool

A Boolean that indicates whether the text can be made smaller.

Discussion

true if able to make the text smaller; otherwise, false.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/canMakeTextSmaller

func (WebView) CanMakeTextStandardSize

func (w WebView) CanMakeTextStandardSize() bool

A Boolean that indicates whether the current text size is a multiple of 1.

Discussion

true if the current text size is a multiple of 1; otherwise, false.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/canMakeTextStandardSize

func (WebView) ChangeAttributes

func (w WebView) ChangeAttributes(sender objectivec.IObject)

An action method that changes the attributes of the current selection.

sender: The object that sent this message.

Discussion

This method behaves similar to the changeAttributes(_:) method in NSTextView.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/changeAttributes(_:)

func (WebView) ChangeColor

func (w WebView) ChangeColor(sender objectivec.IObject)

Sets the color of the selected content.

sender: The object that sent this message.

Discussion

This method is invoked by the [NSColorPanel] sender and behaves similar to the changeColor(_:) method in NSTextView.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/changeColor(_:)

func (WebView) ChangeDocumentBackgroundColor

func (w WebView) ChangeDocumentBackgroundColor(sender objectivec.IObject)

Sets the background color of the selected content.

sender: The object that sent this message.

Discussion

This method is invoked by the [NSColorPanel] sender and behaves similar to the changeDocumentBackgroundColor(_:) method in NSTextView.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/changeDocumentBackgroundColor(_:)

func (WebView) ChangeFont

func (w WebView) ChangeFont(sender objectivec.IObject)

An action method that changes the font of the selection, or all content if there is no selection.

sender: The object that sent this message.

Discussion

If the receiver doesn’t use the Fonts panel, this method does nothing.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/changeFont(_:)

func (WebView) CheckSpelling

func (w WebView) CheckSpelling(sender objectivec.IObject)

An action method that searches for a misspelled word in the receiver.

sender: The object that sent this message.

Discussion

This action method starts a search at the end of the selection and continues until it reaches a word suspected of being misspelled or the end of the content. If a word isn’t recognized by the spelling server, a WebView.ShowGuessPanel message is sent to the receiver which opens the Guess panel and allows the user to make a correction or add the word to the local dictionary.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/checkSpelling(_:)

func (WebView) ComputedStyleForElementPseudoElement

func (w WebView) ComputedStyleForElementPseudoElement(element IDOMElement, pseudoElement string) IDOMCSSStyleDeclaration

Returns the computed style of an element and its pseudo element.

element: The element whose computed style is returned.

pseudoElement: The pseudo element for `element`.

Return Value

An immutable object describing the computed style of `element` and `pseudoElement` according to the Cascading Style Sheets Specification at `http://www.w3.org/TR/CSS21`. Returns `nil` if the receiver doesn’t display `element`.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/computedStyle(for:pseudoElement:)

func (WebView) Copy

func (w WebView) Copy(sender objectivec.IObject)

Action method that copies the selected content to the general pasteboard.

sender: The object that sent this message.

Discussion

This action method copies the selected content onto the general pasteboard, in as many formats as the receiver supports. For example, a plain text object uses [NSStringPboardType] for plain text, and a rich text object also uses [NSRTFPboardType].

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/copy(_:)

func (WebView) CopyFont

func (w WebView) CopyFont(sender objectivec.IObject)

An action method that copies font information onto the font pasteboard.

sender: The object that sent this message.

Discussion

This action method copies the font information for the first character of the selection (or for the insertion point) onto the font pasteboard as [NSFontPboardType].

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/copyFont(_:)

func (WebView) CustomTextEncodingName

func (w WebView) CustomTextEncodingName() string

The custom text encoding name.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/customTextEncodingName

func (WebView) CustomUserAgent

func (w WebView) CustomUserAgent() string

The receiver’s custom user-agent string.

Discussion

The custom user-agent string is used for all URLs. If `nil`, then the receiver constructs a user-agent string that produces the best rendering results for each URL.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/customUserAgent

func (WebView) Cut

func (w WebView) Cut(sender objectivec.IObject)

An action method that deletes selected content and puts it on the general pasteboard.

sender: The object that sent this message.

Discussion

This action method deletes the selected content and places it onto the general pasteboard, in as many formats as the receiver supports. For example, a plain text object uses [NSStringPboardType] for plain text, and a rich text object also uses [NSRTFPboardType].

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/cut(_:)

func (WebView) Delete

func (w WebView) Delete(sender objectivec.IObject)

An action method that deletes the selected content.

sender: The object that sent this message.

Discussion

The pasteboard is unaffected by invoking this method.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/delete(_:)

func (WebView) DeleteSelection

func (w WebView) DeleteSelection()

Deletes the receiver’s current selection unless it’s collapsed.

Discussion

No content is removed if the current selection is collapsed (a range is selected with the same nodes and offsets for the start and end) or if there is no current selection.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/deleteSelection()

func (WebView) DownloadDelegate

func (w WebView) DownloadDelegate() WebDownloadDelegate

The receiver’s download delegate.

Discussion

Implements the WebDownload protocol.

WebKit may create WebDownload objects automatically to handle downloads that start with a webpage or link.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/downloadDelegate

func (WebView) DrawsBackground

func (w WebView) DrawsBackground() bool

A Boolean that indicates whether the web view draws a background.

Discussion

If true, a default background is drawn; if false, it is not.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/drawsBackground

func (WebView) EditableDOMRangeForPoint

func (w WebView) EditableDOMRangeForPoint(point corefoundation.CGPoint) IDOMRange

Returns the editable DOM object located at a given point.

point: The location of the editable DOM object.

Return Value

A single range object of the editable DOM object located at `point` in the receiver’s coordinates.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/editableDOMRange(for:)

func (WebView) EditingDelegate

func (w WebView) EditingDelegate() WebEditingDelegate

The receiver’s editing delegate.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/editingDelegate

func (WebView) EstimatedProgress

func (w WebView) EstimatedProgress() float64

An estimate, as a percentage, of the amount of content that is currently loaded.

Discussion

A number ranging from `0` to `1.0` and, once a load completes, `1.0` until a new load starts, at which point it resets to `0`.

The value is an estimate based on the total number of bytes expected to be received for a document, including all its possible subresources. For more accurate load progress information, implement delegates conforming to the WebFrameLoadDelegate and WebResourceLoadDelegate informal protocols.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/estimatedProgress

func (WebView) FrameLoadDelegate

func (w WebView) FrameLoadDelegate() WebFrameLoadDelegate

The receiver’s frame load delegate.

Discussion

Conforms to the WebFrameLoadDelegate protocol.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/frameLoadDelegate

func (WebView) GoBack

func (w WebView) GoBack(sender objectivec.IObject)

An action method that loads the previous location in the back-forward list.

sender: The object that sent this message.

Discussion

This method does nothing if it is unable to move backward.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/goBack(_:)

func (WebView) GoForward

func (w WebView) GoForward(sender objectivec.IObject)

An action method that loads the next location in the back-forward list.

sender: The object that sent this message.

Discussion

This method does nothing if it is unable to move forward.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/goForward(_:)

func (WebView) GroupName

func (w WebView) GroupName() string

The receiver’s group name.

Discussion

You might use this to set the group name of a WebView object after it is loaded from a nib file.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/groupName

func (WebView) HostWindow

func (w WebView) HostWindow() appkit.NSWindow

The receiver’s host window.

Discussion

Your application should only use this if a web view is going to be removed from its window temporarily, and you want the web view to continue operating (for example, you don’t want to interrupt a load in progress). Since the receiver maintains a copy of `hostWindow`, it is your responsibility to set the host window to `nil` before closing the window to avoid consuming excess memory.

For example, you might use this property if you attach a web view to an [NSTabView] object (as in a tabbed browser implementation). The [NSTabView] object takes views out of the window when they are not in the active tab, so you need to use this before the web view is removed from its window. If you don’t invoke this property, plug-ins will stop operating when the web view is removed from its window.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/hostWindow

func (WebView) Init

func (w WebView) Init() WebView

Init initializes the instance.

func (WebView) IsContinuousSpellCheckingEnabled

func (w WebView) IsContinuousSpellCheckingEnabled() bool

A Boolean that indicates whether the web view has continuous spell-checking enabled.

Discussion

true if the object has continuous spell-checking enabled; otherwise, false.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/isContinuousSpellCheckingEnabled

func (WebView) IsEditable

func (w WebView) IsEditable() bool

A Boolean that indicates whether the user is allowed to edit the document.

Discussion

true if the receiver allows the user to edit the HTML document, false if it doesn’t.

You can change the receiver’s document programmatically regardless of this setting.

Normally, an HTML document is not editable unless the elements within the document are editable. This property provides a low-level way to make the contents of a WebView object editable without altering the document or DOM structure.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/isEditable

func (WebView) IsLoading

func (w WebView) IsLoading() bool

A Boolean that indicates whether the web view is loading content.

Discussion

true if the web view is currently loading any resources; otherwise, false.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/isLoading

func (WebView) MainFrame

func (w WebView) MainFrame() IWebFrame

The main frame, the root of the web frame hierarchy for this page.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/mainFrame

func (WebView) MainFrameDocument

func (w WebView) MainFrameDocument() IDOMDocument

The DOM document for the main frame.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/mainFrameDocument

func (WebView) MainFrameTitle

func (w WebView) MainFrameTitle() string

The HTML title of the loaded page.

Discussion

The HTML title of the loaded page. Returns `@""` if the loaded document is not HTML.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/mainFrameTitle

func (WebView) MainFrameURL

func (w WebView) MainFrameURL() string

The URL that the main frame loads.

Discussion

Functionally equivalent to invoking `[[webView mainFrame] [NSURLRequest [NSURL URLWithString:URLString]]]`.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/mainFrameURL

func (WebView) MaintainsInactiveSelection

func (w WebView) MaintainsInactiveSelection() bool

A Boolean that indicates whether the selection is maintained when focus is lost.

Discussion

true if the selection is maintained when focus is lost; otherwise, false.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/maintainsInactiveSelection

func (WebView) MakeTextLarger

func (w WebView) MakeTextLarger(sender objectivec.IObject)

Action method that increases the text size by one unit.

sender: The object that sent this message.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/makeTextLarger(_:)

func (WebView) MakeTextSmaller

func (w WebView) MakeTextSmaller(sender objectivec.IObject)

Action method that reduces the text size by one unit.

sender: The object that sent this message.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/makeTextSmaller(_:)

func (WebView) MakeTextStandardSize

func (w WebView) MakeTextStandardSize(sender objectivec.IObject)

Resets the text size to a multiple of 1.

sender: The object that sent this message.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/makeTextStandardSize(_:)

func (WebView) MediaStyle

func (w WebView) MediaStyle() string

The receiver’s CSS media property.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/mediaStyle

func (WebView) MoveToBeginningOfSentence

func (w WebView) MoveToBeginningOfSentence(sender objectivec.IObject)

Moves the insertion point to the beginning of the current sentence.

sender: The object that sent this message.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/moveToBeginningOfSentence(_:)

func (WebView) MoveToBeginningOfSentenceAndModifySelection

func (w WebView) MoveToBeginningOfSentenceAndModifySelection(sender objectivec.IObject)

Moves the insertion point and extends the selection to the beginning of the current sentence.

sender: The object that sent this message.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/moveToBeginningOfSentenceAndModifySelection(_:)

func (WebView) MoveToEndOfSentence

func (w WebView) MoveToEndOfSentence(sender objectivec.IObject)

Moves the insertion point to the end of the current sentence.

sender: The object that sent this message.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/moveToEndOfSentence(_:)

func (WebView) MoveToEndOfSentenceAndModifySelection

func (w WebView) MoveToEndOfSentenceAndModifySelection(sender objectivec.IObject)

Moves the insertion point and extends the selection to the end of the current sentence.

sender: The object that sent this message.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/moveToEndOfSentenceAndModifySelection(_:)

func (WebView) Paste

func (w WebView) Paste(sender objectivec.IObject)

An action method that pastes content from the pasteboard at the insertion point or over the selection.

sender: The object that sent this message.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/paste(_:)

func (WebView) PasteAsPlainText

func (w WebView) PasteAsPlainText(sender objectivec.IObject)

An action method that pastes pasteboard content as plain text.

sender: The object that sent this message.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/pasteAsPlainText(_:)

func (WebView) PasteAsRichText

func (w WebView) PasteAsRichText(sender objectivec.IObject)

An action method that pastes pasteboard content into the receiver as rich text, maintaining its attributes.

sender: The object that sent this message.

Discussion

The text is inserted at the insertion point if there is one; otherwise, it replaces the selection.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/pasteAsRichText(_:)

func (WebView) PasteFont

func (w WebView) PasteFont(sender objectivec.IObject)

An action method that pastes font information from the font pasteboard.

sender: The object that sent this message.

Discussion

This action method pastes font information from the font pasteboard onto the selected content or insertion point of a rich text object, or over all text of the receiver.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/pasteFont(_:)

func (WebView) PasteboardTypesForSelection

func (w WebView) PasteboardTypesForSelection() foundation.INSArray

An array of pasteboard types that can be used for the current selection of the receiver.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/pasteboardTypesForSelection

func (WebView) PerformFindPanelAction

func (w WebView) PerformFindPanelAction(sender objectivec.IObject)

An action method that opens the Find menu and Find panel.

sender: The object that sent this message.

Discussion

This method behaves similar to the performFindPanelAction(_:) method in NSTextView.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/performFindPanelAction(_:)

func (WebView) PolicyDelegate

func (w WebView) PolicyDelegate() WebPolicyDelegate

The receiver’s policy delegate.

Discussion

Conforms to the WebPolicyDelegate protocol.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/policyDelegate

func (WebView) Preferences

func (w WebView) Preferences() IWebPreferences

The receiver’s preferences.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/preferences

func (WebView) PreferencesIdentifier

func (w WebView) PreferencesIdentifier() string

The identifier of the receiver’s preferences.

Discussion

It is fixed to the keys used to store the receiver’s preferences in the user defaults database. WebView objects can share instances of the WebPreferences class by using the same preferences identifier.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/preferencesIdentifier

func (WebView) Reload

func (w WebView) Reload(sender objectivec.IObject)

An action method that reloads the current page.

sender: The object that sent this message.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/reload(_:)

func (WebView) ReloadFromOrigin

func (w WebView) ReloadFromOrigin(sender objectivec.IObject)

Action method that performs an end-to-end revalidation using cache-validating conditionals if possible.

sender: The object that sent this message.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/reloadFromOrigin(_:)

func (WebView) ReplaceSelectionWithArchive

func (w WebView) ReplaceSelectionWithArchive(archive IWebArchive)

Replaces the current selection with an archive’s contents.

archive: The archive that replaces the current selection.

Discussion

If the current selection is collapsed (a range is selected with the same nodes and offsets for the start and end) then no content is removed when inserting the archive, and the selection is collapsed and moved to the end of the inserted content. If no content is selected, the archive is not inserted.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/replaceSelection(with:)-3vj8l

func (WebView) ReplaceSelectionWithMarkupString

func (w WebView) ReplaceSelectionWithMarkupString(markupString string)

Replaces the current selection with mixed text and markup.

markupString: The markup string that replaces the current selection.

Discussion

If the current selection is collapsed (a range is selected with the same nodes and offsets for the start and end) then no content is removed when inserting the markup, and the selection is collapsed and moved to the end of the inserted content. If no content is selected, the markup is not inserted.

See HTML Clipboard Format for a specification of the supported HTML markup.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/replaceSelection(withMarkupString:)

func (WebView) ReplaceSelectionWithNode

func (w WebView) ReplaceSelectionWithNode(node IDOMNode)

Replaces the receiver’s current selection with the specified DOM node.

node: The node that replaces the current selection. If `nil`, a `NOT_FOUND_ERR` DOM error is thrown as an exception. Use the WebView.DeleteSelection method to delete the selection.

Discussion

If the current selection is collapsed (a range is selected with the same nodes and offsets for the start and end) then no content is removed when inserting the node, and the selection is collapsed and moved to the end of the inserted content. If no content is selected, the node is not inserted.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/replaceSelection(with:)-5px9m

func (WebView) ReplaceSelectionWithText

func (w WebView) ReplaceSelectionWithText(text string)

Replaces the current selection with a string of text.

text: The text that replaces the current selection.

Discussion

If the current selection is collapsed (a range is selected with the same nodes and offsets for the start and end) then no content is removed when inserting the text, and the selection is collapsed and moved to the end of the inserted content. If no content is selected, the text is not inserted.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/replaceSelection(withText:)

func (WebView) ResourceLoadDelegate

func (w WebView) ResourceLoadDelegate() WebResourceLoadDelegate

The receiver’s resource load delegate.

Discussion

Conforms to the WebResourceLoadDelegate protocol.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/resourceLoadDelegate

func (WebView) SelectSentence

func (w WebView) SelectSentence(sender objectivec.IObject)

Selects the entire sentence around the insertion point.

sender: The object that sent this message.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/selectSentence(_:)

func (WebView) SelectedDOMRange

func (w WebView) SelectedDOMRange() IDOMRange

The range of the current selection.

Discussion

`nil` if nothing is selected.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/selectedDOMRange

func (WebView) SelectedFrame

func (w WebView) SelectedFrame() IWebFrame

The frame with the active selection.

Discussion

If it doesn’t exist, the frame that contains a non-zero-length selection; otherwise, `nil`.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/selectedFrame

func (WebView) SelectionAffinity

func (w WebView) SelectionAffinity() appkit.NSSelectionAffinity

The current selection affinity.

Discussion

For example, if text wraps across line boundaries, the value of this property indicates whether or not the insertion point appears after the last charactrer of the first line or before the first character of the following line.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/selectionAffinity

func (WebView) SetApplicationNameForUserAgent

func (w WebView) SetApplicationNameForUserAgent(value string)

func (WebView) SetContinuousSpellCheckingEnabled

func (w WebView) SetContinuousSpellCheckingEnabled(value bool)

func (WebView) SetCustomTextEncodingName

func (w WebView) SetCustomTextEncodingName(value string)

func (WebView) SetCustomUserAgent

func (w WebView) SetCustomUserAgent(value string)

func (WebView) SetDownloadDelegate

func (w WebView) SetDownloadDelegate(value WebDownloadDelegate)

func (WebView) SetDrawsBackground

func (w WebView) SetDrawsBackground(value bool)

func (WebView) SetEditable

func (w WebView) SetEditable(value bool)

func (WebView) SetEditingDelegate

func (w WebView) SetEditingDelegate(value WebEditingDelegate)

func (WebView) SetFrameLoadDelegate

func (w WebView) SetFrameLoadDelegate(value WebFrameLoadDelegate)

func (WebView) SetGroupName

func (w WebView) SetGroupName(value string)

func (WebView) SetHostWindow

func (w WebView) SetHostWindow(value appkit.NSWindow)

func (WebView) SetMainFrameURL

func (w WebView) SetMainFrameURL(value string)

func (WebView) SetMediaStyle

func (w WebView) SetMediaStyle(value string)

func (WebView) SetPolicyDelegate

func (w WebView) SetPolicyDelegate(value WebPolicyDelegate)

func (WebView) SetPreferences

func (w WebView) SetPreferences(value IWebPreferences)

func (WebView) SetPreferencesIdentifier

func (w WebView) SetPreferencesIdentifier(value string)

func (WebView) SetResourceLoadDelegate

func (w WebView) SetResourceLoadDelegate(value WebResourceLoadDelegate)

func (WebView) SetSelectedDOMRangeAffinity

func (w WebView) SetSelectedDOMRangeAffinity(range_ IDOMRange, selectionAffinity appkit.NSSelectionAffinity)

Selects a range of nodes.

range: The range of nodes to select. If `range` is `nil`, the current selection is cleared. This method raises a [DOMRangeExcepton] if the range has been detached or refers to nodes not displayed by the receiver.

selectionAffinity: See the WebView.SelectionAffinity property for information on selection affinity.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/setSelectedDOMRange(_:affinity:)

func (WebView) SetShouldCloseWithWindow

func (w WebView) SetShouldCloseWithWindow(value bool)

func (WebView) SetShouldUpdateWhileOffscreen

func (w WebView) SetShouldUpdateWhileOffscreen(value bool)

func (WebView) SetSmartInsertDeleteEnabled

func (w WebView) SetSmartInsertDeleteEnabled(value bool)

func (WebView) SetTextSizeMultiplier

func (w WebView) SetTextSizeMultiplier(value float32)

func (WebView) SetTypingStyle

func (w WebView) SetTypingStyle(value IDOMCSSStyleDeclaration)

func (WebView) SetUIDelegate

func (w WebView) SetUIDelegate(value WebUIDelegate)

func (WebView) ShouldCloseWithWindow

func (w WebView) ShouldCloseWithWindow() bool

A Boolean that indicates whether the web view should close when its window or host window closes.

Discussion

If true, the web view should close; otherwise, it should not.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/shouldCloseWithWindow

func (WebView) ShouldUpdateWhileOffscreen

func (w WebView) ShouldUpdateWhileOffscreen() bool

A Boolean that inidicates whether the web view should update even when it is not in a window that is currently visible.

Discussion

If true, the web view updates regardless if it is visible. If false, it updates only if it is visible, possibly improving performance, and then updates automatically when it becomes visible. The default value is true.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/shouldUpdateWhileOffscreen

func (WebView) ShowGuessPanel

func (w WebView) ShowGuessPanel(sender objectivec.IObject)

An action method that shows a spelling correction panel.

sender: The object that sent this message.

Discussion

This action method opens the Spelling panel, allowing the user to make a correction during spell checking.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/showGuessPanel(_:)

func (WebView) SmartInsertDeleteEnabled

func (w WebView) SmartInsertDeleteEnabled() bool

A Boolean that indicates whether smart-space insertion and deletion is enabled.

Discussion

true if the receiver inserts or deletes space around selected words so as to preserve proper spacing and punctuation. false if it inserts and deletes exactly what’s selected.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/smartInsertDeleteEnabled

func (WebView) SpellCheckerDocumentTag

func (w WebView) SpellCheckerDocumentTag() int

The spell-checker document tag for this document.

Discussion

A tag identifying the receiver’s text as a document for the spell-checker server. See the NSSpellChecker and NSSpellServer class specifications for more information on how this tag is used.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/spellCheckerDocumentTag

func (WebView) StartSpeaking

func (w WebView) StartSpeaking(sender objectivec.IObject)

An action method that starts speaking the selected text or all text if there’s no selection.

sender: The object that sent this message.

Discussion

Speech continues asynchronously until the end of the text or until terminated by invoking the WebView.StopSpeaking method. This method behaves similar to the startSpeaking(_:) method in NSTextView.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/startSpeaking(_:)

func (WebView) StopLoading

func (w WebView) StopLoading(sender objectivec.IObject)

An action method that stops the loading of any web frame content managed by the receiver.

sender: The object that sent this message.

Discussion

Stops any content in the process of being loaded by the main frame or any of its children frames. Does nothing if no content is being loaded.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/stopLoading(_:)

func (WebView) StopSpeaking

func (w WebView) StopSpeaking(sender objectivec.IObject)

An action method that stops speaking that is in progress.

sender: The object that sent this message.

Discussion

This action method stops speech that was previously started with WebView.StartSpeaking. This method behaves similar to the stopSpeaking(_:) method in NSTextView.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/stopSpeaking(_:)

func (WebView) StyleDeclarationWithText

func (w WebView) StyleDeclarationWithText(text string) IDOMCSSStyleDeclaration

Returns the CSS style declaration for the specified text.

text: The text whose style declaration is returned.

Return Value

The style declaration for `text`.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/styleDeclaration(withText:)

func (WebView) SupportsTextEncoding

func (w WebView) SupportsTextEncoding() bool

A Boolean that indicates whether the document view supports different text encodings.

Discussion

true if the receiver’s document view can support different text encodings; otherwise, false.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/supportsTextEncoding

func (WebView) TakeStringURLFrom

func (w WebView) TakeStringURLFrom(sender objectivec.IObject)

Sets the receiver’s current location by obtaining a URL string from the sender.

sender: The object that sent this message.

Discussion

This method sets the receiver’s current location to the value obtained by sending a `stringValue` message to `sender`, then starts loading the URL returned by `sender`.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/takeStringURLFrom(_:)

func (WebView) TextSizeMultiplier

func (w WebView) TextSizeMultiplier() float32

The font size multiplier for text displayed in web frame view objects managed by the receiver.

Discussion

Measured as a fractional percentage value where `1.0` denotes 100%.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/textSizeMultiplier

func (WebView) ToggleContinuousSpellChecking

func (w WebView) ToggleContinuousSpellChecking(sender objectivec.IObject)

Toggles whether continuous spell checking is available.

sender: The object that sent this message.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/toggleContinuousSpellChecking(_:)

func (WebView) ToggleSmartInsertDelete

func (w WebView) ToggleSmartInsertDelete(sender objectivec.IObject)

Toggles whether spaces around selected words are inserted or deleted to preserve proper spacing and punctuation.

sender: The object that sent this message.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/toggleSmartInsertDelete(_:)

func (WebView) TypingStyle

func (w WebView) TypingStyle() IDOMCSSStyleDeclaration

The receiver’s CSS typing style.

Discussion

The typing style is reset automatically when the receiver’s selection changes.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/typingStyle

func (WebView) UIDelegate

func (w WebView) UIDelegate() WebUIDelegate

The receiver’s user interface delegate.

Discussion

A user interface delegate that conforms to the WebUIDelegate protocol.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/uiDelegate

func (WebView) WindowScriptObject

func (w WebView) WindowScriptObject() IWebScriptObject

The receiver’s window object from the scripting environment.

See: https://developer.apple.com/documentation/WebKit/WebView-swift.class/windowScriptObject

type WebViewClass

type WebViewClass struct {
	// contains filtered or unexported fields
}

func GetWebViewClass

func GetWebViewClass() WebViewClass

GetWebViewClass returns the class object for WebView.

func (WebViewClass) Alloc

func (wc WebViewClass) Alloc() WebView

Alloc allocates memory for a new instance of the class.

func (WebViewClass) Class

func (wc WebViewClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type WebViewInsertAction deprecated

type WebViewInsertAction int

Deprecated: Deprecated since macOS 10.14. See: https://developer.apple.com/documentation/WebKit/WebViewInsertAction

const (
	// Deprecated.
	WebViewInsertActionDropped WebViewInsertAction = 2
	// Deprecated.
	WebViewInsertActionPasted WebViewInsertAction = 1
	// Deprecated.
	WebViewInsertActionTyped WebViewInsertAction = 0
)

func (WebViewInsertAction) String

func (e WebViewInsertAction) String() string

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL