Function
clear
(
host: Context.Service.Shape<typeof Host>,
node: NativeNode
)
Source from the content-addressed store, hash-verified
| 1367 | * @since 4.2.0 |
| 1368 | */ |
| 1369 | export const clear = ( |
| 1370 | host: Context.Service.Shape<typeof Host>, |
| 1371 | node: NativeNode |
| 1372 | ): void => { |
| 1373 | node.props.text = "" |
| 1374 | host.command(node, "setTextAndSelection", [node.eventCount, "", 0, 0]) |
| 1375 | } |
| 1376 | |
| 1377 | /** |
| 1378 | * Moves the caret or selection of an `input` using the host's latest event |
Callers
nothing calls this directly
Tested by
no test coverage detected