@get-advantage/advantage / advantage/ui-layer / AdvantageUILayer
Class: AdvantageUILayer
advantage/ui-layer.AdvantageUILayer
Represents the UI layer for an Advantage high-impact format. This class extends the HTMLElement class and provides methods for manipulating the UI content and styles.
Hierarchy
HTMLElement↳
AdvantageUILayer
Constructors
constructor
• new AdvantageUILayer(): AdvantageUILayer
Creates an instance of AdvantageUILayer. Attaches a shadow root to the element and initializes the necessary elements.
Returns
Overrides
HTMLElement.constructor
Defined in
Properties
#container
• Private #container: HTMLDivElement
Defined in
#content
• Private #content: HTMLDivElement
Defined in
#root
• Private #root: ShadowRoot
Defined in
#styleSheet
• Private #styleSheet: CSSStyleSheet | HTMLStyleElement
Defined in
slotName
• slotName: string = "advantage-ui-content"
Defined in
Methods
changeContent
▸ changeContent(content): void
Changes the content of the UI layer.
Parameters
| Name | Type | Description |
|---|---|---|
content | string | HTMLElement | The new content to be displayed. It can be either a string or an HTMLElement. |
Returns
void
Defined in
insertCSS
▸ insertCSS(CSS): void
Inserts CSS styles into the UI layer.
Parameters
| Name | Type | Description |
|---|---|---|
CSS | string | The CSS styles to be inserted. |
Returns
void