Update webview example

This commit is contained in:
Ryan McGrath 2022-11-04 15:54:15 -07:00
parent f8e836e3eb
commit e54a28a110
No known key found for this signature in database
GPG key ID: DA6CBD9233593DEA

View file

@ -23,6 +23,8 @@ impl AppDelegate for BasicApp {
pub struct WebViewInstance; pub struct WebViewInstance;
impl WebViewDelegate for WebViewInstance { impl WebViewDelegate for WebViewInstance {
const NAME: &'static str = "CustomWebViewDelegate";
fn on_custom_protocol_request(&self, path: &str) -> Option<Vec<u8>> { fn on_custom_protocol_request(&self, path: &str) -> Option<Vec<u8>> {
let requested_asset_path = path.replace("cacao://", ""); let requested_asset_path = path.replace("cacao://", "");