jpillora / xdomain

A pure JavaScript CORS alternative
https://jpillora.com/xdomain/
3.13k stars 269 forks source link

IE9: error access is denied #182

Closed kirly-af closed 8 years ago

kirly-af commented 8 years ago

Hi

I have a problem when setting xdomain through the API. This produces an error in IE9:

Error: Access is denied

<body>
  <script src="//cdn.rawgit.com/jpillora/xdomain/0.7.3/dist/xdomain.min.js"></script>
  <script>
    if (window.XDomainRequest)
    {
      console.log('using XDomainRequest');
      window.xdomain.debug = true;
      window.xdomain.slaves = {
        'https://mymiddleware.com': '/proxy.html'
      };
    }
  </script>
  <script src="vendor.js"></script>
  <script src="app.js"></script>
</body>

This works totally fine:

  <script src="//cdn.rawgit.com/jpillora/xdomain/0.7.3/dist/xdomain.min.js"
  slave="https://mymiddleware.com/proxy.html"></script>

It is a big issue for me because I really need to add another slave.

kirly-af commented 8 years ago

I just realized xdomain.slaves is actually a method.

I am going to fix that and see if it works.

kirly-af commented 8 years ago

So actually it works fine. Closing the issue.