Checking for inBrowser in descartes methods in controller