Instance Method

webView:runOpenPanelWithParameters:initiatedByFrame:completionHandler:

Displays a file upload panel.

Declaration

- (void)webView:(WKWebView *)webView runOpenPanelWithParameters:(WKOpenPanelParameters *)parameters initiatedByFrame:(WKFrameInfo *)frame completionHandler:(void (^)(NSArray<NSURL *> *URLs))completionHandler;

Parameters

webView

The web view invoking the delegate method.

parameters

The parameters describing the file upload control.

frame

The frame whose file upload control initiated the call.

completionHandler

The completion handler called after the open panel has been dismissed. Pass the selected URLs if the user chose "OK", otherwise nil.

Discussion

If this method is not implemented, the web view behaves as if the user selected the Cancel button.