Table of Contents

Method Create

Namespace
TinyComponents
Assembly
TinyComponents.dll

Create(string)

Creates an HtmlElement from the specified emmet template.

public static HtmlElement Create(string emmetString)

Parameters

emmetString string

Returns

HtmlElement

Create(string, object?, object?, object?[]?, bool)

Creates an HtmlElement from the specified emmet template and adds the specified style, attributes, and children.

public static HtmlElement Create(string emmetString, object? style = null, object? attributes = null, object?[]? children = null, bool selfClosing = false)

Parameters

emmetString string

The emmet template string.

style object

An object containing style properties to apply to the element. Can be null.

attributes object

An object containing attribute names and values to apply to the element. Can be null.

children object[]

An array of objects to put as children of the creating element. Can be null.

selfClosing bool

An boolean indicating if the creating element should be self-closed or not.

Returns

HtmlElement

A new HtmlElement based on the emmet template with the specified style, attributes, and children.

Create(string, Action<HtmlElement>)

Creates an HtmlElement from the specified emmet template and configures it using the specified action.

public static HtmlElement Create(string emmetString, Action<HtmlElement> self)

Parameters

emmetString string

The emmet template string.

self Action<HtmlElement>

An action to configure the created HtmlElement.

Returns

HtmlElement

A new HtmlElement based on the emmet template and configured using the specified action.