Translations:Manual:Ajax/2/en

Therefore, JavaScript code should instead use (or the $resloader javascript module). One would perform a MediaWiki API query over AJAX (instead of $ajax).