Class Index | File Index

Classes


Class JSLINT-BrowserRuntime


Extends Runtime.

Defined in: runtime.js.

Class Summary
Constructor Attributes Constructor Name and Description
<inner>  
Field Summary
Field Attributes Field Name and Description
 
 
 
Method Summary
Method Attributes Method Name and Description
<inner>  
<inner>  
 
byteArrayFromString(string, encoding)
 
 
clearTimeout(timeoutID)
<inner>  
createXHR(path, encoding, async)
 
<inner>  
deleteFile(path, callback)
 
exit(exitCode)
<inner>  
Return the number of bytes a string would take up when encoded as utf-8.
 
<inner>  
handleXHRResult(path, encoding, xhr)
 
<inner>  
loadXML(path, callback)
<inner>  
log(msgOrCategory, msg)
 
parseXML(xml)
<inner>  
read(path, offset, length, callback)
<inner>  
readFile(path, encoding, callback)
Read the contents of a file.
<inner>  
readFileSync(path, encoding)
 
 
setTimeout(f, msec)
<inner>  
Convert the text received by XHR to a byte array.
<inner>  
utf8ByteArrayFromString(string, length, addBOM)
Convert UCS-2 string to UTF-8 array.
<inner>  
utf8ByteArrayFromXHRString(string, wishLength)
Convert UCS-2 string to UTF-8 array.
<inner>  
writeFile(path, data, callback)
Class Detail
<inner> JSLINT-BrowserRuntime()
Field Detail
{*} fromJson

{*} getVariable

{!string} toJson
Method Detail
<inner> {!Uint8Array} arrayToUint8Array(buffer)
Parameters:
{!Array.} buffer
Returns:
{!Uint8Array}

<inner> {!Uint8Array} byteArrayFromString(string)
Parameters:
{!string} string
Returns:
{!Uint8Array}

{!Uint8Array} byteArrayFromString(string, encoding)
Parameters:
{!string} string
{!string} encoding
Returns:
{!Uint8Array}

{undefined} cancelAnimationFrame(requestId)
Parameters:
{!number} requestId
Returns:
{undefined}

{undefined} clearTimeout(timeoutID)
Parameters:
{!number} timeoutID
Returns:
{undefined}

<inner> {!XMLHttpRequest} createXHR(path, encoding, async)
Parameters:
{!string} path
{!string} encoding
{!boolean} async
Returns:
{!XMLHttpRequest}

{!string} currentDirectory()
Returns:
{!string}

<inner> {undefined} deleteFile(path, callback)
Parameters:
{!string} path
{!function(?string):undefined} callback
Returns:
{undefined}

exit(exitCode)
Parameters:
{!number} exitCode

<inner> {number} getUtf8LengthForString(string)
Return the number of bytes a string would take up when encoded as utf-8.
Parameters:
{string} string
Returns:
{number}

{!Window} getWindow()
Returns:
{!Window}

<inner> {!{err:?string|data:(?string|?Uint8Array)}} handleXHRResult(path, encoding, xhr)
Parameters:
{!string} path
{!string} encoding
{!XMLHttpRequest} xhr
Returns:
{!{err:?string|data:(?string|?Uint8Array)}}

{!Array.} libraryPaths()
Returns:
{!Array.}

<inner> {undefined} loadXML(path, callback)
Parameters:
{!string} path
{!function(?string|?Document):undefined} callback
Returns:
{undefined}

<inner> {undefined} log(msgOrCategory, msg)
Parameters:
{!string} msgOrCategory
{string=} msg
Returns:
{undefined}

{?Document} parseXML(xml)
Parameters:
{!string} xml
Returns:
{?Document}

<inner> {undefined} read(path, offset, length, callback)
Parameters:
{!string} path
{!number} offset
{!number} length
{!function(?string|?Uint8Array):undefined} callback
Returns:
{undefined}

<inner> {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}

<inner> {!string|!Uint8Array} readFileSync(path, encoding)
Parameters:
{!string} path
{!string} encoding
text encoding or 'binary'
Returns:
{!string|!Uint8Array}

{!number} requestAnimationFrame(callback)
Parameters:
{!function():undefined} callback
Returns:
{!number}

{!number} setTimeout(f, msec)
Parameters:
{!function():undefined} f
{!number} msec
Returns:
{!number}

<inner> {!Uint8Array} stringToBinaryWorkaround(xhr)
Convert the text received by XHR to a byte array. An XHR request can send a text as a response even though binary content was requested. This text string should be converted to a byte array. If the length of the text is equal to the reported length of the content then each character becomes one byte. If the length is different, which can happen on WebKit and Blink browsers, the string should be converted while taking into account the encoding. Currently, only utf8 is supported for this procedure.
Parameters:
{!XMLHttpRequest} xhr
Returns:
{!Uint8Array}

<inner> {!Uint8Array} utf8ByteArrayFromString(string, length, addBOM)
Convert UCS-2 string to UTF-8 array.
Parameters:
{string} string
{number} length
the length of the resulting array
{boolean} addBOM
whether or not to start with a BOM
Returns:
{!Uint8Array}

<inner> {!Uint8Array|undefined} utf8ByteArrayFromXHRString(string, wishLength)
Convert UCS-2 string to UTF-8 array. wishLength is the desired length, if it is 3 bytes longer than forsee by the string data, a BOM is prepended.
Parameters:
{string} string
{(number|string)=} wishLength
Returns:
{!Uint8Array|undefined}

<inner> {undefined} writeFile(path, data, callback)
Parameters:
{!string} path
{!Uint8Array} data
{!function(?string):undefined} callback
Returns:
{undefined}

Documentation generated by JsDoc Toolkit 2.4.0 on Thu Aug 06 2015 04:10:40 GMT+0200 (MESZ)