Event Author API

widgetedit:widget:ready

Fires when the widget (Question or Feature) JSON has changed and the preview panel has finished rendering.

You would want to be notified about this event firing, because you might want to take some action when the widget JSON has changed and finished rendering.

This event is fired after the widgetedit:widget:changed event, after setWidget() is called, or the author chooses a new Question or Feature type.

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

Examples

// Run each time the event is fired
authorApp.on('widgetedit:widget:ready', function () {
    console.log('This code executes when the preview panel has finished rendering.');
});

// Run only once, the first time the event is fired
authorApp.once('widgetedit:widget:ready', function () {
    console.log('This code executes only once, when the preview panel has finished rendering.');
});

Related articles

Was this article helpful?