Changes between Version 3 and Version 11 of Ticket #13337
- Timestamp:
- Jun 10, 2015, 9:22:22 AM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #13337
-
Property
Status
changed from
reviewtoclosed -
Property
Summary
changed from
Improve way of listening to events on widgets repo.toConvenient way to listen to widget events through the repository -
Property
Version
changed from
to4.3 Beta -
Property
Resolution
changed from
tofixed
-
Property
Status
changed from
-
Ticket #13337 – Description
v3 v11 1 There should be such API available. 1 Listening to widget events isn't easy if one is not the widget author. Widgets are created dynamically so first we need to listen to `repository#instanceCreated` and add listeners to every created instance of the type that we are interested in. 2 3 More convenient way would be a good addition to the API: 4 2 5 {{{ 3 editor.widgets.on Change('image2', 'data', func() {});6 editor.widgets.onWidget('image2', 'data', func() {}); 4 7 }}} 5 8 6 So we are listening once on widgets repo, and callback is executed when event occur on specific widget.7 8 Callback function should be called on elements which are created after adding listener callback.
