HTML class
📖 Description
The HTML
class defines a HTML instance for the Tripetto builder. It is derived from the Control
class.
📺 Preview
🆕 constructor
Creates a new HTML
instance.
Signature
constructor(htmlCode: string, interactive?: boolean, style?: IHTMLStyle): HTML
Parameters
Name | Type | Optional | Description |
---|---|---|---|
htmlCode | string | No | Specifies the HTML code for the control. |
interactive | boolean | Yes | Specifies if the HTML code is interactive. Tripetto's touch controller is disabled in that case so events can propagate to the HTML elements. |
style | IHTMLStyle | Yes | Specifies the HTML style (when omitted the default global style will be used). |
Return value
Returns a reference to the new HTML
instance.
📌 Statics
🏷️ style
Contains the global default style for the HTML control.
Type
🗃️ Fields
🏷️ HTML
Sets or retrieves the HTML code.
Type
string
🏷️ isVisible
Sets or retrieves the visibility of the control.
Type
boolean
🏷️ style
Contains the style for the HTML control.
Type
▶️ Methods
🔧 hide
Hides the control.
Signature
hide(): this
Return value
Returns a reference to the HTML
instance to allow chaining.
🔧 indent
Enables control indentation. This can only be set during construction.
Signature
indent(size: number): this
Parameters
Name | Type | Optional | Description |
---|---|---|---|
size | number | No | Specifies the indent size in pixels. |
Return value
Returns a reference to the HTML
instance to allow chaining.
🔧 show
Shows the control.
Signature
show(): this
Return value
Returns a reference to the HTML
instance to allow chaining.
🔧 update
Indicates to the control something has changed in the HTML hosted by the control and the control needs to update its dimensions.
Signature
update(): void
🔧 visible
Specifies the visibility of the control.
Signature
visible(visible?: boolean): this
Parameters
Name | Type | Optional | Description |
---|---|---|---|
visible | boolean | Yes | Specifies if the control is visible (default is true ). |
Return value
Returns a reference to the HTML
instance to allow chaining.
⛓️ Interfaces
🔗 IHTMLStyle
Describes the interface for the HTML styles.
Type declaration
interface IHTMLStyle {
/* HTML appearance. */
appearance?: IStyles;
/* HTML appearance when fused with form. */
fused?: IStyles;
}