feat(extension): add host environment and WebView page events (#1527)

This commit is contained in:
Levi authored and GitHub committed 2026-09-18 23:21:53 +08:00
1 parent 5d8267fa56
commit 49aab4ea7c
31 files changed
+1480 -184

No files matched your search

+8
View File
@@ -181,3 +181,11 @@ func (d *Downloader) removeExtensionWebViewProfile(identity string) error {
}
return os.RemoveAll(path)
}
func (p *extensionWebViewPage) On(event string, handler func(enginewebview.Event)) (func(), error) {
source, ok := p.Page.(enginewebview.EventSource)
if !ok {
return nil, fmt.Errorf("WebView provider does not support events")
}
return source.On(event, handler)
}