It can usually be implemented like this. No need for strings.
fun isNan(n) = n != n
73 karma · joined March 9, 2012
fun isNan(n) = n != n
[1] http://www.nasdaqomxnordic.com/bonds/denmark/microsite?Instr...
Passing dependencies also qualifies as DI and is for the benefit of the developer. Maybe you are only talking about DI frameworks or containers in which case I share some skepticism but in general the concept of DI is pretty sound.
0. Browser starts parsing the document
1. Sentiel.js loads (ie. by blocking script tag)
2. Handler is set for .my-component (ie. by inline script tag)
3. Browser parses <div class="my-component" />
4. Handler is fired for .my-component
5. Browser parses rest of document
6. DOMContentLoaded is fired.
Will the .my-component handler will always fire after DOMContentLoaded or have you experienced that it might happen before? I guess it reduces to the question if key-frame-handlers will fire before the document is fully loaded/rendered.