Redirects console output to an <ul> element
- Source:
Members
-
<static> DEFAULTS :Object
-
Default CSS classes
Type:
- Object
- Source:
Properties:
Name Type Argument Default Description error
string <nullable>
text-danger The default CSS class for error messages
warn
string <nullable>
text-warning The default CSS class for warning messages
info
string <nullable>
text-success The default CSS class for info messages
debug
string <nullable>
text-info The default CSS class for debug messages
log
string <nullable>
null The default CSS class for log messages
Methods
-
<static> connect(target [, options] [, includeTimestamp] [, logToConsole] [, appendAtBottom])
-
Overwrite the original console.* methods and start outputting to screen
Parameters:
Name Type Argument Default Description target
$ | jQuery | HTMLUListElement The target <ul> element to output to. Can can either be a
jQuery or vanilla JS HTMLUListElement.options
Object <optional>
ConsoleLogHTML.DEFAULTS CSS class options. See ConsoleLogHTML.DEFAULTS for
default values.includeTimestamp
boolean <optional>
true Whether to include the log message timestamp in HTML
logToConsole
boolean <optional>
true Whether to continue logging to the console as well as HTML.
appendAtBottom
boolean <optional>
false Whether to append the log messages at the end of the ul-list
- Source:
Throws:
-
If target is not an <ul> element
- Type
- Error
-
<static> disconnect()
-
Disconnect our console overrides, reverting to the original state
- Source: