Class: SyntaxHighlight

SyntaxHighlight()

new SyntaxHighlight()

NB: Attributes not available here - use connectedCallback to reference
Source:

Members

componentVersion

Component version
Source:

componentVersion

Component version
Source:

json

Element.json = {...} to show the json object
Source:

json

Element.json = {...} to show the json object
Source:

(static) observedAttributes

Makes HTML attribute change watched
Source:

(static) observedAttributes

Makes HTML attribute change watched
Source:

Methods

attributeChangedCallback(attrib, oldVal, newVal)

Runs when an observed attribute changes - Note: values are always strings
Parameters:
Name Type Description
attrib string Name of watched attribute that has changed
oldVal string The previous attribute value
newVal string The new attribute value
Source:

attributeChangedCallback(attrib, oldVal, newVal)

Runs when an observed attribute changes - Note: values are always strings
Parameters:
Name Type Description
attrib string Name of watched attribute that has changed
oldVal string The previous attribute value
newVal string The new attribute value
Source:

connectedCallback()

Runs when an instance is added to the DOM
Source:

connectedCallback()

Runs when an instance is added to the DOM
Source:

disconnectedCallback()

Runs when an instance is removed from the DOM
Source:

disconnectedCallback()

Runs when an instance is removed from the DOM
Source:

(static) highlight(json) → {HTMLElement}

Return a formatted HTML version of JSON object
Parameters:
Name Type Description
json object | JSON JSON object to convert
Source:
Returns:
Highlighted JSON wrapped in a `
` tag
Type
HTMLElement

(static) highlight(json) → {HTMLElement}

Return a formatted HTML version of JSON object
Parameters:
Name Type Description
json object | JSON JSON object to convert
Source:
Returns:
Highlighted JSON wrapped in a `
` tag
Type
HTMLElement

SyntaxHighlight()

new SyntaxHighlight()

NB: Attributes not available here - use connectedCallback to reference
Source:

Members

componentVersion

Component version
Source:

componentVersion

Component version
Source:

json

Element.json = {...} to show the json object
Source:

json

Element.json = {...} to show the json object
Source:

(static) observedAttributes

Makes HTML attribute change watched
Source:

(static) observedAttributes

Makes HTML attribute change watched
Source:

Methods

attributeChangedCallback(attrib, oldVal, newVal)

Runs when an observed attribute changes - Note: values are always strings
Parameters:
Name Type Description
attrib string Name of watched attribute that has changed
oldVal string The previous attribute value
newVal string The new attribute value
Source:

attributeChangedCallback(attrib, oldVal, newVal)

Runs when an observed attribute changes - Note: values are always strings
Parameters:
Name Type Description
attrib string Name of watched attribute that has changed
oldVal string The previous attribute value
newVal string The new attribute value
Source:

connectedCallback()

Runs when an instance is added to the DOM
Source:

connectedCallback()

Runs when an instance is added to the DOM
Source:

disconnectedCallback()

Runs when an instance is removed from the DOM
Source:

disconnectedCallback()

Runs when an instance is removed from the DOM
Source:

(static) highlight(json) → {HTMLElement}

Return a formatted HTML version of JSON object
Parameters:
Name Type Description
json object | JSON JSON object to convert
Source:
Returns:
Highlighted JSON wrapped in a `
` tag
Type
HTMLElement

(static) highlight(json) → {HTMLElement}

Return a formatted HTML version of JSON object
Parameters:
Name Type Description
json object | JSON JSON object to convert
Source:
Returns:
Highlighted JSON wrapped in a `
` tag
Type
HTMLElement