diff --git a/signals_js.go b/signals_js.go new file mode 100644 index 0000000000..4d6f2a685c --- /dev/null +++ b/signals_js.go @@ -0,0 +1,9 @@ +//go:build js +// +build js + +package tea + +// listenForResize is not available in js runtime. +func (p *Program) listenForResize(done chan struct{}) { + close(done) +} diff --git a/tty_js.go b/tty_js.go new file mode 100644 index 0000000000..c083f18dd0 --- /dev/null +++ b/tty_js.go @@ -0,0 +1,21 @@ +//go:build js +// +build js + +package tea + +import ( + "errors" + "os" +) + +func (p *Program) initInput() error { + return nil +} + +func (p *Program) restoreInput() error { + return nil +} + +func openInputTTY() (*os.File, error) { + return nil, errors.New("unavailable in js") +}