```runtime.getWindow()``` would be the check if we are in a browser? webodf/tests/tests.js does ```runtime.type() === "BrowserRuntime"``` for the rather same semantic, no? Ideally there would be one true way. At least in general getWindow() returning non-null might one day not guarantee that creating <script> elements will result in automated loading, so seems slightly fragile. Even if Runtime.create currently selects to create BrowserRuntime based on String(typeof window) !== "undefined"). Perhaps better hardcode === "BrowserRuntime" also here?

"loadFilesInBrowser" would be a method only valid for BrowserRuntime currently, right? What about making loadFiles a default method with additional parameter callback and overwriting that in the BrowserRuntime with what is now loadFilesInBrowser? Hm, that would expose this method in the runtime API while it is rather an internal one. Any better idea? If not, then the current code might be okay as well, just not instantly understood