mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-04 05:50:54 +08:00

* [316-multi-bridge-conn] feat: use callback func for bridge response * [316-multi-bridge-conn] feat: implement multiple session support * split client handling portion into 'session' * keep track of sessions by remote address (ip & port) * notify each of the sessions anytime an event comes across the bus * [316-multi-bridge-conn] chore: move bridge files to package * [316-multi-bridge-conn] chore: remove deprecated Callback function The Callback function is no longer needed for the operation of the frontend callback since the ipc.Dispatch function now requires a callback function to be provided as an argument. This function can be a private function since it is passed by reference. * [316-multi-bridge-conn] chore: make webview.Callback private * [316-multi-bridge-conn] chore: remove unused injectCSS function I believe a slightly better method of doing this might need to be devised if it is needed in the future. I presume it should collect the values into a cache and then inject it into each sesssion as it appears. * [316-multi-bridge-conn] ensure wails:ready event is emitted Event is only emitted for the first session created from the Bridge. * [316-multi-bridge-conn] emit events for session lifecycle Emit an event for each session started and ended. * [316-multi-bridge-conn] fix: session handling fixes Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
11 lines
188 B
Go
11 lines
188 B
Go
package renderer
|
|
|
|
import (
|
|
bridge "github.com/wailsapp/wails/lib/renderer/bridge"
|
|
)
|
|
|
|
// NewBridge returns a new Bridge struct
|
|
func NewBridge() *bridge.Bridge {
|
|
return &bridge.Bridge{}
|
|
}
|