mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 13:01:31 +08:00 
			
		
		
		
	
		
			
	
	
		
			2281 lines
		
	
	
		
			24 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
		
		
			
		
	
	
			2281 lines
		
	
	
		
			24 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
|   | <!DOCTYPE html> | ||
|  | <html lang="en"> | ||
|  | <head> | ||
|  |     <meta charset="utf-8"> | ||
|  |     <title>JSDoc: Class: FrontendScriptApi</title> | ||
|  | 
 | ||
|  |     <script src="scripts/prettify/prettify.js"> </script> | ||
|  |     <script src="scripts/prettify/lang-css.js"> </script> | ||
|  |     <!--[if lt IE 9]>
 | ||
|  |       <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> | ||
|  |     <![endif]--> | ||
|  |     <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css"> | ||
|  |     <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css"> | ||
|  | </head> | ||
|  | 
 | ||
|  | <body> | ||
|  | 
 | ||
|  | <div id="main"> | ||
|  | 
 | ||
|  |     <h1 class="page-title">Class: FrontendScriptApi</h1> | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | <section> | ||
|  | 
 | ||
|  | <header> | ||
|  |      | ||
|  |         <h2><span class="attribs"><span class="type-signature"></span></span>FrontendScriptApi</h2> | ||
|  |          | ||
|  |      | ||
|  | </header> | ||
|  | 
 | ||
|  | <article> | ||
|  |     <div class="container-overview"> | ||
|  |      | ||
|  |          | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | <dl class="details"> | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  |     <dt class="tag-source">Source:</dt> | ||
|  |     <dd class="tag-source"><ul class="dummy"><li> | ||
|  |         <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line14">line 14</a> | ||
|  |     </li></ul></dd> | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | </dl> | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  |      | ||
|  |     </div> | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  |         <h3 class="subsection-title">Members</h3> | ||
|  | 
 | ||
|  |          | ||
|  |              | ||
|  | <h4 class="name" id="currentNote"><span class="type-signature"></span>currentNote<span class="type-signature"></span></h4> | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  |     <h5 class="subsection-title">Properties:</h5> | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  | <table class="props"> | ||
|  |     <thead> | ||
|  |     <tr> | ||
|  |          | ||
|  |         <th>Name</th> | ||
|  |          | ||
|  | 
 | ||
|  |         <th>Type</th> | ||
|  | 
 | ||
|  |          | ||
|  | 
 | ||
|  |          | ||
|  | 
 | ||
|  |         <th class="last">Description</th> | ||
|  |     </tr> | ||
|  |     </thead> | ||
|  | 
 | ||
|  |     <tbody> | ||
|  |      | ||
|  | 
 | ||
|  |         <tr> | ||
|  |              | ||
|  |                 <td class="name"><code>note</code></td> | ||
|  |              | ||
|  | 
 | ||
|  |             <td class="type"> | ||
|  |              | ||
|  |                  | ||
|  | <span class="param-type">object</span> | ||
|  | 
 | ||
|  | 
 | ||
|  |              | ||
|  |             </td> | ||
|  | 
 | ||
|  |              | ||
|  | 
 | ||
|  |              | ||
|  | 
 | ||
|  |             <td class="description last">where script is currently executing</td> | ||
|  |         </tr> | ||
|  | 
 | ||
|  |      | ||
|  |     </tbody> | ||
|  | </table> | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | <dl class="details"> | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  |     <dt class="tag-source">Source:</dt> | ||
|  |     <dd class="tag-source"><ul class="dummy"><li> | ||
|  |         <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line20">line 20</a> | ||
|  |     </li></ul></dd> | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | </dl> | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  |          | ||
|  |              | ||
|  | <h4 class="name" id="originEntity"><span class="type-signature"></span>originEntity<span class="type-signature"></span></h4> | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  |     <h5 class="subsection-title">Properties:</h5> | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  | <table class="props"> | ||
|  |     <thead> | ||
|  |     <tr> | ||
|  |          | ||
|  |         <th>Name</th> | ||
|  |          | ||
|  | 
 | ||
|  |         <th>Type</th> | ||
|  | 
 | ||
|  |          | ||
|  | 
 | ||
|  |          | ||
|  | 
 | ||
|  |         <th class="last">Description</th> | ||
|  |     </tr> | ||
|  |     </thead> | ||
|  | 
 | ||
|  |     <tbody> | ||
|  |      | ||
|  | 
 | ||
