Javascript events of adding and modifying widgets

Get notifications about adding and modifying the object.

MPCEObjectCreated event fires after widget was added to stage. Example of adding the object:

$('body').on('MPCEObjectCreated', function(event, wrapper, shortcodeName){
/* callback */
});
MPCEObjectUpdated event fires after widget was changed. Example of editing the object:

$('body').on('MPCEObjectUpdated', function(event, wrapper, shortcodeName){
/* callback */
});

where wrapper – is HTML element that includes whole rendered shortcode.