As you said, it is preferable to pass the value of the function.
But yes, setting the input value is synchronous; in what you described, you will reliably get the updated value, cross browser. Other DOM manipulations (inserting elements, deleting them, moving them) are also synchronous, although the user may not see the result until your JavaScript code completes, allowing the browser to use the stream to redraw the display. (Although JavaScript is not essentially single-threaded, browsers use the same main UI thread to run your JavaScript code and usually also use this thread to refresh the display.)