IMO we should require folks to pass the `ScriptType` in here and add the API clinton proposed and default to inline and fallback to file by default? that way we can skip the `/` detection which can break BW compat?