In my plugin, I want to test to see if jQuery or Prototype (or both) are going to be loaded by another plugin. So, have
wp_enqueue_script('prototype') has already been called.
I have code appropriate to my plugin in files
plugin.jquery.js and if Prototype is queued, my plugin will use
plugin.prototype.js. This way I avoid loading more than necessary into the site. If neither has loaded, I will queue up whichever is smaller.
How can I test to see what has been queued up? How do I make sure my code runs last?