The “fm” API output formats, jsonfm (default), xmlfm, phpfm and rawfm, apparently include the wiki’s common.js and common.css; for instance, aswiki API output has some social media buttons:
(Adding debug=true also enables ResourceLoader debug mode.) This seems highly unexpected and not very beneficial – most site JS/CSS is probably not prepared for this unusual environment, and will produce random errors, like this one on aswiki:
Uncaught TypeError: mw.user.isAnon is not a function
Let’s get rid of this?