|  |         <tr> | ||
|  |              | ||
|  |                 <td class="name"><code>entity</code></td> | ||
|  |              | ||
|  | 
 | ||
|  |             <td class="type"> | ||
|  |              | ||
|  |                  | ||
|  | <span class="param-type">object</span> | ||
|  | | | ||
|  | 
 | ||
|  | <span class="param-type">null</span> | ||
|  | 
 | ||
|  | 
 | ||
|  |              | ||
|  |             </td> | ||
|  | 
 | ||
|  |              | ||
|  | 
 | ||
|  |              | ||
|  | 
 | ||
|  |             <td class="description last">whose event triggered this execution</td> | ||
|  |         </tr> | ||
|  | 
 | ||
|  |      | ||
|  |     </tbody> | ||
|  | </table> | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | <dl class="details"> | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  |     <dt class="tag-source">Source:</dt> | ||
|  |     <dd class="tag-source"><ul class="dummy"><li> | ||
|  |         <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line22">line 22</a> | ||
|  |     </li></ul></dd> | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | </dl> | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  |          | ||
|  |              | ||
|  | <h4 class="name" id="startNote"><span class="type-signature"></span>startNote<span class="type-signature"></span></h4> | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  |     <h5 class="subsection-title">Properties:</h5> | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  | <table class="props"> | ||
|  |     <thead> | ||
|  |     <tr> | ||
|  |          | ||
|  |         <th>Name</th> | ||
|  |          | ||
|  | 
 | ||
|  |         <th>Type</th> | ||
|  | 
 | ||
|  |          | ||
|  | 
 | ||
|  |          | ||
|  | 
 | ||
|  |         <th class="last">Description</th> | ||
|  |     </tr> | ||
|  |     </thead> | ||
|  | 
 | ||
|  |     <tbody> | ||
|  |      | ||
|  | 
 | ||
|  |         <tr> | ||
|  |              | ||
|  |                 <td class="name"><code>note</code></td> | ||
|  |              | ||
|  | 
 | ||
|  |             <td class="type"> | ||
|  |              | ||
|  |                  | ||
|  | <span class="param-type">object</span> | ||
|  | 
 | ||
|  | 
 | ||
|  |              | ||
|  |             </td> | ||
|  | 
 | ||
|  |              | ||
|  | 
 | ||
|  |              | ||
|  | 
 | ||
|  |             <td class="description last">where script started executing</td> | ||
|  |         </tr> | ||
|  | 
 | ||
|  |      | ||
|  |     </tbody> | ||
|  | </table> | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | <dl class="details"> | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  |     <dt class="tag-source">Source:</dt> | ||
|  |     <dd class="tag-source"><ul class="dummy"><li> | ||
|  |         <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line18">line 18</a> | ||
|  |     </li></ul></dd> | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | </dl> | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  |          | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  |         <h3 class="subsection-title">Methods</h3> | ||
|  | 
 | ||
|  |          | ||
|  |              | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  |     <h4 class="name" id="activateNewNote"><span class="type-signature"></span>activateNewNote<span class="signature">(notePath)</span><span class="type-signature"> → {Promise.<void>}</span></h4> | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | <div class="description"> | ||
|  |     Activates newly created note. Compared to this.activateNote() also refreshes tree. | ||
|  | </div> | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  |     <h5>Parameters:</h5> | ||
|  |      | ||
|  | 
 | ||
|  | <table class="params"> | ||
|  |     <thead> | ||
|  |     <tr> | ||
|  |          | ||
|  |         <th>Name</th> | ||
|  |          | ||
|  | 
 | ||
|  |         <th>Type</th> | ||
|  | 
 | ||
|  |          | ||
|  | 
 | ||
|  |          | ||
|  | 
 | ||
|  |         <th class="last">Description</th> | ||
|  |     </tr> | ||
|  |     </thead> | ||
|  | 
 | ||
|  |     <tbody> | ||
|  |      | ||
|  | 
 | ||
|  |         <tr> | ||
|  |              | ||
|  |                 <td class="name"><code>notePath</code></td> | ||
|  |              | ||
|  | 
 | ||
|  |             <td class="type"> | ||
|  |              | ||
|  |                  | ||
|  | <span class="param-type">string</span> | ||
|  | 
 | ||
|  | 
 | ||
|  |              | ||
|  |             </td> | ||
|  | 
 | ||
|  |              | ||
|  | 
 | ||
|  |              | ||
|  | 
 | ||
