mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 10:35:48 +00:00
Merge "Emit teardown event before replacing generated content node content and emit setup event after."
This commit is contained in:
commit
57a2de90aa
|
@ -49,7 +49,9 @@ ve.ce.GeneratedContentNode.prototype.onUpdate = function () {
|
|||
var store = this.model.doc.getStore(),
|
||||
index = store.indexOfHash( ve.getHash( this.model ) );
|
||||
if ( index !== null ) {
|
||||
this.emit( 'teardown' );
|
||||
this.$.empty().append( store.value( index ) );
|
||||
this.emit( 'setup' );
|
||||
} else {
|
||||
this.startGenerating();
|
||||
this.generateContents()
|
||||
|
|
Loading…
Reference in a new issue