add createdProxy event
This commit is contained in:
@@ -61,6 +61,7 @@ export class Editor extends EventEmitter {
|
|||||||
constructor(options: Partial<EditorOptions> = {}) {
|
constructor(options: Partial<EditorOptions> = {}) {
|
||||||
super()
|
super()
|
||||||
this.options = { ...this.options, ...options }
|
this.options = { ...this.options, ...options }
|
||||||
|
this.on('createdProxy', this.init)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ export default function magicMethods(clazz: any) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
instance.proxy = new Proxy(instance, instanceHandler)
|
instance.proxy = new Proxy(instance, instanceHandler)
|
||||||
instance.init()
|
instance.emit('createdProxy')
|
||||||
|
|
||||||
return instance.proxy
|
return instance.proxy
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user