Skip to content

Instantly share code, notes, and snippets.

@matzeeable
Last active June 1, 2022 06:28
Show Gist options
  • Save matzeeable/fe9f40b19bb1e9b3e21232fb4059f69c to your computer and use it in GitHub Desktop.
Save matzeeable/fe9f40b19bb1e9b3e21232fb4059f69c to your computer and use it in GitHub Desktop.

Revisions

  1. matzeeable revised this gist May 2, 2022. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion index.js
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,6 @@ function restoreNativeFunctionFromPolyfillOverride(callback) {
    var e = d.createElement("iframe");
    e.style.display = "none";
    dE.appendChild(e);
    //window.Array.from = e.contentWindow.Array.from;
    callback(window, e.contentWindow);
    dE.removeChild(e);
    }
  2. matzeeable created this gist May 2, 2022.
    14 changes: 14 additions & 0 deletions index.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    function restoreNativeFunctionFromPolyfillOverride(callback) {
    var d = document;
    var dE = d.documentElement;
    var e = d.createElement("iframe");
    e.style.display = "none";
    dE.appendChild(e);
    //window.Array.from = e.contentWindow.Array.from;
    callback(window, e.contentWindow);
    dE.removeChild(e);
    }

    restoreNativeFunctionFromPolyfillOverride(function(w, c) {
    w.Array.from = c.Array.from;
    });