Can Client Resource Management check for a duplicate script or css file?
Add an Answer
Your question has been submitted and is awaiting moderation.
Thank you for reporting this content, moderators have been notified of your submission.
I have two custom "chart" modules, both of which are on the same page. They may not always be on the same page, so I treat them as individual units.
For rendering the charts properly in IE7, I need to include the excanvas javascript file as the very first one to load (so priority = 1). Both modules detect the browser and will use the Client Resource Management framework to do this.
ClientResourceManager.RegisterScript(...)
Everything is working fine, except that I don't know how to detect whether this javascript file, which is in both of the modules, has already been loaded by one module or another. Right now the script is being loaded twice in the header.
Is there any way to check if the script has already been loaded in the header, if I'm using the Client Resource Management framework? (I'm able to do so for other scripts, *not* using the CRM framework...)
Thanks!