control()
control(
el):Control|undefined
Defined in: js-api/src/u2core/inspect.ts:25
The u2 control owning el: the nearest control root at or above it, or the owner of the popup it
sits in. Platform widget wrappers are passed over — whether one exists depends on who asked the
platform for it. Undefined for an element outside any u2 control.
Parameters
| Parameter | Type |
|---|---|
el | Element | null |
Returns
Control | undefined
Example
const input = DG.U2.control(document.querySelector('[data-u2="text-input"]'));