mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +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 unloadedEvent = 'unloaded';
|
||||
public static createdEvent = 'created';
|
||||
public static disposeNativeView = 'disposeNativeView';
|
||||
|
||||
private _onLoadedCalled = false;
|
||||
private _onUnloadedCalled = false;
|
||||
@@ -763,7 +764,10 @@ export abstract class ViewBase extends Observable implements ViewBaseDefinition
|
||||
}
|
||||
|
||||
public disposeNativeView() {
|
||||
//
|
||||
this.notify({
|
||||
eventName: ViewBase.disposeNativeView,
|
||||
object: this,
|
||||
});
|
||||
}
|
||||
|
||||
public initNativeView(): void {
|
||||
|
||||
Reference in New Issue
Block a user