github.com/primecitizens/pcz/std@v0.2.1/plat/js/webext/browsingdata/apis_js_wasm.go (about) 1 // SPDX-License-Identifier: Apache-2.0 2 // Copyright 2023 The Prime Citizens 3 4 package browsingdata 5 6 import ( 7 "github.com/primecitizens/pcz/std/ffi/js" 8 "github.com/primecitizens/pcz/std/plat/js/webext/browsingdata/bindings" 9 ) 10 11 type DataTypeSet struct { 12 // Appcache is "DataTypeSet.appcache" 13 // 14 // Optional 15 // 16 // NOTE: FFI_USE_Appcache MUST be set to true to make this field effective. 17 Appcache bool 18 // Cache is "DataTypeSet.cache" 19 // 20 // Optional 21 // 22 // NOTE: FFI_USE_Cache MUST be set to true to make this field effective. 23 Cache bool 24 // CacheStorage is "DataTypeSet.cacheStorage" 25 // 26 // Optional 27 // 28 // NOTE: FFI_USE_CacheStorage MUST be set to true to make this field effective. 29 CacheStorage bool 30 // Cookies is "DataTypeSet.cookies" 31 // 32 // Optional 33 // 34 // NOTE: FFI_USE_Cookies MUST be set to true to make this field effective. 35 Cookies bool 36 // Downloads is "DataTypeSet.downloads" 37 // 38 // Optional 39 // 40 // NOTE: FFI_USE_Downloads MUST be set to true to make this field effective. 41 Downloads bool 42 // FileSystems is "DataTypeSet.fileSystems" 43 // 44 // Optional 45 // 46 // NOTE: FFI_USE_FileSystems MUST be set to true to make this field effective. 47 FileSystems bool 48 // FormData is "DataTypeSet.formData" 49 // 50 // Optional 51 // 52 // NOTE: FFI_USE_FormData MUST be set to true to make this field effective. 53 FormData bool 54 // History is "DataTypeSet.history" 55 // 56 // Optional 57 // 58 // NOTE: FFI_USE_History MUST be set to true to make this field effective. 59 History bool 60 // IndexedDB is "DataTypeSet.indexedDB" 61 // 62 // Optional 63 // 64 // NOTE: FFI_USE_IndexedDB MUST be set to true to make this field effective. 65 IndexedDB bool 66 // LocalStorage is "DataTypeSet.localStorage" 67 // 68 // Optional 69 // 70 // NOTE: FFI_USE_LocalStorage MUST be set to true to make this field effective. 71 LocalStorage bool 72 // Passwords is "DataTypeSet.passwords" 73 // 74 // Optional 75 // 76 // NOTE: FFI_USE_Passwords MUST be set to true to make this field effective. 77 Passwords bool 78 // PluginData is "DataTypeSet.pluginData" 79 // 80 // Optional 81 // 82 // NOTE: FFI_USE_PluginData MUST be set to true to make this field effective. 83 PluginData bool 84 // ServerBoundCertificates is "DataTypeSet.serverBoundCertificates" 85 // 86 // Optional 87 // 88 // NOTE: FFI_USE_ServerBoundCertificates MUST be set to true to make this field effective. 89 ServerBoundCertificates bool 90 // ServiceWorkers is "DataTypeSet.serviceWorkers" 91 // 92 // Optional 93 // 94 // NOTE: FFI_USE_ServiceWorkers MUST be set to true to make this field effective. 95 ServiceWorkers bool 96 // WebSQL is "DataTypeSet.webSQL" 97 // 98 // Optional 99 // 100 // NOTE: FFI_USE_WebSQL MUST be set to true to make this field effective. 101 WebSQL bool 102 103 FFI_USE_Appcache bool // for Appcache. 104 FFI_USE_Cache bool // for Cache. 105 FFI_USE_CacheStorage bool // for CacheStorage. 106 FFI_USE_Cookies bool // for Cookies. 107 FFI_USE_Downloads bool // for Downloads. 108 FFI_USE_FileSystems bool // for FileSystems. 109 FFI_USE_FormData bool // for FormData. 110 FFI_USE_History bool // for History. 111 FFI_USE_IndexedDB bool // for IndexedDB. 112 FFI_USE_LocalStorage bool // for LocalStorage. 113 FFI_USE_Passwords bool // for Passwords. 114 FFI_USE_PluginData bool // for PluginData. 115 FFI_USE_ServerBoundCertificates bool // for ServerBoundCertificates. 116 FFI_USE_ServiceWorkers bool // for ServiceWorkers. 117 FFI_USE_WebSQL bool // for WebSQL. 118 119 FFI_USE bool 120 } 121 122 // FromRef calls UpdateFrom and returns a DataTypeSet with all fields set. 123 func (p DataTypeSet) FromRef(ref js.Ref) DataTypeSet { 124 p.UpdateFrom(ref) 125 return p 126 } 127 128 // New creates a new DataTypeSet in the application heap. 129 func (p DataTypeSet) New() js.Ref { 130 return bindings.DataTypeSetJSLoad( 131 js.Pointer(&p), js.True, 0, 132 ) 133 } 134 135 // UpdateFrom copies value of all fields of the heap object to p. 136 func (p *DataTypeSet) UpdateFrom(ref js.Ref) { 137 bindings.DataTypeSetJSStore( 138 js.Pointer(p), ref, 139 ) 140 } 141 142 // Update writes all fields of the p to the heap object referenced by ref. 143 func (p *DataTypeSet) Update(ref js.Ref) { 144 bindings.DataTypeSetJSLoad( 145 js.Pointer(p), js.False, ref, 146 ) 147 } 148 149 // FreeMembers frees fields with heap reference, if recursive is true 150 // free all heap references reachable from p. 151 func (p *DataTypeSet) FreeMembers(recursive bool) { 152 } 153 154 type RemovalOptionsFieldOriginTypes struct { 155 // Extension is "RemovalOptionsFieldOriginTypes.extension" 156 // 157 // Optional 158 // 159 // NOTE: FFI_USE_Extension MUST be set to true to make this field effective. 160 Extension bool 161 // ProtectedWeb is "RemovalOptionsFieldOriginTypes.protectedWeb" 162 // 163 // Optional 164 // 165 // NOTE: FFI_USE_ProtectedWeb MUST be set to true to make this field effective. 166 ProtectedWeb bool 167 // UnprotectedWeb is "RemovalOptionsFieldOriginTypes.unprotectedWeb" 168 // 169 // Optional 170 // 171 // NOTE: FFI_USE_UnprotectedWeb MUST be set to true to make this field effective. 172 UnprotectedWeb bool 173 174 FFI_USE_Extension bool // for Extension. 175 FFI_USE_ProtectedWeb bool // for ProtectedWeb. 176 FFI_USE_UnprotectedWeb bool // for UnprotectedWeb. 177 178 FFI_USE bool 179 } 180 181 // FromRef calls UpdateFrom and returns a RemovalOptionsFieldOriginTypes with all fields set. 182 func (p RemovalOptionsFieldOriginTypes) FromRef(ref js.Ref) RemovalOptionsFieldOriginTypes { 183 p.UpdateFrom(ref) 184 return p 185 } 186 187 // New creates a new RemovalOptionsFieldOriginTypes in the application heap. 188 func (p RemovalOptionsFieldOriginTypes) New() js.Ref { 189 return bindings.RemovalOptionsFieldOriginTypesJSLoad( 190 js.Pointer(&p), js.True, 0, 191 ) 192 } 193 194 // UpdateFrom copies value of all fields of the heap object to p. 195 func (p *RemovalOptionsFieldOriginTypes) UpdateFrom(ref js.Ref) { 196 bindings.RemovalOptionsFieldOriginTypesJSStore( 197 js.Pointer(p), ref, 198 ) 199 } 200 201 // Update writes all fields of the p to the heap object referenced by ref. 202 func (p *RemovalOptionsFieldOriginTypes) Update(ref js.Ref) { 203 bindings.RemovalOptionsFieldOriginTypesJSLoad( 204 js.Pointer(p), js.False, ref, 205 ) 206 } 207 208 // FreeMembers frees fields with heap reference, if recursive is true 209 // free all heap references reachable from p. 210 func (p *RemovalOptionsFieldOriginTypes) FreeMembers(recursive bool) { 211 } 212 213 type RemovalOptions struct { 214 // ExcludeOrigins is "RemovalOptions.excludeOrigins" 215 // 216 // Optional 217 ExcludeOrigins js.Array[js.String] 218 // OriginTypes is "RemovalOptions.originTypes" 219 // 220 // Optional 221 // 222 // NOTE: OriginTypes.FFI_USE MUST be set to true to get OriginTypes used. 223 OriginTypes RemovalOptionsFieldOriginTypes 224 // Origins is "RemovalOptions.origins" 225 // 226 // Optional 227 Origins js.Array[js.String] 228 // Since is "RemovalOptions.since" 229 // 230 // Optional 231 // 232 // NOTE: FFI_USE_Since MUST be set to true to make this field effective. 233 Since float64 234 235 FFI_USE_Since bool // for Since. 236 237 FFI_USE bool 238 } 239 240 // FromRef calls UpdateFrom and returns a RemovalOptions with all fields set. 241 func (p RemovalOptions) FromRef(ref js.Ref) RemovalOptions { 242 p.UpdateFrom(ref) 243 return p 244 } 245 246 // New creates a new RemovalOptions in the application heap. 247 func (p RemovalOptions) New() js.Ref { 248 return bindings.RemovalOptionsJSLoad( 249 js.Pointer(&p), js.True, 0, 250 ) 251 } 252 253 // UpdateFrom copies value of all fields of the heap object to p. 254 func (p *RemovalOptions) UpdateFrom(ref js.Ref) { 255 bindings.RemovalOptionsJSStore( 256 js.Pointer(p), ref, 257 ) 258 } 259 260 // Update writes all fields of the p to the heap object referenced by ref. 261 func (p *RemovalOptions) Update(ref js.Ref) { 262 bindings.RemovalOptionsJSLoad( 263 js.Pointer(p), js.False, ref, 264 ) 265 } 266 267 // FreeMembers frees fields with heap reference, if recursive is true 268 // free all heap references reachable from p. 269 func (p *RemovalOptions) FreeMembers(recursive bool) { 270 js.Free( 271 p.ExcludeOrigins.Ref(), 272 p.Origins.Ref(), 273 ) 274 p.ExcludeOrigins = p.ExcludeOrigins.FromRef(js.Undefined) 275 p.Origins = p.Origins.FromRef(js.Undefined) 276 if recursive { 277 p.OriginTypes.FreeMembers(true) 278 } 279 } 280 281 type SettingsReturnType struct { 282 // DataRemovalPermitted is "SettingsReturnType.dataRemovalPermitted" 283 // 284 // Required 285 // 286 // NOTE: DataRemovalPermitted.FFI_USE MUST be set to true to get DataRemovalPermitted used. 287 DataRemovalPermitted DataTypeSet 288 // DataToRemove is "SettingsReturnType.dataToRemove" 289 // 290 // Required 291 // 292 // NOTE: DataToRemove.FFI_USE MUST be set to true to get DataToRemove used. 293 DataToRemove DataTypeSet 294 // Options is "SettingsReturnType.options" 295 // 296 // Required 297 // 298 // NOTE: Options.FFI_USE MUST be set to true to get Options used. 299 Options RemovalOptions 300 301 FFI_USE bool 302 } 303 304 // FromRef calls UpdateFrom and returns a SettingsReturnType with all fields set. 305 func (p SettingsReturnType) FromRef(ref js.Ref) SettingsReturnType { 306 p.UpdateFrom(ref) 307 return p 308 } 309 310 // New creates a new SettingsReturnType in the application heap. 311 func (p SettingsReturnType) New() js.Ref { 312 return bindings.SettingsReturnTypeJSLoad( 313 js.Pointer(&p), js.True, 0, 314 ) 315 } 316 317 // UpdateFrom copies value of all fields of the heap object to p. 318 func (p *SettingsReturnType) UpdateFrom(ref js.Ref) { 319 bindings.SettingsReturnTypeJSStore( 320 js.Pointer(p), ref, 321 ) 322 } 323 324 // Update writes all fields of the p to the heap object referenced by ref. 325 func (p *SettingsReturnType) Update(ref js.Ref) { 326 bindings.SettingsReturnTypeJSLoad( 327 js.Pointer(p), js.False, ref, 328 ) 329 } 330 331 // FreeMembers frees fields with heap reference, if recursive is true 332 // free all heap references reachable from p. 333 func (p *SettingsReturnType) FreeMembers(recursive bool) { 334 if recursive { 335 p.DataRemovalPermitted.FreeMembers(true) 336 p.DataToRemove.FreeMembers(true) 337 p.Options.FreeMembers(true) 338 } 339 } 340 341 // HasFuncRemove returns true if the function "WEBEXT.browsingData.remove" exists. 342 func HasFuncRemove() bool { 343 return js.True == bindings.HasFuncRemove() 344 } 345 346 // FuncRemove returns the function "WEBEXT.browsingData.remove". 347 func FuncRemove() (fn js.Func[func(options RemovalOptions, dataToRemove DataTypeSet) js.Promise[js.Void]]) { 348 bindings.FuncRemove( 349 js.Pointer(&fn), 350 ) 351 return 352 } 353 354 // Remove calls the function "WEBEXT.browsingData.remove" directly. 355 func Remove(options RemovalOptions, dataToRemove DataTypeSet) (ret js.Promise[js.Void]) { 356 bindings.CallRemove( 357 js.Pointer(&ret), 358 js.Pointer(&options), 359 js.Pointer(&dataToRemove), 360 ) 361 362 return 363 } 364 365 // TryRemove calls the function "WEBEXT.browsingData.remove" 366 // in a try/catch block and returns (_, err, ok = false) when it went through 367 // the catch clause. 368 func TryRemove(options RemovalOptions, dataToRemove DataTypeSet) (ret js.Promise[js.Void], exception js.Any, ok bool) { 369 ok = js.True == bindings.TryRemove( 370 js.Pointer(&ret), js.Pointer(&exception), 371 js.Pointer(&options), 372 js.Pointer(&dataToRemove), 373 ) 374 375 return 376 } 377 378 // HasFuncRemoveAppcache returns true if the function "WEBEXT.browsingData.removeAppcache" exists. 379 func HasFuncRemoveAppcache() bool { 380 return js.True == bindings.HasFuncRemoveAppcache() 381 } 382 383 // FuncRemoveAppcache returns the function "WEBEXT.browsingData.removeAppcache". 384 func FuncRemoveAppcache() (fn js.Func[func(options RemovalOptions) js.Promise[js.Void]]) { 385 bindings.FuncRemoveAppcache( 386 js.Pointer(&fn), 387 ) 388 return 389 } 390 391 // RemoveAppcache calls the function "WEBEXT.browsingData.removeAppcache" directly. 392 func RemoveAppcache(options RemovalOptions) (ret js.Promise[js.Void]) { 393 bindings.CallRemoveAppcache( 394 js.Pointer(&ret), 395 js.Pointer(&options), 396 ) 397 398 return 399 } 400 401 // TryRemoveAppcache calls the function "WEBEXT.browsingData.removeAppcache" 402 // in a try/catch block and returns (_, err, ok = false) when it went through 403 // the catch clause. 404 func TryRemoveAppcache(options RemovalOptions) (ret js.Promise[js.Void], exception js.Any, ok bool) { 405 ok = js.True == bindings.TryRemoveAppcache( 406 js.Pointer(&ret), js.Pointer(&exception), 407 js.Pointer(&options), 408 ) 409 410 return 411 } 412 413 // HasFuncRemoveCache returns true if the function "WEBEXT.browsingData.removeCache" exists. 414 func HasFuncRemoveCache() bool { 415 return js.True == bindings.HasFuncRemoveCache() 416 } 417 418 // FuncRemoveCache returns the function "WEBEXT.browsingData.removeCache". 419 func FuncRemoveCache() (fn js.Func[func(options RemovalOptions) js.Promise[js.Void]]) { 420 bindings.FuncRemoveCache( 421 js.Pointer(&fn), 422 ) 423 return 424 } 425 426 // RemoveCache calls the function "WEBEXT.browsingData.removeCache" directly. 427 func RemoveCache(options RemovalOptions) (ret js.Promise[js.Void]) { 428 bindings.CallRemoveCache( 429 js.Pointer(&ret), 430 js.Pointer(&options), 431 ) 432 433 return 434 } 435 436 // TryRemoveCache calls the function "WEBEXT.browsingData.removeCache" 437 // in a try/catch block and returns (_, err, ok = false) when it went through 438 // the catch clause. 439 func TryRemoveCache(options RemovalOptions) (ret js.Promise[js.Void], exception js.Any, ok bool) { 440 ok = js.True == bindings.TryRemoveCache( 441 js.Pointer(&ret), js.Pointer(&exception), 442 js.Pointer(&options), 443 ) 444 445 return 446 } 447 448 // HasFuncRemoveCacheStorage returns true if the function "WEBEXT.browsingData.removeCacheStorage" exists. 449 func HasFuncRemoveCacheStorage() bool { 450 return js.True == bindings.HasFuncRemoveCacheStorage() 451 } 452 453 // FuncRemoveCacheStorage returns the function "WEBEXT.browsingData.removeCacheStorage". 454 func FuncRemoveCacheStorage() (fn js.Func[func(options RemovalOptions) js.Promise[js.Void]]) { 455 bindings.FuncRemoveCacheStorage( 456 js.Pointer(&fn), 457 ) 458 return 459 } 460 461 // RemoveCacheStorage calls the function "WEBEXT.browsingData.removeCacheStorage" directly. 462 func RemoveCacheStorage(options RemovalOptions) (ret js.Promise[js.Void]) { 463 bindings.CallRemoveCacheStorage( 464 js.Pointer(&ret), 465 js.Pointer(&options), 466 ) 467 468 return 469 } 470 471 // TryRemoveCacheStorage calls the function "WEBEXT.browsingData.removeCacheStorage" 472 // in a try/catch block and returns (_, err, ok = false) when it went through 473 // the catch clause. 474 func TryRemoveCacheStorage(options RemovalOptions) (ret js.Promise[js.Void], exception js.Any, ok bool) { 475 ok = js.True == bindings.TryRemoveCacheStorage( 476 js.Pointer(&ret), js.Pointer(&exception), 477 js.Pointer(&options), 478 ) 479 480 return 481 } 482 483 // HasFuncRemoveCookies returns true if the function "WEBEXT.browsingData.removeCookies" exists. 484 func HasFuncRemoveCookies() bool { 485 return js.True == bindings.HasFuncRemoveCookies() 486 } 487 488 // FuncRemoveCookies returns the function "WEBEXT.browsingData.removeCookies". 489 func FuncRemoveCookies() (fn js.Func[func(options RemovalOptions) js.Promise[js.Void]]) { 490 bindings.FuncRemoveCookies( 491 js.Pointer(&fn), 492 ) 493 return 494 } 495 496 // RemoveCookies calls the function "WEBEXT.browsingData.removeCookies" directly. 497 func RemoveCookies(options RemovalOptions) (ret js.Promise[js.Void]) { 498 bindings.CallRemoveCookies( 499 js.Pointer(&ret), 500 js.Pointer(&options), 501 ) 502 503 return 504 } 505 506 // TryRemoveCookies calls the function "WEBEXT.browsingData.removeCookies" 507 // in a try/catch block and returns (_, err, ok = false) when it went through 508 // the catch clause. 509 func TryRemoveCookies(options RemovalOptions) (ret js.Promise[js.Void], exception js.Any, ok bool) { 510 ok = js.True == bindings.TryRemoveCookies( 511 js.Pointer(&ret), js.Pointer(&exception), 512 js.Pointer(&options), 513 ) 514 515 return 516 } 517 518 // HasFuncRemoveDownloads returns true if the function "WEBEXT.browsingData.removeDownloads" exists. 519 func HasFuncRemoveDownloads() bool { 520 return js.True == bindings.HasFuncRemoveDownloads() 521 } 522 523 // FuncRemoveDownloads returns the function "WEBEXT.browsingData.removeDownloads". 524 func FuncRemoveDownloads() (fn js.Func[func(options RemovalOptions) js.Promise[js.Void]]) { 525 bindings.FuncRemoveDownloads( 526 js.Pointer(&fn), 527 ) 528 return 529 } 530 531 // RemoveDownloads calls the function "WEBEXT.browsingData.removeDownloads" directly. 532 func RemoveDownloads(options RemovalOptions) (ret js.Promise[js.Void]) { 533 bindings.CallRemoveDownloads( 534 js.Pointer(&ret), 535 js.Pointer(&options), 536 ) 537 538 return 539 } 540 541 // TryRemoveDownloads calls the function "WEBEXT.browsingData.removeDownloads" 542 // in a try/catch block and returns (_, err, ok = false) when it went through 543 // the catch clause. 544 func TryRemoveDownloads(options RemovalOptions) (ret js.Promise[js.Void], exception js.Any, ok bool) { 545 ok = js.True == bindings.TryRemoveDownloads( 546 js.Pointer(&ret), js.Pointer(&exception), 547 js.Pointer(&options), 548 ) 549 550 return 551 } 552 553 // HasFuncRemoveFileSystems returns true if the function "WEBEXT.browsingData.removeFileSystems" exists. 554 func HasFuncRemoveFileSystems() bool { 555 return js.True == bindings.HasFuncRemoveFileSystems() 556 } 557 558 // FuncRemoveFileSystems returns the function "WEBEXT.browsingData.removeFileSystems". 559 func FuncRemoveFileSystems() (fn js.Func[func(options RemovalOptions) js.Promise[js.Void]]) { 560 bindings.FuncRemoveFileSystems( 561 js.Pointer(&fn), 562 ) 563 return 564 } 565 566 // RemoveFileSystems calls the function "WEBEXT.browsingData.removeFileSystems" directly. 567 func RemoveFileSystems(options RemovalOptions) (ret js.Promise[js.Void]) { 568 bindings.CallRemoveFileSystems( 569 js.Pointer(&ret), 570 js.Pointer(&options), 571 ) 572 573 return 574 } 575 576 // TryRemoveFileSystems calls the function "WEBEXT.browsingData.removeFileSystems" 577 // in a try/catch block and returns (_, err, ok = false) when it went through 578 // the catch clause. 579 func TryRemoveFileSystems(options RemovalOptions) (ret js.Promise[js.Void], exception js.Any, ok bool) { 580 ok = js.True == bindings.TryRemoveFileSystems( 581 js.Pointer(&ret), js.Pointer(&exception), 582 js.Pointer(&options), 583 ) 584 585 return 586 } 587 588 // HasFuncRemoveFormData returns true if the function "WEBEXT.browsingData.removeFormData" exists. 589 func HasFuncRemoveFormData() bool { 590 return js.True == bindings.HasFuncRemoveFormData() 591 } 592 593 // FuncRemoveFormData returns the function "WEBEXT.browsingData.removeFormData". 594 func FuncRemoveFormData() (fn js.Func[func(options RemovalOptions) js.Promise[js.Void]]) { 595 bindings.FuncRemoveFormData( 596 js.Pointer(&fn), 597 ) 598 return 599 } 600 601 // RemoveFormData calls the function "WEBEXT.browsingData.removeFormData" directly. 602 func RemoveFormData(options RemovalOptions) (ret js.Promise[js.Void]) { 603 bindings.CallRemoveFormData( 604 js.Pointer(&ret), 605 js.Pointer(&options), 606 ) 607 608 return 609 } 610 611 // TryRemoveFormData calls the function "WEBEXT.browsingData.removeFormData" 612 // in a try/catch block and returns (_, err, ok = false) when it went through 613 // the catch clause. 614 func TryRemoveFormData(options RemovalOptions) (ret js.Promise[js.Void], exception js.Any, ok bool) { 615 ok = js.True == bindings.TryRemoveFormData( 616 js.Pointer(&ret), js.Pointer(&exception), 617 js.Pointer(&options), 618 ) 619 620 return 621 } 622 623 // HasFuncRemoveHistory returns true if the function "WEBEXT.browsingData.removeHistory" exists. 624 func HasFuncRemoveHistory() bool { 625 return js.True == bindings.HasFuncRemoveHistory() 626 } 627 628 // FuncRemoveHistory returns the function "WEBEXT.browsingData.removeHistory". 629 func FuncRemoveHistory() (fn js.Func[func(options RemovalOptions) js.Promise[js.Void]]) { 630 bindings.FuncRemoveHistory( 631 js.Pointer(&fn), 632 ) 633 return 634 } 635 636 // RemoveHistory calls the function "WEBEXT.browsingData.removeHistory" directly. 637 func RemoveHistory(options RemovalOptions) (ret js.Promise[js.Void]) { 638 bindings.CallRemoveHistory( 639 js.Pointer(&ret), 640 js.Pointer(&options), 641 ) 642 643 return 644 } 645 646 // TryRemoveHistory calls the function "WEBEXT.browsingData.removeHistory" 647 // in a try/catch block and returns (_, err, ok = false) when it went through 648 // the catch clause. 649 func TryRemoveHistory(options RemovalOptions) (ret js.Promise[js.Void], exception js.Any, ok bool) { 650 ok = js.True == bindings.TryRemoveHistory( 651 js.Pointer(&ret), js.Pointer(&exception), 652 js.Pointer(&options), 653 ) 654 655 return 656 } 657 658 // HasFuncRemoveIndexedDB returns true if the function "WEBEXT.browsingData.removeIndexedDB" exists. 659 func HasFuncRemoveIndexedDB() bool { 660 return js.True == bindings.HasFuncRemoveIndexedDB() 661 } 662 663 // FuncRemoveIndexedDB returns the function "WEBEXT.browsingData.removeIndexedDB". 664 func FuncRemoveIndexedDB() (fn js.Func[func(options RemovalOptions) js.Promise[js.Void]]) { 665 bindings.FuncRemoveIndexedDB( 666 js.Pointer(&fn), 667 ) 668 return 669 } 670 671 // RemoveIndexedDB calls the function "WEBEXT.browsingData.removeIndexedDB" directly. 672 func RemoveIndexedDB(options RemovalOptions) (ret js.Promise[js.Void]) { 673 bindings.CallRemoveIndexedDB( 674 js.Pointer(&ret), 675 js.Pointer(&options), 676 ) 677 678 return 679 } 680 681 // TryRemoveIndexedDB calls the function "WEBEXT.browsingData.removeIndexedDB" 682 // in a try/catch block and returns (_, err, ok = false) when it went through 683 // the catch clause. 684 func TryRemoveIndexedDB(options RemovalOptions) (ret js.Promise[js.Void], exception js.Any, ok bool) { 685 ok = js.True == bindings.TryRemoveIndexedDB( 686 js.Pointer(&ret), js.Pointer(&exception), 687 js.Pointer(&options), 688 ) 689 690 return 691 } 692 693 // HasFuncRemoveLocalStorage returns true if the function "WEBEXT.browsingData.removeLocalStorage" exists. 694 func HasFuncRemoveLocalStorage() bool { 695 return js.True == bindings.HasFuncRemoveLocalStorage() 696 } 697 698 // FuncRemoveLocalStorage returns the function "WEBEXT.browsingData.removeLocalStorage". 699 func FuncRemoveLocalStorage() (fn js.Func[func(options RemovalOptions) js.Promise[js.Void]]) { 700 bindings.FuncRemoveLocalStorage( 701 js.Pointer(&fn), 702 ) 703 return 704 } 705 706 // RemoveLocalStorage calls the function "WEBEXT.browsingData.removeLocalStorage" directly. 707 func RemoveLocalStorage(options RemovalOptions) (ret js.Promise[js.Void]) { 708 bindings.CallRemoveLocalStorage( 709 js.Pointer(&ret), 710 js.Pointer(&options), 711 ) 712 713 return 714 } 715 716 // TryRemoveLocalStorage calls the function "WEBEXT.browsingData.removeLocalStorage" 717 // in a try/catch block and returns (_, err, ok = false) when it went through 718 // the catch clause. 719 func TryRemoveLocalStorage(options RemovalOptions) (ret js.Promise[js.Void], exception js.Any, ok bool) { 720 ok = js.True == bindings.TryRemoveLocalStorage( 721 js.Pointer(&ret), js.Pointer(&exception), 722 js.Pointer(&options), 723 ) 724 725 return 726 } 727 728 // HasFuncRemovePasswords returns true if the function "WEBEXT.browsingData.removePasswords" exists. 729 func HasFuncRemovePasswords() bool { 730 return js.True == bindings.HasFuncRemovePasswords() 731 } 732 733 // FuncRemovePasswords returns the function "WEBEXT.browsingData.removePasswords". 734 func FuncRemovePasswords() (fn js.Func[func(options RemovalOptions) js.Promise[js.Void]]) { 735 bindings.FuncRemovePasswords( 736 js.Pointer(&fn), 737 ) 738 return 739 } 740 741 // RemovePasswords calls the function "WEBEXT.browsingData.removePasswords" directly. 742 func RemovePasswords(options RemovalOptions) (ret js.Promise[js.Void]) { 743 bindings.CallRemovePasswords( 744 js.Pointer(&ret), 745 js.Pointer(&options), 746 ) 747 748 return 749 } 750 751 // TryRemovePasswords calls the function "WEBEXT.browsingData.removePasswords" 752 // in a try/catch block and returns (_, err, ok = false) when it went through 753 // the catch clause. 754 func TryRemovePasswords(options RemovalOptions) (ret js.Promise[js.Void], exception js.Any, ok bool) { 755 ok = js.True == bindings.TryRemovePasswords( 756 js.Pointer(&ret), js.Pointer(&exception), 757 js.Pointer(&options), 758 ) 759 760 return 761 } 762 763 // HasFuncRemovePluginData returns true if the function "WEBEXT.browsingData.removePluginData" exists. 764 func HasFuncRemovePluginData() bool { 765 return js.True == bindings.HasFuncRemovePluginData() 766 } 767 768 // FuncRemovePluginData returns the function "WEBEXT.browsingData.removePluginData". 769 func FuncRemovePluginData() (fn js.Func[func(options RemovalOptions) js.Promise[js.Void]]) { 770 bindings.FuncRemovePluginData( 771 js.Pointer(&fn), 772 ) 773 return 774 } 775 776 // RemovePluginData calls the function "WEBEXT.browsingData.removePluginData" directly. 777 func RemovePluginData(options RemovalOptions) (ret js.Promise[js.Void]) { 778 bindings.CallRemovePluginData( 779 js.Pointer(&ret), 780 js.Pointer(&options), 781 ) 782 783 return 784 } 785 786 // TryRemovePluginData calls the function "WEBEXT.browsingData.removePluginData" 787 // in a try/catch block and returns (_, err, ok = false) when it went through 788 // the catch clause. 789 func TryRemovePluginData(options RemovalOptions) (ret js.Promise[js.Void], exception js.Any, ok bool) { 790 ok = js.True == bindings.TryRemovePluginData( 791 js.Pointer(&ret), js.Pointer(&exception), 792 js.Pointer(&options), 793 ) 794 795 return 796 } 797 798 // HasFuncRemoveServiceWorkers returns true if the function "WEBEXT.browsingData.removeServiceWorkers" exists. 799 func HasFuncRemoveServiceWorkers() bool { 800 return js.True == bindings.HasFuncRemoveServiceWorkers() 801 } 802 803 // FuncRemoveServiceWorkers returns the function "WEBEXT.browsingData.removeServiceWorkers". 804 func FuncRemoveServiceWorkers() (fn js.Func[func(options RemovalOptions) js.Promise[js.Void]]) { 805 bindings.FuncRemoveServiceWorkers( 806 js.Pointer(&fn), 807 ) 808 return 809 } 810 811 // RemoveServiceWorkers calls the function "WEBEXT.browsingData.removeServiceWorkers" directly. 812 func RemoveServiceWorkers(options RemovalOptions) (ret js.Promise[js.Void]) { 813 bindings.CallRemoveServiceWorkers( 814 js.Pointer(&ret), 815 js.Pointer(&options), 816 ) 817 818 return 819 } 820 821 // TryRemoveServiceWorkers calls the function "WEBEXT.browsingData.removeServiceWorkers" 822 // in a try/catch block and returns (_, err, ok = false) when it went through 823 // the catch clause. 824 func TryRemoveServiceWorkers(options RemovalOptions) (ret js.Promise[js.Void], exception js.Any, ok bool) { 825 ok = js.True == bindings.TryRemoveServiceWorkers( 826 js.Pointer(&ret), js.Pointer(&exception), 827 js.Pointer(&options), 828 ) 829 830 return 831 } 832 833 // HasFuncRemoveWebSQL returns true if the function "WEBEXT.browsingData.removeWebSQL" exists. 834 func HasFuncRemoveWebSQL() bool { 835 return js.True == bindings.HasFuncRemoveWebSQL() 836 } 837 838 // FuncRemoveWebSQL returns the function "WEBEXT.browsingData.removeWebSQL". 839 func FuncRemoveWebSQL() (fn js.Func[func(options RemovalOptions) js.Promise[js.Void]]) { 840 bindings.FuncRemoveWebSQL( 841 js.Pointer(&fn), 842 ) 843 return 844 } 845 846 // RemoveWebSQL calls the function "WEBEXT.browsingData.removeWebSQL" directly. 847 func RemoveWebSQL(options RemovalOptions) (ret js.Promise[js.Void]) { 848 bindings.CallRemoveWebSQL( 849 js.Pointer(&ret), 850 js.Pointer(&options), 851 ) 852 853 return 854 } 855 856 // TryRemoveWebSQL calls the function "WEBEXT.browsingData.removeWebSQL" 857 // in a try/catch block and returns (_, err, ok = false) when it went through 858 // the catch clause. 859 func TryRemoveWebSQL(options RemovalOptions) (ret js.Promise[js.Void], exception js.Any, ok bool) { 860 ok = js.True == bindings.TryRemoveWebSQL( 861 js.Pointer(&ret), js.Pointer(&exception), 862 js.Pointer(&options), 863 ) 864 865 return 866 } 867 868 // HasFuncSettings returns true if the function "WEBEXT.browsingData.settings" exists. 869 func HasFuncSettings() bool { 870 return js.True == bindings.HasFuncSettings() 871 } 872 873 // FuncSettings returns the function "WEBEXT.browsingData.settings". 874 func FuncSettings() (fn js.Func[func() js.Promise[SettingsReturnType]]) { 875 bindings.FuncSettings( 876 js.Pointer(&fn), 877 ) 878 return 879 } 880 881 // Settings calls the function "WEBEXT.browsingData.settings" directly. 882 func Settings() (ret js.Promise[SettingsReturnType]) { 883 bindings.CallSettings( 884 js.Pointer(&ret), 885 ) 886 887 return 888 } 889 890 // TrySettings calls the function "WEBEXT.browsingData.settings" 891 // in a try/catch block and returns (_, err, ok = false) when it went through 892 // the catch clause. 893 func TrySettings() (ret js.Promise[SettingsReturnType], exception js.Any, ok bool) { 894 ok = js.True == bindings.TrySettings( 895 js.Pointer(&ret), js.Pointer(&exception), 896 ) 897 898 return 899 }