Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler(parserService *services.ParserService, browserService *services.BrowserService) *Handler
NewHandler creates a new message handler
func (*Handler) SetNavigationController ¶ added in v0.9.0
func (h *Handler) SetNavigationController(controller *control.NavigationController)
SetNavigationController injects the navigation controller for unified navigation flow.
func (*Handler) SetWebView ¶
SetWebView sets the WebView reference (needed for script injection)
func (*Handler) SetWorkspaceObserver ¶ added in v0.9.0
func (h *Handler) SetWorkspaceObserver(observer WorkspaceObserver)
SetWorkspaceObserver registers a workspace event observer.
type Message ¶
type Message struct {
Type string `json:"type"`
URL string `json:"url"`
Q string `json:"q"`
Limit int `json:"limit"`
Offset int `json:"offset"`
Value string `json:"value"`
Event string `json:"event"`
Action string `json:"action"`
Direction string `json:"direction"`
PaneID string `json:"paneId"`
// History operations
HistoryID string `json:"historyId"`
// Request tracking
RequestID string `json:"requestId"`
// Popup close tracking
WebViewID string `json:"webviewId"`
Reason string `json:"reason"`
// Wails fetch bridge
ID string `json:"id"`
Payload json.RawMessage `json:"payload"`
}
Message represents a script message from the WebView
type PaneRequestDeduplicator ¶ added in v0.9.0
type PaneRequestDeduplicator struct {
// contains filtered or unexported fields
}
func NewPaneRequestDeduplicator ¶ added in v0.9.0
func NewPaneRequestDeduplicator() *PaneRequestDeduplicator
func (*PaneRequestDeduplicator) ClearRequestID ¶ added in v0.9.0
func (d *PaneRequestDeduplicator) ClearRequestID(requestID string)
ClearRequestID removes a specific request ID from the deduplication cache This allows the same RequestID to be used again (e.g., for OAuth verification -> real popup flow)
func (*PaneRequestDeduplicator) IsDuplicate ¶ added in v0.9.0
func (d *PaneRequestDeduplicator) IsDuplicate(intent *WindowIntent, webViewID string) (bool, string)
type RequestFingerprint ¶ added in v0.9.0
type WindowIntent ¶ added in v0.9.0
type WindowIntent struct {
URL string `json:"url"`
Target string `json:"target"`
Features string `json:"features"`
Timestamp int64 `json:"timestamp"`
WindowType string `json:"windowType"` // "tab", "popup", "unknown"
IsPopup bool `json:"isPopup"`
IsTab bool `json:"isTab"`
RequestID string `json:"requestId"` // NEW: Unique request identifier
UserTriggered bool `json:"userTriggered"` // NEW: Whether this was user-initiated
// Parsed features
Width *int `json:"width,omitempty"`
Height *int `json:"height,omitempty"`
Toolbar *bool `json:"toolbar,omitempty"`
Location *bool `json:"location,omitempty"`
Menubar *bool `json:"menubar,omitempty"`
Resizable *bool `json:"resizable,omitempty"`
}
WindowIntent represents an intercepted window.open call from JavaScript
type WorkspaceObserver ¶ added in v0.9.0
Handler processes script messages from the WebView
Click to show internal directories.
Click to hide internal directories.