Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
dev:client_coding:javascript_api [2020/03/30 00:34] – [Batch Editing] Add creator editing example dstillmandev:client_coding:javascript_api [2020/04/16 16:02] – [Running Ad Hoc JavaScript in Zotero] dstillman
Line 11: Line 11:
  
   - In the Tools → Developer menu, select Run JavaScript. Opening the Error Console, which appears in the same menu, will also be helpful.   - In the Tools → Developer menu, select Run JavaScript. Opening the Error Console, which appears in the same menu, will also be helpful.
-  - In the window that opens, enter JavaScript in the Code textbox and click Run or press Cmd-R/Ctrl-R.+  - In the window that opens, enter some JavaScript in the Code textbox and click Run or press Cmd-R/Ctrl-R.
  
 When running **asynchronous** code containing ''await'', the entered code is wrapped in an [[https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function|async function]], allowing you to wait for the resolution of promises returned by functions. Most Zotero functions that access the database, disk, or network are asynchronous. In this mode, the value of a ''return'' statement will be displayed in the right-hand pane upon successful completion. E.g. returning the currently selected item(s) When running **asynchronous** code containing ''await'', the entered code is wrapped in an [[https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function|async function]], allowing you to wait for the resolution of promises returned by functions. Most Zotero functions that access the database, disk, or network are asynchronous. In this mode, the value of a ''return'' statement will be displayed in the right-hand pane upon successful completion. E.g. returning the currently selected item(s)
dev/client_coding/javascript_api.txt · Last modified: 2022/07/02 18:22 by dstillman