mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-19 23:13:04 +08:00
feat(core): add event when disposeNativeView is called
This commit is contained in:
@ -248,6 +248,7 @@ export abstract class ViewBase extends Observable implements ViewBaseDefinition
|
|||||||
public static loadedEvent = 'loaded';
|
public static loadedEvent = 'loaded';
|
||||||
public static unloadedEvent = 'unloaded';
|
public static unloadedEvent = 'unloaded';
|
||||||
public static createdEvent = 'created';
|
public static createdEvent = 'created';
|
||||||
|
public static disposeNativeView = 'disposeNativeView';
|
||||||
|
|
||||||
private _onLoadedCalled = false;
|
private _onLoadedCalled = false;
|
||||||
private _onUnloadedCalled = false;
|
private _onUnloadedCalled = false;
|
||||||
@ -763,7 +764,10 @@ export abstract class ViewBase extends Observable implements ViewBaseDefinition
|
|||||||
}
|
}
|
||||||
|
|
||||||
public disposeNativeView() {
|
public disposeNativeView() {
|
||||||
//
|
this.notify({
|
||||||
|
eventName: ViewBase.disposeNativeView,
|
||||||
|
object: this,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public initNativeView(): void {
|
public initNativeView(): void {
|
||||||
|
Reference in New Issue
Block a user