I don't think you can tell if it's in a browser or not.
You can check for version: xfa.host.version; And type: xfa.host.appType;
I just tested appType and it only seems to return Exchange-pro for Acrobat or Reader for Reader whether it's in a browser or not.