Skip to content

Commit 0b79759

Browse files
authored
Change dialog polyfill to Object.assign for IE
Object.assign is not supported in IE, which causes quicklink (my example script) to fail in IE11 and older (works everywhere else though - classic IE!). Originally had dialog as the polyfill so I could see it was working when troubleshooting in Chrome - can be changed to as many polyfills as necessary and supported by https://polyfill.io/v3/url-builder
1 parent 48a2866 commit 0b79759

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

dynamicpolyfill.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//This is reliant on Promises. If you want to use this, you'll need to (ironically!) polyfill Promises first... or at least until I can work out how to polyfill promises dynamically
22

3-
//Example polyfill requirements and 3rd party script
4-
var mayneedpolyfilling = ['IntersectionObserver', 'dialog']; //features that your script relies on
3+
//Example polyfill requirements and 3rd party script (in this case, Google's quicklink)
4+
var mayneedpolyfilling = ['IntersectionObserver', 'Object.assign']; //features that your script relies on - these two aren't supported in IE
55
var scriptiwannause = 'https://cdn.jsdelivr.net/npm/quicklink@1.0.0/dist/quicklink.umd.js'; //the script that you want to use
66

77
window.onload = function pageLoaded() {
@@ -12,7 +12,7 @@ window.onload = function pageLoaded() {
1212
.then(
1313
function() {
1414
console.log('Aha! your script is now loaded! Initialising...');
15-
//quicklink();
15+
//quicklink(); //Initiate your script here!
1616
console.log("Et voila! You're up and running!");
1717
}
1818
).catch(function(error){return error})

0 commit comments

Comments
 (0)