I've checked some stuff into trunk to make it possible to create widgets that require javascript that in turn loads a lot more javascript. An example of this is if you wanted to make use of a service that requires an api key, such as Yahoo Maps.
In this case, the initial javascript loaded by yahoo maps attempts to use document.write to insert its script tags into the dom of the page. This is not compatible with the way appcelerator works, since using document.write once the page is loaded is a bad thing and effectively removes everything.
If you're writing a widget like this, you need to call Appcelerator.Core.queueRemoteLoadScriptWithDependencies(<url>,<callback>). Calling this method ensures that your callback will not be called until all dependent javascript has fully loaded. This function works in the case where the additional javascript is being loaded via document.write, since we override that method as part of the Appcelerator initialization process. Other methods of fetching javascript might still not work.