Fit.Loader.LoadScript("path/to/script.js", function(src)
{
// Do stuff here..
});
The function passed keeps a reference to everything in its closure because LoadScript(..) adds a <script> element to the page which holds a reference to the function for all eternity - or at least until the page is reloaded or closed. The same applies to Fit.Loader.LoadStyleSheet(..).
Consider the following example:
The function passed keeps a reference to everything in its closure because LoadScript(..) adds a
<script>
element to the page which holds a reference to the function for all eternity - or at least until the page is reloaded or closed. The same applies to Fit.Loader.LoadStyleSheet(..).