Description Usage Arguments Details Value Author(s) See Also Examples
Open a web page in a browser and provide a handle to that web page.
1 2 3 4 |
html |
A character vector containing HTML code, which will be used as the body of the web page that is opened. |
head |
A character vector that will be added to the head of the web page. |
host |
The client host. By default this is the localhost, but in theory it allows for a remote client. |
client |
A definition of the client, as created by |
file |
A path to a file on the local file system, which should be a text file containing HTML (plus possibly SVG, CSS, javascript) describing a web page. |
url |
A URL to a web page on the internet. |
By default, the web page described by html
, file
,
or url
is opened in the default browser
(getOptions("browser")
). A headless browser (PhantomJS) is
supported, which may be useful for testing.
For filePage()
and urlPage()
to work, the
RDOM.user.js
user script must be installed in the browser
(for greasemonkey with Firefox). There is also RDOM.tamper.js
(for Tampermonkey with, e.g., Chrome). In addition, for
filePage()
, in Firefox at least,
greasemonkey.fileIsGreaseable
must be
set to true
in about:config
. urlPage()
currently
only supports the http://
protocol (not https://
).
For client=phantomClient
to work, PhantomJS must be installed.
A page identifier, to be used to send DOM requests to the web page, or to close the web page.
Paul Murrell
1 2 3 | headlessPage <- htmlPage(client=phantomClient)
appendChild(headlessPage, htmlNode("<p>test</p>"))
closePage(headlessPage)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.