|  |             <td class="description last">(or noteId)</td> | ||
|  |         </tr> | ||
|  | 
 | ||
|  |      | ||
|  |     </tbody> | ||
|  | </table> | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | <dl class="details"> | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  |     <dt class="tag-source">Source:</dt> | ||
|  |     <dd class="tag-source"><ul class="dummy"><li> | ||
|  |         <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line39">line 39</a> | ||
|  |     </li></ul></dd> | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | </dl> | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | <h5>Returns:</h5> | ||
|  | 
 | ||
|  |          | ||
|  | 
 | ||
|  | 
 | ||
|  | <dl> | ||
|  |     <dt> | ||
|  |         Type | ||
|  |     </dt> | ||
|  |     <dd> | ||
|  |          | ||
|  | <span class="param-type">Promise.<void></span> | ||
|  | 
 | ||
|  | 
 | ||
|  |     </dd> | ||
|  | </dl> | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  |          | ||
|  |              | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  |     <h4 class="name" id="activateNote"><span class="type-signature"></span>activateNote<span class="signature">(notePath)</span><span class="type-signature"> → {Promise.<void>}</span></h4> | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | <div class="description"> | ||
|  |     Activates note in the tree and in the note detail. | ||
|  | </div> | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  |     <h5>Parameters:</h5> | ||
|  |      | ||
|  | 
 | ||
|  | <table class="params"> | ||
|  |     <thead> | ||
|  |     <tr> | ||
|  |          | ||
|  |         <th>Name</th> | ||
|  |          | ||
|  | 
 | ||
|  |         <th>Type</th> | ||
|  | 
 | ||
|  |          | ||
|  | 
 | ||
|  |          | ||
|  | 
 | ||
|  |         <th class="last">Description</th> | ||
|  |     </tr> | ||
|  |     </thead> | ||
|  | 
 | ||
|  |     <tbody> | ||
|  |      | ||
|  | 
 | ||
|  |         <tr> | ||
|  |              | ||
|  |                 <td class="name"><code>notePath</code></td> | ||
|  |              | ||
|  | 
 | ||
|  |             <td class="type"> | ||
|  |              | ||
|  |                  | ||
|  | <span class="param-type">string</span> | ||
|  | 
 | ||
|  | 
 | ||
|  |              | ||
|  |             </td> | ||
|  | 
 | ||
|  |              | ||
|  | 
 | ||
|  |              | ||
|  | 
 | ||
|  |             <td class="description last">(or noteId)</td> | ||
|  |         </tr> | ||
|  | 
 | ||
|  |      | ||
|  |     </tbody> | ||
|  | </table> | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | <dl class="details"> | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  |     <dt class="tag-source">Source:</dt> | ||
|  |     <dd class="tag-source"><ul class="dummy"><li> | ||
|  |         <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line31">line 31</a> | ||
|  |     </li></ul></dd> | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | </dl> | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | <h5>Returns:</h5> | ||
|  | 
 | ||
|  |          | ||
|  | 
 | ||
|  | 
 | ||
|  | <dl> | ||
|  |     <dt> | ||
|  |         Type | ||
|  |     </dt> | ||
|  |     <dd> | ||
|  |          | ||
|  | <span class="param-type">Promise.<void></span> | ||
|  | 
 | ||
|  | 
 | ||
|  |     </dd> | ||
|  | </dl> | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  |          | ||
|  |              | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  |     <h4 class="name" id="addButtonToToolbar"><span class="type-signature"></span>addButtonToToolbar<span class="signature">(opts)</span><span class="type-signature"></span></h4> | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | <div class="description"> | ||
|  |     Adds new button the the plugin area. | ||
|  | </div> | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  |     <h5>Parameters:</h5> | ||
|  |      | ||
|  | 
 | ||
|  | <table class="params"> | ||
|  |     <thead> | ||
|  |     <tr> | ||
|  |          | ||
|  |         <th>Name</th> | ||
|  |          | ||
|  | 
 | ||
|  |         <th>Type</th> | ||
|  | 
 | ||
|  |          | ||
|  | 
 | ||
|  |          | ||
|  | 
 | ||
|  |         <th class="last">Description</th> | ||
|  |     </tr> | ||
|  |     </thead> | ||
|  | 
 | ||
|  |     <tbody> | ||
|  |      | ||
|  | 
 | ||
|  |         <tr> | ||
|  |              | ||
|  |                 <td class="name"><code>opts</code></td> | ||
|  |              | ||
|  | 
 | ||
