W3cubDocs

/Nim

Module browsers

This module implements a simple proc for opening URLs with the user's default browser.

Imports

strutils, winlean

Procs

proc openDefaultBrowser(url: string) {...}{.raises: [], tags: [].}

opens url with the user's default browser. This does not block.

Under Windows, ShellExecute is used. Under Mac OS X the open command is used. Under Unix, it is checked if xdg-open exists and used if it does. Otherwise the environment variable BROWSER is used to determine the default browser to use.

© 2006–2018 Andreas Rumpf
Licensed under the MIT License.
https://nim-lang.org/docs/browsers.html