latest version of honey-require

This commit is contained in:
Eric Vergnaud 2016-02-02 21:01:28 +08:00
parent 832903a281
commit 2d748d6e64
1 changed files with 8 additions and 2 deletions

View File

@ -62,7 +62,13 @@
// anchor element as parser in that case. Thes breaks web worker support,
// but we don't care since these browsers also don't support web workers.
var parser = URL ? new URL(location.href) : document.createElement('A');
try {
var parser = new URL(location.href);
}
catch (e) {
console.warn("Honey: falling back to DOM workaround for URL parser ("+e+")");
parser = document.createElement('A');
}
// INFO Module cache
// Contains getter functions for the exports objects of all the loaded
@ -81,7 +87,7 @@
delete cache.foo;
}
catch (e) {
console.warn("Honey: falling back to DOM workaround for defineProperty ("+e+")");
console.warn("Honey: falling back to DOM workaround for cache object ("+e+")");
cache = document.createElement('DIV');
}