How to insert some JavaScript to a *.phtml template in the proper way (x-magento-init)

See also: