browser

package
v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2026 License: EUPL-1.2 Imports: 3 Imported by: 0

Documentation

Overview

pkg/browser/messages.go

pkg/browser/platform.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(p Platform) func(*core.Core) core.Result

Register(p) binds the browser service to a Core instance. core.WithService(browser.Register(wailsBrowser))

Types

type Options

type Options struct{}

type Platform

type Platform interface {
	// OpenURL opens the given URL in the default system browser.
	OpenURL(url string) error

	// OpenFile opens the given file path with the system default application.
	OpenFile(path string) error
}

Platform abstracts the system browser/file-opener backend.

type Service

type Service struct {
	*core.ServiceRuntime[Options]
	// contains filtered or unexported fields
}

func (*Service) HandleIPCEvents

func (s *Service) HandleIPCEvents(_ *core.Core, _ core.Message) core.Result

func (*Service) OnStartup

func (s *Service) OnStartup(_ context.Context) core.Result

type TaskOpenFile

type TaskOpenFile struct {
	Path string `json:"path,omitempty"`
}

TaskOpenFile opens a file with the system default application. Result: nil

type TaskOpenURL

type TaskOpenURL struct {
	URL string `json:"url"`
}

TaskOpenURL opens a URL in the default system browser. Result: nil

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL