Scripts dropped from asynchronous rendering results

Last modified by Marius Dumitru Florea on 2026/11/23 19:14

When the result of an asynchronous rendering is inserted in the page, its JavaScript <script> elements are now removed instead of being executed, whether inline or loaded with a src attribute. Data blocks such as <script type="application/json"> are kept. The JavaScript that asynchronous content needs should be loaded through skin extensions, which keep being loaded with the result, after it is inserted: such a script should initialize the matching elements already in the page when it runs, and listen to the xwiki:dom:updated event for content inserted later. This event now targets the inserted elements instead of the placeholder they replace. See the DOM events of the JavaScript API.

Get Connected