|  |             <td class="type"> | ||
|  |              | ||
|  |                  | ||
|  | <span class="param-type"><a href="global.html#ToolbarButtonOptions">ToolbarButtonOptions</a></span> | ||
|  | 
 | ||
|  | 
 | ||
|  |              | ||
|  |             </td> | ||
|  | 
 | ||
|  |              | ||
|  | 
 | ||
|  |              | ||
|  | 
 | ||
|  |             <td class="description last"></td> | ||
|  |         </tr> | ||
|  | 
 | ||
|  |      | ||
|  |     </tbody> | ||
|  | </table> | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | <dl class="details"> | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  |     <dt class="tag-source">Source:</dt> | ||
|  |     <dd class="tag-source"><ul class="dummy"><li> | ||
|  |         <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line58">line 58</a> | ||
|  |     </li></ul></dd> | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | </dl> | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  |          | ||
|  |              | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  |     <h4 class="name" id="createNoteLink"><span class="type-signature"></span>createNoteLink<span class="signature">(notePath, noteTitle<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | <div class="description"> | ||
|  |     Create note link (jQuery object) for given note. | ||
|  | </div> | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  |     <h5>Parameters:</h5> | ||
|  |      | ||
|  | 
 | ||
|  | <table class="params"> | ||
|  |     <thead> | ||
|  |     <tr> | ||
|  |          | ||
|  |         <th>Name</th> | ||
|  |          | ||
|  | 
 | ||
|  |         <th>Type</th> | ||
|  | 
 | ||
|  |          | ||
|  |         <th>Attributes</th> | ||
|  |          | ||
|  | 
 | ||
|  |          | ||
|  | 
 | ||
|  |         <th class="last">Description</th> | ||
|  |     </tr> | ||
|  |     </thead> | ||
|  | 
 | ||
|  |     <tbody> | ||
|  |      | ||
|  | 
 | ||
|  |         <tr> | ||
|  |              | ||
|  |                 <td class="name"><code>notePath</code></td> | ||
|  |              | ||
|  | 
 | ||
|  |             <td class="type"> | ||
|  |              | ||
|  |                  | ||
|  | <span class="param-type">string</span> | ||
|  | 
 | ||
|  | 
 | ||
|  |              | ||
|  |             </td> | ||
|  | 
 | ||
|  |              | ||
|  |                 <td class="attributes"> | ||
|  |                  | ||
|  | 
 | ||
|  |                  | ||
|  | 
 | ||
|  |                  | ||
|  |                 </td> | ||
|  |              | ||
|  | 
 | ||
|  |              | ||
|  | 
 | ||
|  |             <td class="description last">(or noteId)</td> | ||
|  |         </tr> | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |         <tr> | ||
|  |              | ||
|  |                 <td class="name"><code>noteTitle</code></td> | ||
|  |              | ||
|  | 
 | ||
|  |             <td class="type"> | ||
|  |              | ||
|  |                  | ||
|  | <span class="param-type">string</span> | ||
|  | 
 | ||
|  | 
 | ||
|  |              | ||
|  |             </td> | ||
|  | 
 | ||
|  |              | ||
|  |                 <td class="attributes"> | ||
|  |                  | ||
|  |                     <optional><br> | ||
|  |                  | ||
|  | 
 | ||
|  |                  | ||
|  | 
 | ||
|  |                  | ||
|  |                 </td> | ||
|  |              | ||
|  | 
 | ||
|  |              | ||
|  | 
 | ||
|  |             <td class="description last">if not present we'll use note title</td> | ||
|  |         </tr> | ||
|  | 
 | ||
|  |      | ||
|  |     </tbody> | ||
|  | </table> | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | <dl class="details"> | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  |     <dt class="tag-source">Source:</dt> | ||
|  |     <dd class="tag-source"><ul class="dummy"><li> | ||
|  |         <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line193">line 193</a> | ||
|  |     </li></ul></dd> | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | </dl> | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  |          | ||
|  |              | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  |     <h4 class="name" id="formatDateISO"><span class="type-signature"></span>formatDateISO<span class="signature">(date)</span><span class="type-signature"> → {string}</span></h4> | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  |     <h5>Parameters:</h5> | ||
|  |      | ||
|  | 
 | ||
|  | <table class="params"> | ||
|  |     <thead> | ||
|  |     <tr> | ||
|  |          | ||
|  |         <th>Name</th> | ||
|  |          | ||
|  | 
 | ||
|  |         <th>Type</th> | ||
|  | 
 | ||
|  |          | ||
|  | 
 | ||
|  |          | ||
|  | 
 | ||
|  |         <th class="last">Description</th> | ||
|  |     </tr> | ||
|  |     </thead> | ||
|  | 
 | ||
|  |     <tbody> | ||
|  |      | ||
|  | 
 | ||
|  |         <tr> | ||
|  |              | ||
|  |                 <td class="name"><code>date</code></td> | ||
|  |              | ||
|  | 
 | ||
|  |             <td class="type"> | ||
|  |              | ||
|  |                  | ||
|  | <span class="param-type">Date</span> | ||
|  | 
 | ||
|  | 
 | ||
|  |              | ||
|  |             </td> | ||
|  | 
 | ||
|  |              | ||
|  | 
 | ||
|  |              | ||
|  | 
 | ||
|  |             <td class="description last"></td> | ||
|  |         </tr> | ||
|  | 
 | ||
|  |      | ||
|  |     </tbody> | ||
|  | </table> | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | <dl class="details"> | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  |     <dt class="tag-source">Source:</dt> | ||
|  |     <dd class="tag-source"><ul class="dummy"><li> | ||
|  |         <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line153">line 153</a> | ||
|  |     </li></ul></dd> | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | </dl> | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | <h5>Returns:</h5> | ||
|  | 
 | ||
|  |          | ||
|  | <div class="param-desc"> | ||
|  |     date in YYYY-MM-DD format | ||
|  | </div> | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | <dl> | ||
|  |     <dt> | ||
|  |         Type | ||
|  |     </dt> | ||
|  |     <dd> | ||
|  |          | ||
|  | <span class="param-type">string</span> | ||
|  | 
 | ||
|  | 
 | ||
|  |     </dd> | ||
|  | </dl> | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  |          | ||
|  |              | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  |     <h4 class="name" id="getInstanceName"><span class="type-signature"></span>getInstanceName<span class="signature">()</span><span class="type-signature"> → {string}</span></h4> | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | <div class="description"> | ||
|  |     Instance name identifies particular Trilium instance. It can be useful for scripts | ||
|  | if some action needs to happen on only one specific instance. | ||
|  | </div> | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | <dl class="details"> | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  |     <dt class="tag-source">Source:</dt> | ||
|  |     <dd class="tag-source"><ul class="dummy"><li> | ||
|  |         <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line146">line 146</a> | ||
|  |     </li></ul></dd> | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | </dl> | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | <h5>Returns:</h5> | ||
|  | 
 | ||
|  |          | ||
|  | 
 | ||
|  | 
 | ||
|  | <dl> | ||
|  |     <dt> | ||
|  |         Type | ||
|  |     </dt> | ||
|  |     <dd> | ||
|  |          | ||
|  | <span class="param-type">string</span> | ||
|  | 
 | ||
|  | 
 | ||
|  |     </dd> | ||
|  | </dl> | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  |          | ||
|  |              | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  |     <h4 class="name" id="getNotes"><span class="type-signature"></span>getNotes<span class="signature">(noteIds, silentNotFoundError<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Promise.<Array.<<a href="NoteShort.html">NoteShort</a>>>}</span></h4> | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | <div class="description"> | ||
|  |     Returns list of notes. If note is missing from cache, it's loaded. | ||
|  | 
 | ||
|  | This is often used to bulk-fill the cache with notes which would have to be picked one by one | ||
|  | otherwise (by e.g. createNoteLink()) | ||
|  | </div> | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  |     <h5>Parameters:</h5> | ||
|  |      | ||
|  | 
 | ||
|  | <table class="params"> | ||
|  |     <thead> | ||
|  |     <tr> | ||
|  |          | ||
|  |         <th>Name</th> | ||
|  |          | ||
|  | 
 | ||
|  |         <th>Type</th> | ||
|  | 
 | ||
|  |          | ||
|  |         <th>Attributes</th> | ||
|  |          | ||
|  | 
 | ||
|  |          | ||
|  | 
 | ||
|  |         <th class="last">Description</th> | ||
|  |     </tr> | ||
|  |     </thead> | ||
|  | 
 | ||
|  |     <tbody> | ||
|  |      | ||
|  | 
 | ||
|  |         <tr> | ||
|  |              | ||
|  |                 <td class="name"><code>noteIds</code></td> | ||
|  |              | ||
|  | 
 | ||
|  |             <td class="type"> | ||
|  |              | ||
|  |                  | ||
|  | <span class="param-type">Array.<string></span> | ||
|  | 
 | ||
|  | 
 | ||
|  |              | ||
|  |             </td> | ||
|  | 
 | ||
|  |              | ||
|  |                 <td class="attributes"> | ||
|  |                  | ||
|  | 
 | ||
|  |                  | ||
|  | 
 | ||
|  |                  | ||
|  |                 </td> | ||
|  |              | ||
|  | 
 | ||
|  |              | ||
|  | 
 | ||
|  |             <td class="description last"></td> | ||
|  |         </tr> | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |         <tr> | ||
|  |              | ||
|  |                 <td class="name"><code>silentNotFoundError</code></td> | ||
|  |              | ||
|  | 
 | ||
|  |             <td class="type"> | ||
|  |              | ||
|  |                  | ||
|  | <span class="param-type">boolean</span> | ||
|  | 
 | ||
|  | 
 | ||
|  |              | ||
|  |             </td> | ||
|  | 
 | ||
|  |              | ||
|  |                 <td class="attributes"> | ||
|  |                  | ||
|  |                     <optional><br> | ||
|  |                  | ||
|  | 
 | ||
|  |                  | ||
|  | 
 | ||
|  |                  | ||
|  |                 </td> | ||
|  |              | ||
|  | 
 | ||
|  |              | ||
|  | 
 | ||
|  |             <td class="description last">don't report error if the note is not found</td> | ||
|  |         </tr> | ||
|  | 
 | ||
|  |      | ||
|  |     </tbody> | ||
|  | </table> | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | <dl class="details"> | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  |     <dt class="tag-source">Source:</dt> | ||
|  |     <dd class="tag-source"><ul class="dummy"><li> | ||
|  |         <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line138">line 138</a> | ||
|  |     </li></ul></dd> | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | </dl> | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | <h5>Returns:</h5> | ||
|  | 
 | ||
|  |          | ||
|  | 
 | ||
|  | 
 | ||
|  | <dl> | ||
|  |     <dt> | ||
|  |         Type | ||
|  |     </dt> | ||
|  |     <dd> | ||
|  |          | ||
|  | <span class="param-type">Promise.<Array.<<a href="NoteShort.html">NoteShort</a>>></span> | ||
|  | 
 | ||
|  | 
 | ||
|  |     </dd> | ||
|  | </dl> | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  |          | ||
|  |              | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  |     <h4 class="name" id="parseDate"><span class="type-signature"></span>parseDate<span class="signature">(str)</span><span class="type-signature"> → {Date}</span></h4> | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  |     <h5>Parameters:</h5> | ||
|  |      | ||
|  | 
 | ||
|  | <table class="params"> | ||
|  |     <thead> | ||
|  |     <tr> | ||
|  |          | ||
|  |         <th>Name</th> | ||
|  |          | ||
|  | 
 | ||
|  |         <th>Type</th> | ||
|  | 
 | ||
|  |          | ||
|  | 
 | ||
|  |          | ||
|  | 
 | ||
|  |         <th class="last">Description</th> | ||
|  |     </tr> | ||
|  |     </thead> | ||
|  | 
 | ||
|  |     <tbody> | ||
|  |      | ||
|  | 
 | ||
|  |         <tr> | ||
|  |              | ||
|  |                 <td class="name"><code>str</code></td> | ||
|  |              | ||
|  | 
 | ||
|  |             <td class="type"> | ||
|  |              | ||
|  |                  | ||
|  | <span class="param-type">string</span> | ||
|  | 
 | ||
|  | 
 | ||
|  |              | ||
|  |             </td> | ||
|  | 
 | ||
|  |              | ||
|  | 
 | ||
|  |              | ||
|  | 
 | ||
|  |             <td class="description last"></td> | ||
|  |         </tr> | ||
|  | 
 | ||
|  |      | ||
|  |     </tbody> | ||
|  | </table> | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | <dl class="details"> | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  |     <dt class="tag-source">Source:</dt> | ||
|  |     <dd class="tag-source"><ul class="dummy"><li> | ||
|  |         <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line160">line 160</a> | ||
|  |     </li></ul></dd> | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | </dl> | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | <h5>Returns:</h5> | ||
|  | 
 | ||
|  |          | ||
|  | <div class="param-desc"> | ||
|  |     parsed object | ||
|  | </div> | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | <dl> | ||
|  |     <dt> | ||
|  |         Type | ||
|  |     </dt> | ||
|  |     <dd> | ||
|  |          | ||
|  | <span class="param-type">Date</span> | ||
|  | 
 | ||
|  | 
 | ||
|  |     </dd> | ||
|  | </dl> | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  |          | ||
|  |              | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  |     <h4 class="name" id="refreshTree"><span class="type-signature"></span>refreshTree<span class="signature">()</span><span class="type-signature"> → {Promise.<void>}</span></h4> | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | <div class="description"> | ||
|  |     Refresh tree | ||
|  | </div> | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | <dl class="details"> | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  |     <dt class="tag-source">Source:</dt> | ||
|  |     <dd class="tag-source"><ul class="dummy"><li> | ||
|  |         <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line184">line 184</a> | ||
|  |     </li></ul></dd> | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | </dl> | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | <h5>Returns:</h5> | ||
|  | 
 | ||
|  |          | ||
|  | 
 | ||
|  | 
 | ||
|  | <dl> | ||
|  |     <dt> | ||
|  |         Type | ||
|  |     </dt> | ||
|  |     <dd> | ||
|  |          | ||
|  | <span class="param-type">Promise.<void></span> | ||
|  | 
 | ||
|  | 
 | ||
|  |     </dd> | ||
|  | </dl> | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  |          | ||
|  |              | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  |     <h4 class="name" id="runOnServer"><span class="type-signature"></span>runOnServer<span class="signature">(script, params)</span><span class="type-signature"> → {Promise.<*>}</span></h4> | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | <div class="description"> | ||
|  |     Executes given anonymous function on the server. | ||
|  | Internally this serializes the anonymous function into string and sends it to backend via AJAX. | ||
|  | </div> | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  |     <h5>Parameters:</h5> | ||
|  |      | ||
|  | 
 | ||
|  | <table class="params"> | ||
|  |     <thead> | ||
|  |     <tr> | ||
|  |          | ||
|  |         <th>Name</th> | ||
|  |          | ||
|  | 
 | ||
|  |         <th>Type</th> | ||
|  | 
 | ||
|  |          | ||
|  | 
 | ||
|  |          | ||
|  | 
 | ||
|  |         <th class="last">Description</th> | ||
|  |     </tr> | ||
|  |     </thead> | ||
|  | 
 | ||
|  |     <tbody> | ||
|  |      | ||
|  | 
 | ||
|  |         <tr> | ||
|  |              | ||
|  |                 <td class="name"><code>script</code></td> | ||
|  |              | ||
|  | 
 | ||
|  |             <td class="type"> | ||
|  |              | ||
|  |                  | ||
|  | <span class="param-type">string</span> | ||
|  | 
 | ||
|  | 
 | ||
|  |              | ||
|  |             </td> | ||
|  | 
 | ||
|  |              | ||
|  | 
 | ||
|  |              | ||
|  | 
 | ||
|  |             <td class="description last">script to be executed on the backend</td> | ||
|  |         </tr> | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |         <tr> | ||
|  |              | ||
|  |                 <td class="name"><code>params</code></td> | ||
|  |              | ||
|  | 
 | ||
|  |             <td class="type"> | ||
|  |              | ||
|  |                  | ||
|  | <span class="param-type">Array.<?></span> | ||
|  | 
 | ||
|  | 
 | ||
|  |              | ||
|  |             </td> | ||
|  | 
 | ||
|  |              | ||
|  | 
 | ||
|  |              | ||
|  | 
 | ||
|  |             <td class="description last">list of parameters to the anonymous function to be send to backend</td> | ||
|  |         </tr> | ||
|  | 
 | ||
|  |      | ||
|  |     </tbody> | ||
|  | </table> | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | <dl class="details"> | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  |     <dt class="tag-source">Source:</dt> | ||
|  |     <dd class="tag-source"><ul class="dummy"><li> | ||
|  |         <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line106">line 106</a> | ||
|  |     </li></ul></dd> | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | </dl> | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | <h5>Returns:</h5> | ||
|  | 
 | ||
|  |          | ||
|  | <div class="param-desc"> | ||
|  |     return value of the executed function on the backend | ||
|  | </div> | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | <dl> | ||
|  |     <dt> | ||
|  |         Type | ||
|  |     </dt> | ||
|  |     <dd> | ||
|  |          | ||
|  | <span class="param-type">Promise.<*></span> | ||
|  | 
 | ||
|  | 
 | ||
|  |     </dd> | ||
|  | </dl> | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  |          | ||
|  |              | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  |     <h4 class="name" id="showError"><span class="type-signature"></span>showError<span class="signature">(message)</span><span class="type-signature"></span></h4> | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | <div class="description"> | ||
|  |     Show error message to the user. | ||
|  | </div> | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  |     <h5>Parameters:</h5> | ||
|  |      | ||
|  | 
 | ||
|  | <table class="params"> | ||
|  |     <thead> | ||
|  |     <tr> | ||
|  |          | ||
|  |         <th>Name</th> | ||
|  |          | ||
|  | 
 | ||
|  |         <th>Type</th> | ||
|  | 
 | ||
|  |          | ||
|  | 
 | ||
|  |          | ||
|  | 
 | ||
|  |         <th class="last">Description</th> | ||
|  |     </tr> | ||
|  |     </thead> | ||
|  | 
 | ||
|  |     <tbody> | ||
|  |      | ||
|  | 
 | ||
|  |         <tr> | ||
|  |              | ||
|  |                 <td class="name"><code>message</code></td> | ||
|  |              | ||
|  | 
 | ||
|  |             <td class="type"> | ||
|  |              | ||
|  |                  | ||
|  | <span class="param-type">string</span> | ||
|  | 
 | ||
|  | 
 | ||
|  |              | ||
|  |             </td> | ||
|  | 
 | ||
|  |              | ||
|  | 
 | ||
|  |              | ||
|  | 
 | ||
|  |             <td class="description last"></td> | ||
|  |         </tr> | ||
|  | 
 | ||
|  |      | ||
|  |     </tbody> | ||
|  | </table> | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | <dl class="details"> | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  |     <dt class="tag-source">Source:</dt> | ||
|  |     <dd class="tag-source"><ul class="dummy"><li> | ||
|  |         <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line176">line 176</a> | ||
|  |     </li></ul></dd> | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | </dl> | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  |          | ||
|  |              | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  |     <h4 class="name" id="showMessage"><span class="type-signature"></span>showMessage<span class="signature">(message)</span><span class="type-signature"></span></h4> | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | <div class="description"> | ||
|  |     Show info message to the user. | ||
|  | </div> | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  |     <h5>Parameters:</h5> | ||
|  |      | ||
|  | 
 | ||
|  | <table class="params"> | ||
|  |     <thead> | ||
|  |     <tr> | ||
|  |          | ||
|  |         <th>Name</th> | ||
|  |          | ||
|  | 
 | ||
|  |         <th>Type</th> | ||
|  | 
 | ||
|  |          | ||
|  | 
 | ||
|  |          | ||
|  | 
 | ||
|  |         <th class="last">Description</th> | ||
|  |     </tr> | ||
|  |     </thead> | ||
|  | 
 | ||
|  |     <tbody> | ||
|  |      | ||
|  | 
 | ||
|  |         <tr> | ||
|  |              | ||
|  |                 <td class="name"><code>message</code></td> | ||
|  |              | ||
|  | 
 | ||
|  |             <td class="type"> | ||
|  |              | ||
|  |                  | ||
|  | <span class="param-type">string</span> | ||
|  | 
 | ||
|  | 
 | ||
|  |              | ||
|  |             </td> | ||
|  | 
 | ||
|  |              | ||
|  | 
 | ||
|  |              | ||
|  | 
 | ||
|  |             <td class="description last"></td> | ||
|  |         </tr> | ||
|  | 
 | ||
|  |      | ||
|  |     </tbody> | ||
|  | </table> | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | <dl class="details"> | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  |     <dt class="tag-source">Source:</dt> | ||
|  |     <dd class="tag-source"><ul class="dummy"><li> | ||
|  |         <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line168">line 168</a> | ||
|  |     </li></ul></dd> | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | </dl> | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  |          | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | 
 | ||
|  |      | ||
|  | </article> | ||
|  | 
 | ||
|  | </section> | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | </div> | ||
|  | 
 | ||
|  | <nav> | ||
|  |     <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteFull.html">NoteFull</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3><a href="global.html">Global</a></h3> | ||
|  | </nav> | ||
|  | 
 | ||
|  | <br class="clear"> | ||
|  | 
 | ||
|  | <footer> | ||
|  |     Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Aug 29 2018 20:44:07 GMT+0200 (CEST) | ||
|  | </footer> | ||
|  | 
 | ||
|  | <script> prettyPrint(); </script> | ||
|  | <script src="scripts/linenumber.js"> </script> | ||
|  | </body> | ||
|  | </html> |