Changes for page Release Notes for XWiki 7.1 Milestone 1
Last modified by Thomas Mortagne on 2017/03/24
Change comment:
There is no comment for this version
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. ThomasMortagne1 +XWiki.mflorea - Content
-
... ... @@ -31,10 +31,26 @@ 31 31 32 32 = For Developers = 33 33 34 -== <developerfeatureN>==34 +== Trigger Prototype Event Listeners from jQuery == 35 35 36 - <description ofveloperfeatureN>36 +The event listeners registered from Prototype are now notified when a custom XWiki event is fired using the jQuery API. 37 37 38 +{{code language="js"}} 39 +// Prototype (old code that you don't have time to rewrite) 40 +document.observe('xwiki:dom:updated', function(event) { 41 + event.memo.elements.each(function(element) { 42 + // Do something. 43 + }); 44 +}); 45 +... 46 +// jQuery (new code) 47 +require(['jquery', 'xwiki-events-bridge'], function($) { 48 + $(document).trigger('xwiki:dom:updated', {'elements': $('.some-container').toArray()}); 49 +}); 50 +{{/code}} 51 + 52 +See the [[developer's guide>>platform:DevGuide.JavaScriptAPI||anchor="HBridgingcustomXWikieventsbetweenPrototypeandjQuery"]] for more details. 53 + 38 38 == Deprecated and Retired projects == 39 39 40 40 <description of deprecated and retired projects>