mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-26 20:00:16 +08:00
Merge pull request #2068 from NativeScript/web-view-leak
Fixed: WebView still visible in chrome://inspect after page is destroyed
This commit is contained in:
@ -105,6 +105,13 @@ export class WebView extends common.WebView {
|
|||||||
this._android.setWebViewClient(this._webViewClient);
|
this._android.setWebViewClient(this._webViewClient);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public _onDetached(force?: boolean) {
|
||||||
|
if (this.android) {
|
||||||
|
this.android.destroy();
|
||||||
|
}
|
||||||
|
super._onDetached(force);
|
||||||
|
}
|
||||||
|
|
||||||
public _loadUrl(url: string) {
|
public _loadUrl(url: string) {
|
||||||
if (!this._android) {
|
if (!this._android) {
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user