From 2318f67e8217ac0badd102e615d7108c0f2ee956 Mon Sep 17 00:00:00 2001 From: aengu <863762566@qq.com> Date: Thu, 11 Jul 2024 08:17:39 +0000 Subject: [PATCH] =?UTF-8?q?update=20flutter=5Finappwebview=5Fohos/ohos/src?= =?UTF-8?q?/main/ets/components/plugin/InAppWebViewFlutterPlugin.ets.=20?= =?UTF-8?q?=E8=BF=99=E9=87=8C=E7=BC=BA=E5=B0=91=E4=BA=86=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96inAppWebViewManager=EF=BC=8C=E5=A6=82=E6=9E=9C?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E5=88=9D=E5=A7=8B=E5=8C=96=E8=AF=A5=E5=AE=9E?= =?UTF-8?q?=E4=BE=8B=EF=BC=8Cflutter=E6=97=A0=E6=B3=95=E8=B0=83=E7=94=A8?= =?UTF-8?q?=E5=BC=80=E5=90=AFwebview=E8=B0=83=E8=AF=95=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: aengu <863762566@qq.com> --- .../main/ets/components/plugin/InAppWebViewFlutterPlugin.ets | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/flutter_inappwebview_ohos/ohos/src/main/ets/components/plugin/InAppWebViewFlutterPlugin.ets b/flutter_inappwebview_ohos/ohos/src/main/ets/components/plugin/InAppWebViewFlutterPlugin.ets index 0f71d069..f46fbc74 100644 --- a/flutter_inappwebview_ohos/ohos/src/main/ets/components/plugin/InAppWebViewFlutterPlugin.ets +++ b/flutter_inappwebview_ohos/ohos/src/main/ets/components/plugin/InAppWebViewFlutterPlugin.ets @@ -61,6 +61,7 @@ export default class InAppWebViewFlutterPlugin implements FlutterPlugin, Ability Log.d(TAG, "onAttachedToEngine") this.messenger = binding.getBinaryMessenger() this.flutterAssets = binding.getFlutterAssets(); + this.inAppWebViewManager = new InAppWebViewManager( this ); this.inAppBrowserManager = new InAppBrowserManager(this); this.flutterWebViewFactory = new FlutterWebViewFactory(this); this.messenger = binding.getBinaryMessenger(); @@ -77,6 +78,10 @@ export default class InAppWebViewFlutterPlugin implements FlutterPlugin, Ability this.printJobManager.dispose(); this.printJobManager = null; } + if (this.inAppWebViewManager != null) { + this.inAppWebViewManager.dispose(); + this.inAppWebViewManager = null; + } if (this.inAppBrowserManager != null) { this.inAppBrowserManager.dispose(); this.inAppBrowserManager = null; -- Gitee