So I've been reading up on regClientScript and regClientStartupScript trying to grasp how this works. I love it, but I don't see anything in the documentation on whether this mod was ever implemented in revo in the way described above. I guess my question is; if there are 2 add-on's that use jquery, and one points to an older version than the other, what loads? Are there two references to separate jquery files? Does it just load whatever jquery file gets processed by modx first?
Maybe modx should have a "core script library" that stores only the most common javascript libraries that addons can reference (either local or through cdn). Maybe have a method for an addon to add objects to the library if they don't already exist in the library, and let the users update items in the library if or when they need to. This may add another step for developers to record version numbers for the "library" scripts they load into the "library", but the "library" would not have to be populated with everything from a modx install, but by whatever addons are installed.
For example, a user has a list of jquery versions in the manager and has a checkbox to select which version number to run. A new addon gets installed, automatically adding a new jquery file to the library, and in the installation process a message appears saying "This addon uses jquery 1.7.1, you are using 1.6.9." The user can then test the site with both addons and adjust the version number for the site by clicking a checkbox in the manager.
This would not only prevent conflicting files on the same page, but would also prevent addons that are running on different pages from grabbing the same javascript file (or a close version number) from different folders. I think that would speed a site up because it would only have to cache the file once from the first page.