No KO does not handle this automatically (therefore, the self-start function will work only at the bottom of your page), you need to wait for the DOM to load with a call to ko.applyBindings .
From the documentation :
To activate Knockout, add the following line to the <script> block:
ko.applyBindings(myViewModel);
You can put a script block at the bottom of your HTML document, or you can put it at the top and wrap the content in a DOM-ready handler, such as the jQuerys $ function.
source share