github.com/primecitizens/pcz/std@v0.2.1/plat/js/webext/omnibox/bindings/ffi_bindings.ts (about) 1 import { importModule, Application, heap, Pointer } from "@ffi"; 2 3 importModule("plat/js/webext/omnibox", (A: Application) => { 4 const WEBEXT = typeof globalThis.browser === "undefined" ? globalThis.chrome : globalThis.browser; 5 6 return { 7 "constof_DescriptionStyleType": (ref: heap.Ref<string>): number => { 8 const idx = ["url", "match", "dim"].indexOf(A.H.get(ref)); 9 return idx < 0 ? 0 : idx + 1; 10 }, 11 12 "store_MatchClassification": (ptr: Pointer, ref: heap.Ref<any>) => { 13 const x = A.H.get<any>(ref); 14 15 if (typeof x === "undefined") { 16 A.store.Bool(ptr + 21, false); 17 A.store.Bool(ptr + 20, false); 18 A.store.Int64(ptr + 0, 0); 19 A.store.Int64(ptr + 8, 0); 20 A.store.Enum(ptr + 16, -1); 21 } else { 22 A.store.Bool(ptr + 21, true); 23 A.store.Bool(ptr + 20, "length" in x ? true : false); 24 A.store.Int64(ptr + 0, x["length"] === undefined ? 0 : (x["length"] as number)); 25 A.store.Int64(ptr + 8, x["offset"] === undefined ? 0 : (x["offset"] as number)); 26 A.store.Enum(ptr + 16, ["url", "match", "dim"].indexOf(x["type"] as string)); 27 } 28 }, 29 "load_MatchClassification": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => { 30 const x = create === A.H.TRUE ? {} : A.H.get<any>(ref); 31 32 if (A.load.Bool(ptr + 20)) { 33 x["length"] = A.load.Int64(ptr + 0); 34 } else { 35 delete x["length"]; 36 } 37 x["offset"] = A.load.Int64(ptr + 8); 38 x["type"] = A.load.Enum(ptr + 16, ["url", "match", "dim"]); 39 return create === A.H.TRUE ? A.H.push(x) : ref; 40 }, 41 42 "store_DefaultSuggestResult": (ptr: Pointer, ref: heap.Ref<any>) => { 43 const x = A.H.get<any>(ref); 44 45 if (typeof x === "undefined") { 46 A.store.Bool(ptr + 8, false); 47 A.store.Ref(ptr + 0, undefined); 48 A.store.Ref(ptr + 4, undefined); 49 } else { 50 A.store.Bool(ptr + 8, true); 51 A.store.Ref(ptr + 0, x["description"]); 52 A.store.Ref(ptr + 4, x["descriptionStyles"]); 53 } 54 }, 55 "load_DefaultSuggestResult": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => { 56 const x = create === A.H.TRUE ? {} : A.H.get<any>(ref); 57 58 x["description"] = A.load.Ref(ptr + 0, undefined); 59 x["descriptionStyles"] = A.load.Ref(ptr + 4, undefined); 60 return create === A.H.TRUE ? A.H.push(x) : ref; 61 }, 62 63 "store_SuggestResult": (ptr: Pointer, ref: heap.Ref<any>) => { 64 const x = A.H.get<any>(ref); 65 66 if (typeof x === "undefined") { 67 A.store.Bool(ptr + 17, false); 68 A.store.Ref(ptr + 0, undefined); 69 A.store.Bool(ptr + 16, false); 70 A.store.Bool(ptr + 4, false); 71 A.store.Ref(ptr + 8, undefined); 72 A.store.Ref(ptr + 12, undefined); 73 } else { 74 A.store.Bool(ptr + 17, true); 75 A.store.Ref(ptr + 0, x["content"]); 76 A.store.Bool(ptr + 16, "deletable" in x ? true : false); 77 A.store.Bool(ptr + 4, x["deletable"] ? true : false); 78 A.store.Ref(ptr + 8, x["description"]); 79 A.store.Ref(ptr + 12, x["descriptionStyles"]); 80 } 81 }, 82 "load_SuggestResult": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => { 83 const x = create === A.H.TRUE ? {} : A.H.get<any>(ref); 84 85 x["content"] = A.load.Ref(ptr + 0, undefined); 86 if (A.load.Bool(ptr + 16)) { 87 x["deletable"] = A.load.Bool(ptr + 4); 88 } else { 89 delete x["deletable"]; 90 } 91 x["description"] = A.load.Ref(ptr + 8, undefined); 92 x["descriptionStyles"] = A.load.Ref(ptr + 12, undefined); 93 return create === A.H.TRUE ? A.H.push(x) : ref; 94 }, 95 "constof_OnInputEnteredDisposition": (ref: heap.Ref<string>): number => { 96 const idx = ["currentTab", "newForegroundTab", "newBackgroundTab"].indexOf(A.H.get(ref)); 97 return idx < 0 ? 0 : idx + 1; 98 }, 99 "has_OnDeleteSuggestion": (): heap.Ref<boolean> => { 100 if (WEBEXT?.omnibox?.onDeleteSuggestion && "addListener" in WEBEXT?.omnibox?.onDeleteSuggestion) { 101 return A.H.TRUE; 102 } 103 return A.H.FALSE; 104 }, 105 "func_OnDeleteSuggestion": (fn: Pointer): void => { 106 A.store.Ref(fn, WEBEXT.omnibox.onDeleteSuggestion.addListener); 107 }, 108 "call_OnDeleteSuggestion": (retPtr: Pointer, callback: heap.Ref<object>): void => { 109 const _ret = WEBEXT.omnibox.onDeleteSuggestion.addListener(A.H.get<object>(callback)); 110 }, 111 "try_OnDeleteSuggestion": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => { 112 try { 113 const _ret = WEBEXT.omnibox.onDeleteSuggestion.addListener(A.H.get<object>(callback)); 114 return A.H.TRUE; 115 } catch (err: any) { 116 A.store.Ref(errPtr, err); 117 return A.H.FALSE; 118 } 119 }, 120 "has_OffDeleteSuggestion": (): heap.Ref<boolean> => { 121 if (WEBEXT?.omnibox?.onDeleteSuggestion && "removeListener" in WEBEXT?.omnibox?.onDeleteSuggestion) { 122 return A.H.TRUE; 123 } 124 return A.H.FALSE; 125 }, 126 "func_OffDeleteSuggestion": (fn: Pointer): void => { 127 A.store.Ref(fn, WEBEXT.omnibox.onDeleteSuggestion.removeListener); 128 }, 129 "call_OffDeleteSuggestion": (retPtr: Pointer, callback: heap.Ref<object>): void => { 130 const _ret = WEBEXT.omnibox.onDeleteSuggestion.removeListener(A.H.get<object>(callback)); 131 }, 132 "try_OffDeleteSuggestion": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => { 133 try { 134 const _ret = WEBEXT.omnibox.onDeleteSuggestion.removeListener(A.H.get<object>(callback)); 135 return A.H.TRUE; 136 } catch (err: any) { 137 A.store.Ref(errPtr, err); 138 return A.H.FALSE; 139 } 140 }, 141 "has_HasOnDeleteSuggestion": (): heap.Ref<boolean> => { 142 if (WEBEXT?.omnibox?.onDeleteSuggestion && "hasListener" in WEBEXT?.omnibox?.onDeleteSuggestion) { 143 return A.H.TRUE; 144 } 145 return A.H.FALSE; 146 }, 147 "func_HasOnDeleteSuggestion": (fn: Pointer): void => { 148 A.store.Ref(fn, WEBEXT.omnibox.onDeleteSuggestion.hasListener); 149 }, 150 "call_HasOnDeleteSuggestion": (retPtr: Pointer, callback: heap.Ref<object>): void => { 151 const _ret = WEBEXT.omnibox.onDeleteSuggestion.hasListener(A.H.get<object>(callback)); 152 A.store.Bool(retPtr, _ret); 153 }, 154 "try_HasOnDeleteSuggestion": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => { 155 try { 156 const _ret = WEBEXT.omnibox.onDeleteSuggestion.hasListener(A.H.get<object>(callback)); 157 A.store.Bool(retPtr, _ret); 158 return A.H.TRUE; 159 } catch (err: any) { 160 A.store.Ref(errPtr, err); 161 return A.H.FALSE; 162 } 163 }, 164 "has_OnInputCancelled": (): heap.Ref<boolean> => { 165 if (WEBEXT?.omnibox?.onInputCancelled && "addListener" in WEBEXT?.omnibox?.onInputCancelled) { 166 return A.H.TRUE; 167 } 168 return A.H.FALSE; 169 }, 170 "func_OnInputCancelled": (fn: Pointer): void => { 171 A.store.Ref(fn, WEBEXT.omnibox.onInputCancelled.addListener); 172 }, 173 "call_OnInputCancelled": (retPtr: Pointer, callback: heap.Ref<object>): void => { 174 const _ret = WEBEXT.omnibox.onInputCancelled.addListener(A.H.get<object>(callback)); 175 }, 176 "try_OnInputCancelled": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => { 177 try { 178 const _ret = WEBEXT.omnibox.onInputCancelled.addListener(A.H.get<object>(callback)); 179 return A.H.TRUE; 180 } catch (err: any) { 181 A.store.Ref(errPtr, err); 182 return A.H.FALSE; 183 } 184 }, 185 "has_OffInputCancelled": (): heap.Ref<boolean> => { 186 if (WEBEXT?.omnibox?.onInputCancelled && "removeListener" in WEBEXT?.omnibox?.onInputCancelled) { 187 return A.H.TRUE; 188 } 189 return A.H.FALSE; 190 }, 191 "func_OffInputCancelled": (fn: Pointer): void => { 192 A.store.Ref(fn, WEBEXT.omnibox.onInputCancelled.removeListener); 193 }, 194 "call_OffInputCancelled": (retPtr: Pointer, callback: heap.Ref<object>): void => { 195 const _ret = WEBEXT.omnibox.onInputCancelled.removeListener(A.H.get<object>(callback)); 196 }, 197 "try_OffInputCancelled": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => { 198 try { 199 const _ret = WEBEXT.omnibox.onInputCancelled.removeListener(A.H.get<object>(callback)); 200 return A.H.TRUE; 201 } catch (err: any) { 202 A.store.Ref(errPtr, err); 203 return A.H.FALSE; 204 } 205 }, 206 "has_HasOnInputCancelled": (): heap.Ref<boolean> => { 207 if (WEBEXT?.omnibox?.onInputCancelled && "hasListener" in WEBEXT?.omnibox?.onInputCancelled) { 208 return A.H.TRUE; 209 } 210 return A.H.FALSE; 211 }, 212 "func_HasOnInputCancelled": (fn: Pointer): void => { 213 A.store.Ref(fn, WEBEXT.omnibox.onInputCancelled.hasListener); 214 }, 215 "call_HasOnInputCancelled": (retPtr: Pointer, callback: heap.Ref<object>): void => { 216 const _ret = WEBEXT.omnibox.onInputCancelled.hasListener(A.H.get<object>(callback)); 217 A.store.Bool(retPtr, _ret); 218 }, 219 "try_HasOnInputCancelled": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => { 220 try { 221 const _ret = WEBEXT.omnibox.onInputCancelled.hasListener(A.H.get<object>(callback)); 222 A.store.Bool(retPtr, _ret); 223 return A.H.TRUE; 224 } catch (err: any) { 225 A.store.Ref(errPtr, err); 226 return A.H.FALSE; 227 } 228 }, 229 "has_OnInputChanged": (): heap.Ref<boolean> => { 230 if (WEBEXT?.omnibox?.onInputChanged && "addListener" in WEBEXT?.omnibox?.onInputChanged) { 231 return A.H.TRUE; 232 } 233 return A.H.FALSE; 234 }, 235 "func_OnInputChanged": (fn: Pointer): void => { 236 A.store.Ref(fn, WEBEXT.omnibox.onInputChanged.addListener); 237 }, 238 "call_OnInputChanged": (retPtr: Pointer, callback: heap.Ref<object>): void => { 239 const _ret = WEBEXT.omnibox.onInputChanged.addListener(A.H.get<object>(callback)); 240 }, 241 "try_OnInputChanged": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => { 242 try { 243 const _ret = WEBEXT.omnibox.onInputChanged.addListener(A.H.get<object>(callback)); 244 return A.H.TRUE; 245 } catch (err: any) { 246 A.store.Ref(errPtr, err); 247 return A.H.FALSE; 248 } 249 }, 250 "has_OffInputChanged": (): heap.Ref<boolean> => { 251 if (WEBEXT?.omnibox?.onInputChanged && "removeListener" in WEBEXT?.omnibox?.onInputChanged) { 252 return A.H.TRUE; 253 } 254 return A.H.FALSE; 255 }, 256 "func_OffInputChanged": (fn: Pointer): void => { 257 A.store.Ref(fn, WEBEXT.omnibox.onInputChanged.removeListener); 258 }, 259 "call_OffInputChanged": (retPtr: Pointer, callback: heap.Ref<object>): void => { 260 const _ret = WEBEXT.omnibox.onInputChanged.removeListener(A.H.get<object>(callback)); 261 }, 262 "try_OffInputChanged": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => { 263 try { 264 const _ret = WEBEXT.omnibox.onInputChanged.removeListener(A.H.get<object>(callback)); 265 return A.H.TRUE; 266 } catch (err: any) { 267 A.store.Ref(errPtr, err); 268 return A.H.FALSE; 269 } 270 }, 271 "has_HasOnInputChanged": (): heap.Ref<boolean> => { 272 if (WEBEXT?.omnibox?.onInputChanged && "hasListener" in WEBEXT?.omnibox?.onInputChanged) { 273 return A.H.TRUE; 274 } 275 return A.H.FALSE; 276 }, 277 "func_HasOnInputChanged": (fn: Pointer): void => { 278 A.store.Ref(fn, WEBEXT.omnibox.onInputChanged.hasListener); 279 }, 280 "call_HasOnInputChanged": (retPtr: Pointer, callback: heap.Ref<object>): void => { 281 const _ret = WEBEXT.omnibox.onInputChanged.hasListener(A.H.get<object>(callback)); 282 A.store.Bool(retPtr, _ret); 283 }, 284 "try_HasOnInputChanged": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => { 285 try { 286 const _ret = WEBEXT.omnibox.onInputChanged.hasListener(A.H.get<object>(callback)); 287 A.store.Bool(retPtr, _ret); 288 return A.H.TRUE; 289 } catch (err: any) { 290 A.store.Ref(errPtr, err); 291 return A.H.FALSE; 292 } 293 }, 294 "has_OnInputEntered": (): heap.Ref<boolean> => { 295 if (WEBEXT?.omnibox?.onInputEntered && "addListener" in WEBEXT?.omnibox?.onInputEntered) { 296 return A.H.TRUE; 297 } 298 return A.H.FALSE; 299 }, 300 "func_OnInputEntered": (fn: Pointer): void => { 301 A.store.Ref(fn, WEBEXT.omnibox.onInputEntered.addListener); 302 }, 303 "call_OnInputEntered": (retPtr: Pointer, callback: heap.Ref<object>): void => { 304 const _ret = WEBEXT.omnibox.onInputEntered.addListener(A.H.get<object>(callback)); 305 }, 306 "try_OnInputEntered": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => { 307 try { 308 const _ret = WEBEXT.omnibox.onInputEntered.addListener(A.H.get<object>(callback)); 309 return A.H.TRUE; 310 } catch (err: any) { 311 A.store.Ref(errPtr, err); 312 return A.H.FALSE; 313 } 314 }, 315 "has_OffInputEntered": (): heap.Ref<boolean> => { 316 if (WEBEXT?.omnibox?.onInputEntered && "removeListener" in WEBEXT?.omnibox?.onInputEntered) { 317 return A.H.TRUE; 318 } 319 return A.H.FALSE; 320 }, 321 "func_OffInputEntered": (fn: Pointer): void => { 322 A.store.Ref(fn, WEBEXT.omnibox.onInputEntered.removeListener); 323 }, 324 "call_OffInputEntered": (retPtr: Pointer, callback: heap.Ref<object>): void => { 325 const _ret = WEBEXT.omnibox.onInputEntered.removeListener(A.H.get<object>(callback)); 326 }, 327 "try_OffInputEntered": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => { 328 try { 329 const _ret = WEBEXT.omnibox.onInputEntered.removeListener(A.H.get<object>(callback)); 330 return A.H.TRUE; 331 } catch (err: any) { 332 A.store.Ref(errPtr, err); 333 return A.H.FALSE; 334 } 335 }, 336 "has_HasOnInputEntered": (): heap.Ref<boolean> => { 337 if (WEBEXT?.omnibox?.onInputEntered && "hasListener" in WEBEXT?.omnibox?.onInputEntered) { 338 return A.H.TRUE; 339 } 340 return A.H.FALSE; 341 }, 342 "func_HasOnInputEntered": (fn: Pointer): void => { 343 A.store.Ref(fn, WEBEXT.omnibox.onInputEntered.hasListener); 344 }, 345 "call_HasOnInputEntered": (retPtr: Pointer, callback: heap.Ref<object>): void => { 346 const _ret = WEBEXT.omnibox.onInputEntered.hasListener(A.H.get<object>(callback)); 347 A.store.Bool(retPtr, _ret); 348 }, 349 "try_HasOnInputEntered": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => { 350 try { 351 const _ret = WEBEXT.omnibox.onInputEntered.hasListener(A.H.get<object>(callback)); 352 A.store.Bool(retPtr, _ret); 353 return A.H.TRUE; 354 } catch (err: any) { 355 A.store.Ref(errPtr, err); 356 return A.H.FALSE; 357 } 358 }, 359 "has_OnInputStarted": (): heap.Ref<boolean> => { 360 if (WEBEXT?.omnibox?.onInputStarted && "addListener" in WEBEXT?.omnibox?.onInputStarted) { 361 return A.H.TRUE; 362 } 363 return A.H.FALSE; 364 }, 365 "func_OnInputStarted": (fn: Pointer): void => { 366 A.store.Ref(fn, WEBEXT.omnibox.onInputStarted.addListener); 367 }, 368 "call_OnInputStarted": (retPtr: Pointer, callback: heap.Ref<object>): void => { 369 const _ret = WEBEXT.omnibox.onInputStarted.addListener(A.H.get<object>(callback)); 370 }, 371 "try_OnInputStarted": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => { 372 try { 373 const _ret = WEBEXT.omnibox.onInputStarted.addListener(A.H.get<object>(callback)); 374 return A.H.TRUE; 375 } catch (err: any) { 376 A.store.Ref(errPtr, err); 377 return A.H.FALSE; 378 } 379 }, 380 "has_OffInputStarted": (): heap.Ref<boolean> => { 381 if (WEBEXT?.omnibox?.onInputStarted && "removeListener" in WEBEXT?.omnibox?.onInputStarted) { 382 return A.H.TRUE; 383 } 384 return A.H.FALSE; 385 }, 386 "func_OffInputStarted": (fn: Pointer): void => { 387 A.store.Ref(fn, WEBEXT.omnibox.onInputStarted.removeListener); 388 }, 389 "call_OffInputStarted": (retPtr: Pointer, callback: heap.Ref<object>): void => { 390 const _ret = WEBEXT.omnibox.onInputStarted.removeListener(A.H.get<object>(callback)); 391 }, 392 "try_OffInputStarted": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => { 393 try { 394 const _ret = WEBEXT.omnibox.onInputStarted.removeListener(A.H.get<object>(callback)); 395 return A.H.TRUE; 396 } catch (err: any) { 397 A.store.Ref(errPtr, err); 398 return A.H.FALSE; 399 } 400 }, 401 "has_HasOnInputStarted": (): heap.Ref<boolean> => { 402 if (WEBEXT?.omnibox?.onInputStarted && "hasListener" in WEBEXT?.omnibox?.onInputStarted) { 403 return A.H.TRUE; 404 } 405 return A.H.FALSE; 406 }, 407 "func_HasOnInputStarted": (fn: Pointer): void => { 408 A.store.Ref(fn, WEBEXT.omnibox.onInputStarted.hasListener); 409 }, 410 "call_HasOnInputStarted": (retPtr: Pointer, callback: heap.Ref<object>): void => { 411 const _ret = WEBEXT.omnibox.onInputStarted.hasListener(A.H.get<object>(callback)); 412 A.store.Bool(retPtr, _ret); 413 }, 414 "try_HasOnInputStarted": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => { 415 try { 416 const _ret = WEBEXT.omnibox.onInputStarted.hasListener(A.H.get<object>(callback)); 417 A.store.Bool(retPtr, _ret); 418 return A.H.TRUE; 419 } catch (err: any) { 420 A.store.Ref(errPtr, err); 421 return A.H.FALSE; 422 } 423 }, 424 "has_SendSuggestions": (): heap.Ref<boolean> => { 425 if (WEBEXT?.omnibox && "sendSuggestions" in WEBEXT?.omnibox) { 426 return A.H.TRUE; 427 } 428 return A.H.FALSE; 429 }, 430 "func_SendSuggestions": (fn: Pointer): void => { 431 A.store.Ref(fn, WEBEXT.omnibox.sendSuggestions); 432 }, 433 "call_SendSuggestions": (retPtr: Pointer, requestId: number, suggestResults: heap.Ref<object>): void => { 434 const _ret = WEBEXT.omnibox.sendSuggestions(requestId, A.H.get<object>(suggestResults)); 435 }, 436 "try_SendSuggestions": ( 437 retPtr: Pointer, 438 errPtr: Pointer, 439 requestId: number, 440 suggestResults: heap.Ref<object> 441 ): heap.Ref<boolean> => { 442 try { 443 const _ret = WEBEXT.omnibox.sendSuggestions(requestId, A.H.get<object>(suggestResults)); 444 return A.H.TRUE; 445 } catch (err: any) { 446 A.store.Ref(errPtr, err); 447 return A.H.FALSE; 448 } 449 }, 450 "has_SetDefaultSuggestion": (): heap.Ref<boolean> => { 451 if (WEBEXT?.omnibox && "setDefaultSuggestion" in WEBEXT?.omnibox) { 452 return A.H.TRUE; 453 } 454 return A.H.FALSE; 455 }, 456 "func_SetDefaultSuggestion": (fn: Pointer): void => { 457 A.store.Ref(fn, WEBEXT.omnibox.setDefaultSuggestion); 458 }, 459 "call_SetDefaultSuggestion": (retPtr: Pointer, suggestion: Pointer): void => { 460 const suggestion_ffi = {}; 461 462 suggestion_ffi["description"] = A.load.Ref(suggestion + 0, undefined); 463 suggestion_ffi["descriptionStyles"] = A.load.Ref(suggestion + 4, undefined); 464 465 const _ret = WEBEXT.omnibox.setDefaultSuggestion(suggestion_ffi); 466 A.store.Ref(retPtr, _ret); 467 }, 468 "try_SetDefaultSuggestion": (retPtr: Pointer, errPtr: Pointer, suggestion: Pointer): heap.Ref<boolean> => { 469 try { 470 const suggestion_ffi = {}; 471 472 suggestion_ffi["description"] = A.load.Ref(suggestion + 0, undefined); 473 suggestion_ffi["descriptionStyles"] = A.load.Ref(suggestion + 4, undefined); 474 475 const _ret = WEBEXT.omnibox.setDefaultSuggestion(suggestion_ffi); 476 A.store.Ref(retPtr, _ret); 477 return A.H.TRUE; 478 } catch (err: any) { 479 A.store.Ref(errPtr, err); 480 return A.H.FALSE; 481 } 482 }, 483 }; 484 });