Skip to content

Commit

Permalink
refactor: Move the CDVWebViewEngineConfigurationDelegate protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
dpogue committed Aug 14, 2024
1 parent e5428e3 commit 7c10750
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 18 deletions.
18 changes: 0 additions & 18 deletions CordovaLib/include/Cordova/CDVViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,6 @@

@class CDVPlugin;

@protocol CDVWebViewEngineConfigurationDelegate <NSObject>

@optional
/// Provides a fully configured WKWebViewConfiguration which will be overriden with
/// any related settings you add to config.xml (e.g., `PreferredContentMode`).
/// Useful for more complex configuration, including websiteDataStore.
///
/// Example usage:
///
/// extension CDVViewController: CDVWebViewEngineConfigurationDelegate {
/// public func configuration() -> WKWebViewConfiguration {
/// // return your config here
/// }
/// }
- (nonnull WKWebViewConfiguration*)configuration;

@end

/*!
@abstract The main view controller for Cordova web content.
*/
Expand Down
19 changes: 19 additions & 0 deletions CordovaLib/include/Cordova/CDVWebViewEngineProtocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,22 @@ NS_ASSUME_NONNULL_BEGIN
NS_ASSUME_NONNULL_END

@end


@protocol CDVWebViewEngineConfigurationDelegate <NSObject>

@optional
/// Provides a fully configured WKWebViewConfiguration which will be overriden with
/// any related settings you add to config.xml (e.g., `PreferredContentMode`).
/// Useful for more complex configuration, including websiteDataStore.
///
/// Example usage:
///
/// extension CDVViewController: CDVWebViewEngineConfigurationDelegate {
/// public func configuration() -> WKWebViewConfiguration {
/// // return your config here
/// }
/// }
- (nonnull WKWebViewConfiguration*)configuration;

@end

0 comments on commit 7c10750

Please sign in to comment.