Created
January 28, 2013 18:50
-
-
Save triceam/4658021 to your computer and use it in GitHub Desktop.
Detecting PhoneGap/Ripple emulator via JavaScript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
myFunction( param ) { | |
var emulated = window.tinyHippos != undefined; | |
if ( emulated ){ | |
//do something specific to emulated environment; | |
return; | |
} | |
///do something else... | |
} |
I think the following code could be used as well
var emulated = window.parent && window.parent.ripple;
thanks it works fine :) sgrebnov
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I used this for older versions: