Skip to content

Interface: AnyDropRenderContext ​

Defined in: ui/src/types.ts:115

Members every render context has.

Extended by ​

Properties ​

PropertyTypeDescriptionDefined in
instanceAnyDropThe instance.ui/src/types.ts:117
layoutstring & object | AnyDropLayoutThe current layout.ui/src/types.ts:119

Methods ​

html() ​

ts
html(strings, ...values): HTMLElement;

Defined in: ui/src/types.ts:123

Builds DOM from markup; every ${value} is HTML-escaped.

Parameters ​

ParameterType
stringsTemplateStringsArray
...valuesunknown[]

Returns ​

HTMLElement


icon() ​

ts
icon(name): HTMLElement;

Defined in: ui/src/types.ts:125

<span class="ad-icon" aria-hidden="true"> holding the configured icon.

Parameters ​

ParameterType
name| string & object | AnyDropIconName

Returns ​

HTMLElement


t() ​

ts
t(key, vars?): string;

Defined in: ui/src/types.ts:121

The current text of a dict* option, with placeholders replaced. Unknown keys return the key.

Parameters ​

ParameterType
key| "dictFileTooBig" | "dictInvalidFileType" | "dictResponseError" | "dictUploadCanceled" | "dictMaxFilesExceeded" | "dictFileUnreadable" | "dictInvalidPath" | "dictFileSizeUnits" | keyof AnyDropDict
vars?Record<string, string | number>

Returns ​

string

Released under the MIT License.