-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
5 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,13 +42,12 @@ var urls = { | |
Temporal:[window], | ||
temporal:[window], | ||
}, | ||
/**/ | ||
'unpkg.com/@ungap/[email protected]/es.js':{ | ||
'customElements':[window], | ||
}, | ||
'cdn.jsdelivr.net/gh/nuxodin/[email protected]/index.min.js':{ | ||
'structuredClone':[window], | ||
}, | ||
// 'cdn.jsdelivr.net/gh/nuxodin/[email protected]/index.min.js':{ // makes problems in safari | ||
// 'structuredClone':[window], | ||
// }, | ||
'cdn.jsdelivr.net/npm/[email protected]/dist/index.umd.js':{ | ||
'URLPattern':[window], | ||
}, | ||
|
@@ -359,22 +358,17 @@ function addGetters(url, props) { | |
configurable: true, | ||
get: function() { | ||
// try { throw new Error(); } catch (e) { console.log(e.stack) } // track where it has been added | ||
//delete obj[prop]; | ||
deleteGetters(); // we have to delete all assigned getters for a url, otherwise the script is parsed anew with every polyfill! | ||
console.log('💊 lazyfill: "'+prop+'" polyfilled (sync!), you need the polyfill '+url); | ||
|
||
// umd | ||
window.exports = {}; | ||
window.module = true; // todo: needed by umd but i dont know why? | ||
|
||
loadScriptSync('https://'+url); | ||
|
||
//if (!this[prop]) this[prop] = exports[prop]; // todo: loop exports? | ||
//return this[prop]; | ||
|
||
// if (!this[prop]) this[prop] = exports[prop]; // todo: loop exports? | ||
// new: polyfill the prototype, not the instance, ok? | ||
if (!obj[prop]) obj[prop] = exports[prop]; // todo: loop exports? | ||
return obj[prop]; | ||
return this[prop]; | ||
}, | ||
set: function(v) { | ||
//deleteGetters(); | ||
|