How selector/uielement works in Inject JS activity?

Selector/uielement is required in inject JS activity. I’m aware normally the target website will be the argument on this.

What if I indicate the selector in a web control (i.e. Textbox), will the javascript execute on that selector? Or will it be the argument on the element parameter of JS anonymous function? Or what?