new HtmlInclude()
NB: Attributes not available here - use connectedCallback to reference
- Source:
Members
componentVersion
Component version
- Source:
componentVersion
Component version
- Source:
contentType :"text"|"html"|"json"|"form"
Content type of the imported resource
Type:
- "text" | "html" | "json" | "form"
- Source:
contentType :"text"|"html"|"json"|"form"
Content type of the imported resource
Type:
- "text" | "html" | "json" | "form"
- Source:
src
The URL to fetch an HTML document from. Allows change via instance prop as well as attribute change.
Setting this property causes a fetch the HTML from the URL.
We are reflecting the src attrib and the src prop.
- Source:
src
Reflect src property to the src attribute
- Source:
src
The URL to fetch an HTML document from. Allows change via instance prop as well as attribute change.
Setting this property causes a fetch the HTML from the URL.
We are reflecting the src attrib and the src prop.
- Source:
src
Reflect src property to the src attribute
- 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:
(async) doInclude(url)
Replaces the shadow dom content with the imported HTML.
Parameters:
Name | Type | Description |
---|---|---|
url |
URL | string | URL of the resource to import |
- Source:
(async) doInclude(url)
Replaces the shadow dom content with the imported HTML.
Parameters:
Name | Type | Description |
---|---|---|
url |
URL | string | URL of the resource to import |
- 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