Maybe adding a
gadget module which in turns loads the others as needed?
That could work, yes, but
it'd mean the loader only finds out which
gadgets it needs after the gadget module runs, which means it has to
do an extra request back to the server to get them.
I see. It would have to be a hook into the resource loader.