Wikipedia viewer problem with AJAX callback function;

Hi. I’m trying to do an ajax call but my callback function wich is named handler is not called and its happening only on codepen. If I make the same request in my browser console it’s calling my handler and I get the test alert.

This is my pen ->

1 Like

I’m not sure what’s happening, but you’ll certainly be better off using the fetch API instead of that XHR stuff, which is on the way out. Fetch support is getting pretty good, but you’ll need the polyfill. I’m not sure why CodePen is having this problem, though.