# Class: SyntaxHighlight

## SyntaxHighlight()

#### new SyntaxHighlight()

NB: Attributes not available here - use connectedCallback to reference

Source:
  - syntax-highlight.js, line 150

### Members

#### componentVersion

Component version

Source:
  - syntax-highlight.js, line 110

#### componentVersion

Component version

Source:
  - syntax-highlight.js, line 110

#### json

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

Source:
  - syntax-highlight.js, line 129

#### json

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

Source:
  - syntax-highlight.js, line 129

#### (static) observedAttributes

Makes HTML attribute change watched

Source:
  - syntax-highlight.js, line 117

#### (static) observedAttributes

Makes HTML attribute change watched

Source:
  - syntax-highlight.js, line 117

### 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:
  - syntax-highlight.js, line 193

#### 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:
  - syntax-highlight.js, line 193

#### connectedCallback()

Runs when an instance is added to the DOM

Source:
  - syntax-highlight.js, line 161

#### connectedCallback()

Runs when an instance is added to the DOM

Source:
  - syntax-highlight.js, line 161

#### disconnectedCallback()

Runs when an instance is removed from the DOM

Source:
  - syntax-highlight.js, line 180

#### disconnectedCallback()

Runs when an instance is removed from the DOM

Source:
  - syntax-highlight.js, line 180

#### (static) highlight(json) → {HTMLElement}

Return a formatted HTML version of JSON object

##### Parameters:

Name | Type | Description
--- | --- | ---
`json` | object | JSON | JSON object to convert

Source:
  - syntax-highlight.js, line 210

##### 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:
  - syntax-highlight.js, line 210

##### Returns:

Highlighted JSON wrapped in a `

    ` tag

Type
  HTMLElement

## SyntaxHighlight()

#### new SyntaxHighlight()

NB: Attributes not available here - use connectedCallback to reference

Source:
  - syntax-highlight.js, line 150

### Members

#### componentVersion

Component version

Source:
  - syntax-highlight.js, line 110

#### componentVersion

Component version

Source:
  - syntax-highlight.js, line 110

#### json

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

Source:
  - syntax-highlight.js, line 129

#### json

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

Source:
  - syntax-highlight.js, line 129

#### (static) observedAttributes

Makes HTML attribute change watched

Source:
  - syntax-highlight.js, line 117

#### (static) observedAttributes

Makes HTML attribute change watched

Source:
  - syntax-highlight.js, line 117

### 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:
  - syntax-highlight.js, line 193

#### 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:
  - syntax-highlight.js, line 193

#### connectedCallback()

Runs when an instance is added to the DOM

Source:
  - syntax-highlight.js, line 161

#### connectedCallback()

Runs when an instance is added to the DOM

Source:
  - syntax-highlight.js, line 161

#### disconnectedCallback()

Runs when an instance is removed from the DOM

Source:
  - syntax-highlight.js, line 180

#### disconnectedCallback()

Runs when an instance is removed from the DOM

Source:
  - syntax-highlight.js, line 180

#### (static) highlight(json) → {HTMLElement}

Return a formatted HTML version of JSON object

##### Parameters:

Name | Type | Description
--- | --- | ---
`json` | object | JSON | JSON object to convert

Source:
  - syntax-highlight.js, line 210

##### 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:
  - syntax-highlight.js, line 210

##### Returns:

Highlighted JSON wrapped in a `

    ` tag

Type
  HTMLElement