mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-26 03:01:51 +08:00
fix(core): improve loaded/unloaded handling
This commit is contained in:
@ -123,10 +123,12 @@ export class WebView extends WebViewBase {
|
||||
public disposeNativeView() {
|
||||
const nativeView = this.nativeViewProtected;
|
||||
if (nativeView) {
|
||||
if ((<any>nativeView).client) {
|
||||
(<any>nativeView).client.owner = null;
|
||||
}
|
||||
nativeView.destroy();
|
||||
}
|
||||
|
||||
(<any>nativeView).client.owner = null;
|
||||
super.disposeNativeView();
|
||||
}
|
||||
|
||||
|
@ -208,10 +208,10 @@ export class WebView extends WebViewBase {
|
||||
}
|
||||
|
||||
disposeNativeView() {
|
||||
super.disposeNativeView();
|
||||
this._delegate = null;
|
||||
this._scrollDelegate = null;
|
||||
this._uiDelegate = null;
|
||||
super.disposeNativeView();
|
||||
}
|
||||
|
||||
// @ts-ignore
|
||||
|
Reference in New Issue
Block a user