Skip to main content

setProp()

setProp(el, name, value): void

Defined in: js-api/src/u2core/inspect.ts:85

Writes a declared property of the control owning el through its setter — for putting a control in a state from a test. Throws when the control has no such property or it is read-only.

Parameters​

ParameterType
elElement | null
namestring
valueunknown

Returns​

void

Example​

DG.U2.setProp(el, 'enabled', false);

See​

https://public.datagrok.ai/js/samples/ui/widgets/u2-status