MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / setHomepageUrl

Method setHomepageUrl

frontend/app/view/webview/webview.tsx:490–508  ·  view source on GitHub ↗
(url: string, scope: "global" | "block")

Source from the content-addressed store, hash-verified

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");

Callers 2

getSettingsMenuItemsMethod · 0.95
webview.test.tsxFile · 0.80

Calls 3

makeORefFunction · 0.90
SetMetaCommandMethod · 0.65
SetConfigCommandMethod · 0.65

Tested by

no test coverage detected