Closed lavelle closed 10 years ago
It also attempts to use window.localStorage
, even when using a different backend, like in-memory. This isn't available for Chrome apps, they need to request the permission chrome.storage.local
. It would also be nice to create a wrapper function that returns one of these based on a feature-detect too, for compatibility, but it doesn't break other backends like the first issue does, so it's lower priority.
In the Chrome app, is document.write
undefined? If so, we can add that to the check for document
.
No, unfortunately, it's a function which throws an error. But doing the inverse check for window.chrome
should be enough.
I was about to say that this won't work, because IE11 and Opera and others define window.chrome
, but we only need this VBScript injection for old IE versions. So that should work nicely.
I wasn't able to test the patch on old IE versions, but I'll close this for now.
BrowserFS doesn't work in a Chrome app, because it uses
document.write
for an IE polyfill which is not supported in Chrome apps. Could we add some feature detection to only run this if it's not running in a Chrome app/extension?There's another error which occurs where the
BrowserFS
global isn't available, but I'm guessing this is because the script terminates before it attaches itself due to the previous error.