Vine/Server/Notification/WebviewDispose.rs
1//! Cocoon `webview.dispose` notification - extension disposed a
2//! webview panel or the user closed the tab. Sky's webview shim
3//! listens on `sky://webview/dispose` and tears down the DOM container
4//! and unregisters the handle.
5
6use serde_json::Value;
7
8use crate::{Host::VineHost, dev_log};
9
10pub async fn WebviewDispose(Host:&dyn VineHost, Parameter:&Value) {
11 Host.EmitToRenderer("sky://webview/dispose", Parameter.clone());
12
13 dev_log!(
14 "grpc",
15 "[Webview] dispose handle={}",
16 Parameter.get("handle").and_then(Value::as_str).unwrap_or("?")
17 );
18}