Class Runtime
Defined in: runtime.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Runtime()
Abstraction of the runtime environment.
|
Method Attributes | Method Name and Description |
---|---|
assert(condition, message, callback)
|
|
byteArrayFromString(string, encoding)
|
|
byteArrayToString(bytearray, encoding)
|
|
<static> |
Runtime.byteArrayToString(bytearray, encoding)
|
cancelAnimationFrame(requestId)
|
|
clearTimeout(timeoutID)
|
|
<static> |
Runtime.create()
|
deleteFile(path, callback)
|
|
exit(exitCode)
|
|
<static> |
Runtime.fromJson(jsonstr)
|
fromJson(jsonstr)
|
|
getFileSize(path, callback)
|
|
<static> |
Runtime.getFunctionName(f)
|
getVariable(name)
|
|
<static> |
Runtime.getVariable(name)
|
isFile(path, callback)
|
|
loadXML(path, callback)
|
|
log(msgOrCategory, msg)
|
|
parseXML(xml)
|
|
read(path, offset, length, callback)
Read part of a binary file.
|
|
readFile(path, encoding, callback)
Read the contents of a file.
|
|
readFileSync(path, encoding)
Read a file completely, throw an exception if there is a problem.
|
|
requestAnimationFrame(callback)
|
|
setCurrentDirectory(dir)
|
|
setTimeout(callback, milliseconds)
|
|
<static> |
Runtime.toJson(anything)
|
toJson(anything)
|
|
type()
|
|
writeFile(path, data, callback)
|
Method Detail
{undefined}
assert(condition, message, callback)
- Parameters:
- {!boolean} condition
- {!string} message
- {!function():undefined=} callback
- Returns:
- {undefined}
{!Uint8Array}
byteArrayFromString(string, encoding)
- Parameters:
- {!string} string
- {!string} encoding
- Returns:
- {!Uint8Array}
{!string}
byteArrayToString(bytearray, encoding)
- Parameters:
- {!Uint8Array} bytearray
- {!string} encoding
- Returns:
- {!string}
<static>
{!string}
Runtime.byteArrayToString(bytearray, encoding)
- Parameters:
- {!Uint8Array} bytearray
- {!string} encoding
- Returns:
- {!string}
{undefined}
cancelAnimationFrame(requestId)
- Parameters:
- {!number} requestId
- Returns:
- {undefined}
{undefined}
clearTimeout(timeoutID)
- Parameters:
- {!number} timeoutID
- Returns:
- {undefined}
<static>
{!Runtime}
Runtime.create()
- Returns:
- {!Runtime}
{!string}
currentDirectory()
- Returns:
- {!string}
{undefined}
deleteFile(path, callback)
- Parameters:
- {!string} path
- {!function(?string):undefined} callback
- Returns:
- {undefined}
exit(exitCode)
- Parameters:
- {!number} exitCode
<static>
{*}
Runtime.fromJson(jsonstr)
- Parameters:
- {!string} jsonstr
- Returns:
- {*}
{*}
fromJson(jsonstr)
- Parameters:
- {!string} jsonstr
- Returns:
- {*}
{?DOMImplementation}
getDOMImplementation()
- Returns:
- {?DOMImplementation}
{undefined}
getFileSize(path, callback)
- Parameters:
- {!string} path
- {!function(number):undefined} callback
- Returns:
- {undefined}
<static>
{?string}
Runtime.getFunctionName(f)
- Parameters:
- {!Function} f
- Returns:
- {?string}
{*}
getVariable(name)
- Parameters:
- {!string} name
- Returns:
- {*}
<static>
{*}
Runtime.getVariable(name)
- Parameters:
- {!string} name
- Returns:
- {*}
{?Window}
getWindow()
- Returns:
- {?Window}
{undefined}
isFile(path, callback)
- Parameters:
- {!string} path
- {!function(boolean):undefined} callback
- Returns:
- {undefined}
{!Array.}
libraryPaths()
- Returns:
- {!Array.
}
{undefined}
loadXML(path, callback)
- Parameters:
- {!string} path
- {!function(?string|?Document):undefined} callback
- Returns:
- {undefined}
{undefined}
log(msgOrCategory, msg)
- Parameters:
- {!string} msgOrCategory
- {!string=} msg
- Returns:
- {undefined}
{?Document}
parseXML(xml)
- Parameters:
- {!string} xml
- Returns:
- {?Document}
{undefined}
read(path, offset, length, callback)
Read part of a binary file.
- Parameters:
- {!string} path
- {!number} offset
- {!number} length
- {!function(?string|?Uint8Array):undefined} callback
- Returns:
- {undefined}
{undefined}
readFile(path, encoding, callback)
Read the contents of a file. Returns the result via a callback. If the
encoding is 'binary', the result is returned as a Uint8Array,
otherwise, it is returned as a string.
- Parameters:
- {!string} path
- {!string} encoding
- text encoding or 'binary'
- {!function(?string|?(string|Uint8Array)):undefined} callback
- Returns:
- {undefined}
{!string|!Uint8Array}
readFileSync(path, encoding)
Read a file completely, throw an exception if there is a problem.
- Parameters:
- {!string} path
- {!string} encoding
- text encoding or 'binary'
- Returns:
- {!string|!Uint8Array}
{!number}
requestAnimationFrame(callback)
- Parameters:
- {!function():undefined} callback
- Returns:
- {!number}
{undefined}
setCurrentDirectory(dir)
- Parameters:
- {!string} dir
- Returns:
- {undefined}
{!number}
setTimeout(callback, milliseconds)
- Parameters:
- {!function():undefined} callback
- {!number} milliseconds
- Returns:
- {!number}
<static>
{!string}
Runtime.toJson(anything)
- Parameters:
- {*} anything
- Returns:
- {!string}
{!string}
toJson(anything)
- Parameters:
- {*} anything
- Returns:
- {!string}
{string}
type()
- Returns:
- {string}
{undefined}
writeFile(path, data, callback)
- Parameters:
- {!string} path
- {!Uint8Array} data
- {!function(?string):undefined} callback
- Returns:
- {undefined}