<
From version < 22.1 >
edited by Vincent Massol
on 2015/01/30
To version < 23.1 >
edited by Marius Dumitru Florea
on 2015/02/03
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.VincentMassol
1 +XWiki.mflorea
Content
... ... @@ -354,6 +354,24 @@
354 354  </extension>
355 355  {{/code}}
356 356  
357 +== Bridging custom XWiki events from Prototype to jQuery ==
358 +
359 +Starting with this version you can catch from jQuery the custom XWiki events that are fired from Prototype.
360 +
361 +{{code language="js"}}
362 +require(['jquery', 'xwiki-events-bridge'], function($) {
363 + $('.some-element').on('xwiki:moduleName:eventName', function(event, data) {
364 + // Here, do something that will be executed at the moment the event is fired.
365 + doSomething();
366 +
367 + // The passed data is a reference to the event.memo from Prototype.
368 + console.log(data.somethingINeedToKnow);
369 + });
370 +});
371 +{{/code}}
372 +
373 +See the [[JavaScript API documentation>>platform:DevGuide.JavaScriptAPI]] for the list of events that you can listen to.
374 +
357 357  == Miscellaneous ==
358 358  
359 359  * Added new APIs to get all the icon themes present on the wiki, and all icons that these icon themes contain.(((

Get Connected