Can we factor out something common between this, `loadText`, and `loadArrayBuffer`?  They're all basically identical.