Polyfill means it actually implements the feature

I don't see you handling CORS headers anywhere in this code. This is just an alternative, not a polyfill. For example, this is CORS polyfill I wrote 5 years ago: https://github.com/eligrey/pmxdr and https://github.com/eligrey/libxdr

Note that I follow the Access-Control-* headers.