1

Closed

dynamically loading scripts in snippets in unreliable

description

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 10:35 PM by fluxtah

comments

fluxtah wrote Sep 27, 2008 at 9: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 10: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 10:24 PM

fluxtah wrote Sep 29, 2008 at 10:32 PM

No more concern here.

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

fluxtah wrote Sep 29, 2008 at 10:32 PM

wrote Sep 29, 2008 at 10:33 PM

wrote Sep 29, 2008 at 10:35 PM

wrote Jan 31, 2013 at 11:40 PM

wrote May 13, 2013 at 5:33 PM