setFocus

suspend fun Tag<HTMLElement>.setFocus(maxRetries: Int = 10)

Sets focus on the Tag it is called on. Continues to try setting the focus until it was successful or the maximum number of retries is reached. Use this function for example to set the focus on an element that just becomes visible.

Parameters

maxRetries

maximum retries