How can I tell if the application is running in a Browser?

Anywhere in a H5 enable application you can use
WebServer.IsEnabled()
It will return TRUE is it is running on the Web Browser, otherwise return FALSE