(url: string, scope: "global" | "block")
| 488 | } |
| 489 | |
| 490 | async setHomepageUrl(url: string, scope: "global" | "block") { |
| 491 | if (url != null && url != "") { |
| 492 | switch (scope) { |
| 493 | case "block": |
| 494 | await this.env.rpc.SetMetaCommand(TabRpcClient, { |
| 495 | oref: makeORef("block", this.blockId), |
| 496 | meta: { pinnedurl: url }, |
| 497 | }); |
| 498 | break; |
| 499 | case "global": |
| 500 | await this.env.rpc.SetMetaCommand(TabRpcClient, { |
| 501 | oref: makeORef("block", this.blockId), |
| 502 | meta: { pinnedurl: null }, |
| 503 | }); |
| 504 | await this.env.rpc.SetConfigCommand(TabRpcClient, { "web:defaulturl": url }); |
| 505 | break; |
| 506 | } |
| 507 | } |
| 508 | } |
| 509 | |
| 510 | giveFocus(): boolean { |
| 511 | console.log("webview giveFocus"); |
no test coverage detected