The "Cocoon" object holds all the Cocoon Extensions and other stuff needed for the Cocoon environment.
Classes
Namespaces
- Ad
- App
- Device
- Dialog
- InApp
- Motion
- Multiplayer
- Notification
- Proxify
- Share
- Social
- Touch
- Utils
- WebView
- Widget
Methods
-
<static> getPlatform() → {Cocoon.PlatformType}
-
Returns the platform where the app is running.
Returns:
The platform where the app is running.
- Type
- Cocoon.PlatformType
Example
1
var platform = Cocoon.getPlatform();
Members
-
<static> PlatformType
-
Defines the platform where the app is running.
Properties:
Name Type Description ANDROID
string Android.
IOS
string iOS.
AMAZON
string Amazon.
WINDOWS_PHONE
string Windows phone.
BLACKBERRY
string Blackberry.
OTHER
string Other.
-
<static> version
-
Properties:
Name Type Description version
string Current version of the library.
Example
1
console.log(Cocoon.version);