Event Author API

widgetedit:preview:changed

Fires whenever the preview pane is updated, due to authors changing Question or Feature (widget) attributes.

You would want to be notified about this event firing, because you might want to take some action once the preview is rendered, for example.

The once() method can be used to listen to this event.

Examples

// Run each time the event is fired
authorApp.on('widgetedit:preview:changed', function () {
    console.log('This code executes when the preview pane has updated.');
});

// Run only once, the first time the event is fired
authorApp.once('widgetedit:preview:changed', function () {
    console.log('This code executes only once, when the preview pane has updated.');
});
Was this article helpful?