|
106 | 106 | /** |
107 | 107 | * Adds support for WorkerComm APIs to the provided web-Worker instance. Only available in the main thread. |
108 | 108 | * This API should be called immediately after creating the worker in main thread. |
109 | | - * @example <caption>Create a web-worker with `WorkerComm` in an extension.</caption> |
| 109 | + * Create a web-worker with `WorkerComm` in an extension. |
110 | 110 | * // load the worker [See API docs for full sample] |
111 | 111 | * const _myWorker = new Worker( |
112 | 112 | * `${workerPath}?workerCommUrl=${workerCommUrl}&eventDispatcherURL=${eventDispatcherURL}`); |
|
126 | 126 |
|
127 | 127 | /** |
128 | 128 | * Sets a named function execution handler in the main thread or worker thread. |
129 | | - * @example <caption>To set a named function `sayHello` in worker and phoenix</caption> |
| 129 | + * To set a named function `sayHello` in worker and phoenix |
130 | 130 | * |
131 | 131 | * function sayHello(arg)=>{ |
132 | 132 | * console.log("hello from worker ", arg); // prints "hello from worker phoenix" |
|
153 | 153 | * Executes the named function at the other end if present. If this is called from the main thread, it will |
154 | 154 | * execute the function at the worker thread and vice-versa. The function to execute |
155 | 155 | * is set with API `setExecHandler`. |
156 | | - * @example <caption>To Execute a named function `sayHello` in the worker from phoenix</caption> |
| 156 | + * To Execute a named function `sayHello` in the worker from phoenix |
157 | 157 | * // in my_worker.js |
158 | 158 | * WorkerComm.setExecHandler("sayHello", (arg)=>{ |
159 | 159 | * console.log("hello from worker ", arg); // prints "hello from worker phoenix" |
|
184 | 184 | * Triggers events at the other end on the eventDispatcher. If this is called from the main thread, it will |
185 | 185 | * trigger `WorkerComm` global at the worker thread. If this is called from the worker thread, it will |
186 | 186 | * trigger `eventDispatcher` used in `createWorkerComm` API call when creating the worker. |
187 | | - * @example <caption>To Trigger a named event `searchDone` from worker to phoenix</caption> |
| 187 | + * To Trigger a named event `searchDone` from worker to phoenix |
188 | 188 | * // in my_worker.js |
189 | 189 | * WorkerComm.triggerPeer("searchDone", {matches: 2}); |
190 | 190 | * |
|
222 | 222 | /** |
223 | 223 | * Loads a script into the worker context. Only available within the main thread. This can be used |
224 | 224 | * by the main Phoenix thread to dynamically load scripts in the worker-thread. |
225 | | - * @example <caption>To load a script `add_worker_Script.js` into the your worker:</caption> |
| 225 | + * To load a script `add_worker_Script.js` into the your worker: |
226 | 226 | * WorkerComm.createWorkerComm(_myWorker, exports); |
227 | 227 | * ..... |
228 | 228 | * let ExtensionUtils = brackets.getModule("utils/ExtensionUtils"); |
|
0 commit comments