Nunu Class
nunuStudio core main file.
Store development version, timestamp and contains global method to check browser feature support.
Item Index
Methods
Methods
copyNamespace
()
static
Import stuff from a namespace to another target namespace.
If not target is specified window is used.
createWorker
-
code
-
onMessage
Create a web worker from code written in a string.
Uses a blob to inject the code and loads it from and URL object.
Parameters:
-
code
StringJavascript code for this worker.
-
onMessage
FunctionOn message worker callback.
Returns:
Returns a worker instance (for comunication).
getPlatform
()
Number
Check in wich platform the enviroment is running.
Possible return values are:
- Nunu.NWJS
- Nunu.BROWSER
- Nunu.CORDOVA
Returns:
Indicates the platform type.
getQueryParameters
()
Object
Get the query parameter from the browser URL.
Returns:
Object with parameters read from the URL.
isFullscreen
()
Boolean
Check if there is some element on fullscreen mode.
Returns true even the fullscreen element is not related with the app.
Returns:
True if there is some element in fullscreen mode.
openWebpage
()
Open a webpage on a new window.
On desktop and mobile it will open the default browser.
On the web it will open as a popup.
runningOnDesktop
()
Boolean
Check if app is running inside NWJS.
Returns:
True if running inside NWJS
setFullscreen
-
fullscreen
-
element
Set an element into fullscreen mode or exit out of fullscreen mode.
Uses isFullscreen to check if the application is running in fullscreen mode already.
Parameters:
-
fullscreen
BooleanIf true the application will enter fullscreen mode, if false it will exit, if undefine it will toggle the value.
-
element
ComponentDOM element to put into fullscreen.
webAudioAvailable
()
Boolean
Check if host supports WebAudio.
Returns:
True if WebAudio is available.
webglAvailable
()
Boolean
Check if host supports WebGL, only checks for WebGL 1.0 support.
Returns:
True if WebGL is available.
Attributes
DEVELOPMENT
Boolean
static
Indicates if the application/library is being used in development mode.
Can be usefull to restrict development functionality when building to production.