Remove extension WebView data during uninstall

This commit is contained in:
Levi committed 2026-09-14 10:11:53 +08:00
1 parent c47b735fc4
commit d642ae5018
25 files changed
+609 -19

No files matched your search

+6
View File
@@ -5,6 +5,7 @@ import "encoding/json"
const RPCEndpointPath = "/webview"
const (
MethodProfileRemove = "profile.remove"
MethodIsAvailable = "webview.isAvailable"
MethodPageOpen = "page.open"
MethodPageAddInitScript = "page.addInitScript"
@@ -147,3 +148,8 @@ type PageCloseParams struct {
}
type EmptyResult struct{}
// ProfileRemoveParams belongs to the private host RPC.
type ProfileRemoveParams struct {
ProfileID string `json:"profileId"`
}
+5
View File
@@ -17,6 +17,11 @@ type Opener interface {
Open(opts OpenOptions) (Page, error)
}
// ProfileRemover is a host-only lifecycle operation, never exposed to extension JS.
type ProfileRemover interface {
RemoveProfile(profileID, dataPath string) error
}
type Page interface {
AddInitScript(script string) error
Goto(url string, opts GotoOptions) error