Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-19548

Add javascript events API for all modifications of the current page that are done async



    • New Feature
    • Resolution: Unresolved
    • Major
    • None
    • 13.4.7
    • None
    • Unknown


      Today more and more features are added allowing to modify the currently viewed page without refreshing the browser window (even if some of these are actually quite old), for example:

      • in-place editing of page content
      • in-place editing of object properties
      • updating (add, edit, delete) comments, annotations
      • updating (add, edit, delete) attachments
      • updating (add, edit, delete) tags
      • updating (add, edit, delete) likes

      There are currently some javascript events for when this happens (e.g. https://www.xwiki.org/xwiki/bin/view/Documentation/DevGuide/FrontendResources/JavaScriptAPI/#HDocumentcontentevents28actionButtons.js29 ), but they're not clearly oriented towards page change (they're rather localized to some actions) and they're also not systematically implemented by all actions.

      There should be a more clear events API that all these actions should fire to allow any new javascript code to be informed of these changes. In addition (as a usage or as a feature), the xwiki-meta API should be systematically kept up-to-date with the state of the page.

      In addition to the list above, many custom features to update the current page asynchronously can be added by custom code. The javascript API implemented by this ticket should also provide a simple API to be used by these new features to fire events as well.


        Issue Links



              Unassigned Unassigned
              lucaa Anca Luca
              0 Vote for this issue
              1 Start watching this issue