|
1 |
| -# NOTE: this is copied from Pluto. |
2 | 1 | """
|
3 | 2 | open_in_default_browser(url)
|
4 | 3 |
|
5 |
| -Open a URL in system default browser. |
| 4 | +Open a URL in the ambient default browser. |
| 5 | +
|
| 6 | +Note: this was copied from Pluto.jl. |
6 | 7 | """
|
7 | 8 | function open_in_default_browser(url::AbstractString)::Bool
|
8 | 9 | try
|
@@ -241,17 +242,16 @@ directory. (See also [`example`](@ref) for an example folder).
|
241 | 242 | * `dir` specifies where to launch the server if not the current working directory.
|
242 | 243 | * `verbose` is a boolean switch to make the server print information about file changes and connections.
|
243 | 244 | * `coreloopfun` specifies a function which can be run every 0.1 second while the liveserver is going; it takes two arguments: the cycle counter and the filewatcher. By default the coreloop does nothing.
|
244 |
| -* `launch_browser=false` is a boolean switch to choose launch the browser at host url. |
| 245 | +* `launch_browser=false` specifies whether to launch the ambient browser at the localhost URL or not. |
245 | 246 |
|
246 | 247 | # Example
|
247 | 248 |
|
248 | 249 | ```julia
|
249 | 250 | LiveServer.example()
|
250 |
| -serve(host="127.0.0.1", port=8080, dir="example", verbose=true) |
| 251 | +serve(host="127.0.0.1", port=8080, dir="example", verbose=true, launch_browser=true) |
251 | 252 | ```
|
252 | 253 |
|
253 |
| -If you open a browser to `http://127.0.0.1:8080/`, you should see the `index.html` page from the |
254 |
| -`example` folder being rendered. If you change the file, the browser will automatically reload the |
| 254 | +You should then see the `index.html` page from the `example` folder being rendered. If you change the file, the browser will automatically reload the |
255 | 255 | page and show the changes.
|
256 | 256 | """
|
257 | 257 | function serve(fw::FileWatcher=SimpleWatcher(file_changed_callback);
|
|
0 commit comments