feat(extension): expose host version and WebView page events

This commit is contained in:
Levi committed 2026-09-17 23:43:39 +08:00
1 parent 7c1447f659
commit dfe8e9a3fd
27 files changed
+1230 -191

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)
}