HTMLDocument: HTMLDocument Class

Description Details Super class Methods

Description

HTMLDocument Class

HTMLDocument Class

Details

This is a slightly specialized subclass of HTMLElement which includes a $show() method, and includes the HTML DOCTYPE by default.

only tested in MacOS and Rstudio

Super class

minihtml::HTMLElement -> HTMLDocument

Methods

Public methods

Inherited methods

Method new()

Initialise HTMLDocument

Usage
HTMLDocument$new(..., name = "html")
Arguments
...

Further arguments passed to HTMLElement$new()

name

name of node. default: 'html'

Returns

self


Method save()

Save HTML fragment

Usage
HTMLDocument$save(filename, include_declaration = TRUE, ...)
Arguments
filename

filename

include_declaration

Include DOCTYPE declaration? default: TRUE

...

Further arguments passed to HTMLElement$save()

Returns

self


Method print()

Print HTMLDocument

Usage
HTMLDocument$print(include_declaration = TRUE)
Arguments
include_declaration

Include DOCTYPE declaration? default: TRUE

Returns

self


Method as_character()

Convert to character representation

Usage
HTMLDocument$as_character(include_declaration = TRUE)
Arguments
include_declaration

Include DOCTYPE declaration? default: TRUE

Returns

single character string representing the HTML


Method show()

View HTML in whatever viewer is available

Usage
HTMLDocument$show(viewer = getOption("viewer", utils::browseURL))
Arguments
viewer

viewer to use


coolbutuseless/minihtml documentation built on March 11, 2020, 5:22 p.m.