I need to use js to define the identifier of the active (open / editable) widget.

+

Catch the event (trigger) switch the active widget.

Is there a built-in js api for these events?

I need something like this:

 jQuery(document).on('widget-updated', function(event, widget){
 //...
 });
jQuery(document).on('widget-added', function(event, widget){
 //...
 });

Or js object (view) with this data.

Read more here: How to define active widget with js in a customizer


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: