Last active
March 1, 2017 00:01
-
-
Save markknol/824743c67585ebc18005c30550bb5de9 to your computer and use it in GitHub Desktop.
Haxe type definitions for isMobile checks https://github.com/kaimallea/isMobile
This file contains 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
/** | |
* Type definitions for <https://github.com/kaimallea/isMobile> | |
* Don't forget to add the actual script in the head of the html. | |
* | |
* @author Mark Knol | |
*/ | |
@:native("isMobile") | |
extern class IsMobile | |
{ | |
public static var apple(default,null):{phone:Bool, ipod:Bool, tablet:Bool, device:Bool}; | |
public static var android(default,null):{phone:Bool, tablet:Bool, device:Bool}; | |
public static var amazon(default,null):{phone:Bool, tablet:Bool, device:Bool}; | |
public static var windows(default,null):{phone:Bool, tablet:Bool, device:Bool}; | |
public static var seven_inch(default,null):Bool; | |
public static var any(default,null):Bool; | |
public static var phone(default,null):Bool; | |
public static var tablet(default,null):Bool; | |
public static var other(default,null):{blackberry_10:Bool, blackberry:Bool, opera:Bool, firefox:Bool, chrome:Bool, device:Bool}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
really no need to write
public
for extern definitions :)