0

Let's say I want to call fetch but I want to be sure it's the native one provided by the browser. Is it possible to determine that somehow? If it's been replaced for example:

window.fetch = function() { alert('not real'); }

Can I access the "real" one via the Window prototype? If so, is the prototype mutable?

10101
  • 320
  • 2
  • 7
  • 1
    Some properties are immutable, some (like `fetch`) are not. If you want to make sure that nothing has replaced the value, don't run scripts in your page that you don't control. – Bergi Jun 23 '21 at 19:55
  • Note that there are always ways to find the original methods (e.g through an iframe). – Kaiido Jun 23 '21 at 22:45
  • Does this answer your question? https://stackoverflow.com/a/6599105/14596856 – Vitalii Jun 23 '21 at 23:44

0 Answers0