dynamically loading scripts in snippets in unreliable


When a snippet is rendered, AJAX component script includes and component creation scripts are exec'd. components cannot be created until script includes are loaded. There needs to be a way to manage loading gracefully so components are not created until the scripts are fully loaded.
ASP.NET AJAX Framwork has a notifyScriptLoaded method, however this might not be suitable since the Application in the snippet hosting page has already been initialized, need to look into this.
Closed Sep 29, 2008 at 11:35 PM by fluxtah


fluxtah wrote Sep 27, 2008 at 10:57 PM

Snippet script includes now have their loading tracked by SnippetManager, during loading any script that requires a script include to be loaded before it can be executed is stacked by SnippetManager via SnippetManager.stackFunction()
and executed when all included scripts have loaded (fingers crossed!)

fluxtah wrote Sep 27, 2008 at 11:00 PM

Although the work on this has made it look more realistic that it may be possible to have client components in snippets there is still one issue.

If the snippet is request quicker than scripts can be loaded then the SnippetManager will get into a pickle as its internal 'script loading count' will be an erroneous value.

A solution to this would be to track execute a function in SnippetManager to inform it that a snippet is about to have its scripts parsed and executed, values could then be reset and functions waiting to be executed can be purged.

wrote Sep 29, 2008 at 11:24 PM

fluxtah wrote Sep 29, 2008 at 11:32 PM

No more concern here.

** Closed by fluxtah 9/29/2008 3:24 PM

fluxtah wrote Sep 29, 2008 at 11:32 PM

wrote Sep 29, 2008 at 11:33 PM

wrote Sep 29, 2008 at 11:35 PM

wrote Feb 1, 2013 at 12:40 AM

wrote May 13, 2013 at 6:33 PM