1 Reply Latest reply on Nov 8, 2011 6:36 AM by Robert Galvin

    Might there be any Modernizr samples available?

      Moderizr is often shown as a/the preferred method to determine if a feature is available from the browser engine.  www.Modernizr.com

       

      To write a multi-platform web app, it can't be focused solely on RhoElements' engine nor fail when on a device that does not support our Javascript objects.

       

      Or maybe there is a better way?  This stuff is hurting my head.

        • Re: Might there be any Modernizr samples available?
          Robert Galvin

          Carl - are you looking for a quick way to see if RhoElements is the current client? or if certain features are available? I believe that the modernizer library should be able to detect the HTML5 aspects, but have not tried this myself. For a quick way to check for RhoElements is to look at the UserAgent:

           

          if((navigator.userAgent.match(new RegExp('MotorolaWebKit'))))  // RHoElements
          

           

          The UserAgent string can also be tweak (if neccessary) in the config.xml

           <UserAgent  value="Mozilla/5.0 (%p) AppleWebKit/%w (KHTML, like Gecko) MotorolaWebKit/%e Safari/%w" />