Skip to content

Commit de4b736

Browse files
committed
doc: Update getting-started
1 parent 0fc8c6f commit de4b736

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

docs/Getting-started.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ import (
4343
func TestWebBrowser(t *testing.T) {
4444
t.Parallel()
4545
b := browser.New(
46+
browser.WithScriptEngine(v8engine.DefaultEngine()),
47+
// Alternatively (adjust imports accordingly), using Sobek, a pure Go
48+
// JavaScript engine:
49+
// browser.WithScriptEngine(sobekengine.DefaultEngine()),
4650
browser.WithHandler(server.RootHttpHandler),
4751
browser.WithLogger(gosttest.NewTestingLogger(t)),
4852
browser.WithContext(t.Context()),
@@ -60,6 +64,7 @@ Breakdown of the code:
6064

6165
- `browser.New` obviously creates a new browser instance. By default, this will
6266
be configured with a V8 script engine.
67+
- `browser.WithScriptEngine` passes a script engine to use.
6368
- `browser.WithHandler` is the recommended way, connect the browser directly
6469
to the root HTTP handler, bypassing the TCP stack. This is not necessary.
6570
Without it, you need to start the server on a TCP port, as well as remember

0 commit comments

Comments
 (0)