<!--
{
  "availability" : [
    "macOS: 10.3.0 - 10.14.0"
  ],
  "documentType" : "symbol",
  "framework" : "WebKit",
  "identifier" : "/documentation/WebKit/WebResourceLoadDelegate/webView(_:plugInFailedWithError:dataSource:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "WebKit"
    ],
    "preciseIdentifier" : "c:objc(pl)WebResourceLoadDelegate(im)webView:plugInFailedWithError:dataSource:"
  },
  "title" : "webView(_:plugInFailedWithError:dataSource:)"
}
-->

# webView(_:plugInFailedWithError:dataSource:)

Invoked when a plug-in fails to load.

```
optional func webView(_ sender: WebView!, plugInFailedWithError error: (any Error)!, dataSource: WebDataSource!)
```

## Parameters

`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`](/documentation/WebKit/WebKitErrorPlugInNameKey)     key is a string containing the plug-in’s name. The value for the [`WebKitErrorPlugInPageURLStringKey`](/documentation/WebKit/WebKitErrorPlugInPageURLStringKey)     key is a URL string of the     `PLUGINSPAGE`     attribute. The value of the [`WebKitErrorMIMETypeKey`](/documentation/WebKit/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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)