diff --git a/packages/desktop_webview_window/macos/Classes/DesktopWebviewWindowPlugin.swift b/packages/desktop_webview_window/macos/Classes/DesktopWebviewWindowPlugin.swift index ba41e3a5..2a273b2c 100644 --- a/packages/desktop_webview_window/macos/Classes/DesktopWebviewWindowPlugin.swift +++ b/packages/desktop_webview_window/macos/Classes/DesktopWebviewWindowPlugin.swift @@ -110,7 +110,7 @@ public class DesktopWebviewWindowPlugin: NSObject, FlutterPlugin { result(FlutterError(code: "0", message: "can not find webview for id: \(viewId)", details: nil)) return } - wc.webViewController.addJavascriptInterface(name: name) + wc.webViewController.removeJavascriptInterface(name: name) result(nil) break case "clearAll":