Redirects console output to an <ul> element
- Source:
Members
-
<static> DEFAULTS :Object
-
Default CSS classes
Type:
- Object
- Source:
Properties:
Name Type Argument Default Description errorstring <nullable>
text-danger The default CSS class for error messages
warnstring <nullable>
text-warning The default CSS class for warning messages
infostring <nullable>
text-success The default CSS class for info messages
debugstring <nullable>
text-info The default CSS class for debug messages
logstring <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.optionsObject <optional>
ConsoleLogHTML.DEFAULTS CSS class options. See ConsoleLogHTML.DEFAULTS for
default values.includeTimestampboolean <optional>
true Whether to include the log message timestamp in HTML
logToConsoleboolean <optional>
true Whether to continue logging to the console as well as HTML.
appendAtBottomboolean <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: