File: wwwbrowser.doc

package info (click to toggle)
swi-prolog 7.2.3%2Bdfsg-6
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 84,180 kB
  • ctags: 45,684
  • sloc: ansic: 330,358; perl: 268,104; sh: 6,795; java: 4,904; makefile: 4,561; cpp: 4,153; ruby: 1,594; yacc: 843; xml: 82; sed: 12; sql: 6
file content (30 lines) | stat: -rw-r--r-- 1,260 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
\libdoc{www_browser}{Activating your Web-browser}

This library deals with the very system-dependent task of opening a
web page in a browser.  See also \pllib{url} and the HTTP package.

\begin{description}
    \predicate{www_open_url}{1}{+URL}
Open \arg{URL} in an external web browser. The reason to place this in
the library is to centralise the maintenance on this highly platform-
and browser-specific task.  It distinguishes between the following
cases:

\begin{itemlist}
    \item [MS-Windows]
If it detects MS-Windows it uses win_shell/2 to open the \arg{URL}.  The
behaviour and browser started depends on the version of Windows and Windows-shell
configuration, but in general it should be the behaviour expected by
the user.

    \item [Other platforms]
On other platforms it tests the environment variable (see getenv/2)
named \env{BROWSER} or uses \program{netscape} if this variable is not
set.  If the browser is either \const{mozilla} or \const{netscape},
www_open_url/1 first tries to open a new window on a running browser using
the \const{-remote} option of Netscape.  If this fails or the browser
is not \const{mozilla} or \const{netscape} the system simply passes
the URL as first argument to the program.
\end{itemlist}
\end{description}