Files
openchamber-android-native/third_party/mygo/single_instance_js.go
T

14 lines
515 B
Go
Raw Normal View History

//go:build js
package mygo
// RequestSingleInstanceLock makes sure a single instance of the app runs.
// Browsers run an instance in every page that loads the app, unaware of
// the others: it returns true.
func (a *Application) RequestSingleInstanceLock() bool { return true }
// OnSecondInstance is called in the first instance when another instance
// was started, which browsers never tell.
func (a *Application) OnSecondInstance(fn func(args []string, workingDir string)) (off func()) {
return func() {}
}