Changes for page XWiki JavaScript API

Last modified by Simon Urli on 2022/09/14

<
From version < 34.1 >
edited by Thomas Mortagne
on 2015/08/07
To version < 35.1 >
edited by Guillaume Delhumeau
on 2015/08/27
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.ThomasMortagne
1 +XWiki.gdelhumeau
Content
... ... @@ -200,13 +200,14 @@
200 200  
201 201  {{code language="javascript"}}
202 202  require(['xwiki-meta'], function (xm) {
203 - xm.document // get the current document (eg: Main.WebHome)
204 - xm.wiki // get the current wiki (eg: xwiki)
205 - xm.space // get the current space (eg: Main)
206 - xm.page // get the current page name (eg: WebHome)
207 - xm.version // get the current document version (eg: 1.1)
208 - xm.restURL // get the REST url of the current doc (eg: /xwiki/rest/wikis/xwiki/spaces/Main/pages/WebHome)
209 - xm.form_token // get the current CSRF token that you should pass to your scripts to avoid CSRF attacks.
203 + xm.documentReference // since 7.3M2, get the reference of the current document (as a DocumentReference object).
204 + xm.document // get the current document (eg: Main.WebHome) -- deprecated since 7.3M2, use documentReference instead
205 + xm.wiki // get the current wiki (eg: xwiki) -- deprecated since 7.3M2, use documentReference instead
206 + xm.space // get the current space (eg: Main) -- deprecated since 7.3M2, use documentReference instead
207 + xm.page // get the current page name (eg: WebHome) -- deprecated since 7.3M2, use documentReference instead
208 + xm.version // get the current document version (eg: 1.1)
209 + xm.restURL // get the REST url of the current doc (eg: /xwiki/rest/wikis/xwiki/spaces/Main/pages/WebHome)
210 + xm.form_token // get the current CSRF token that you should pass to your scripts to avoid CSRF attacks.
210 210  });
211 211  {{/code}}
212 212  

Get Connected