Use JavaScript highlighting for Synax sections
Follows what MDN does, and makes things a bit easier to read.
This commit is contained in:
parent
934e3de356
commit
367bfd2962
74
docs/API.md
74
docs/API.md
|
@ -184,8 +184,10 @@ connection to a specified VNC server.
|
||||||
|
|
||||||
##### Syntax
|
##### Syntax
|
||||||
|
|
||||||
new RFB( target, urlOrChannel );
|
```js
|
||||||
new RFB( target, urlOrChannel, options );
|
new RFB(target, urlOrChannel);
|
||||||
|
new RFB(target, urlOrChannel, options);
|
||||||
|
```
|
||||||
|
|
||||||
###### Parameters
|
###### Parameters
|
||||||
|
|
||||||
|
@ -323,7 +325,9 @@ and that the connection can continue.
|
||||||
|
|
||||||
##### Syntax
|
##### Syntax
|
||||||
|
|
||||||
RFB.approveServer( );
|
```js
|
||||||
|
RFB.approveServer();
|
||||||
|
```
|
||||||
|
|
||||||
#### RFB.blur()
|
#### RFB.blur()
|
||||||
|
|
||||||
|
@ -333,7 +337,9 @@ point.
|
||||||
|
|
||||||
##### Syntax
|
##### Syntax
|
||||||
|
|
||||||
RFB.blur( );
|
```js
|
||||||
|
RFB.blur();
|
||||||
|
```
|
||||||
|
|
||||||
#### RFB.clipboardPasteFrom()
|
#### RFB.clipboardPasteFrom()
|
||||||
|
|
||||||
|
@ -342,7 +348,9 @@ to the remote server.
|
||||||
|
|
||||||
##### Syntax
|
##### Syntax
|
||||||
|
|
||||||
RFB.clipboardPasteFrom( text );
|
```js
|
||||||
|
RFB.clipboardPasteFrom(text);
|
||||||
|
```
|
||||||
|
|
||||||
###### Parameters
|
###### Parameters
|
||||||
|
|
||||||
|
@ -356,7 +364,9 @@ connected server.
|
||||||
|
|
||||||
##### Syntax
|
##### Syntax
|
||||||
|
|
||||||
RFB.disconnect( );
|
```js
|
||||||
|
RFB.disconnect();
|
||||||
|
```
|
||||||
|
|
||||||
#### RFB.focus()
|
#### RFB.focus()
|
||||||
|
|
||||||
|
@ -365,8 +375,10 @@ Keyboard events will be sent to the remote server after this point.
|
||||||
|
|
||||||
##### Syntax
|
##### Syntax
|
||||||
|
|
||||||
RFB.focus( );
|
```js
|
||||||
RFB.focus( options );
|
RFB.focus();
|
||||||
|
RFB.focus(options);
|
||||||
|
```
|
||||||
|
|
||||||
###### Parameters
|
###### Parameters
|
||||||
|
|
||||||
|
@ -386,7 +398,9 @@ the screen encoded as [`ImageData`][mdn-imagedata].
|
||||||
|
|
||||||
##### Syntax
|
##### Syntax
|
||||||
|
|
||||||
RFB.getImageData( );
|
```js
|
||||||
|
RFB.getImageData();
|
||||||
|
```
|
||||||
|
|
||||||
#### RFB.machineReboot()
|
#### RFB.machineReboot()
|
||||||
|
|
||||||
|
@ -396,7 +410,9 @@ to have any effect.
|
||||||
|
|
||||||
##### Syntax
|
##### Syntax
|
||||||
|
|
||||||
RFB.machineReboot( );
|
```js
|
||||||
|
RFB.machineReboot();
|
||||||
|
```
|
||||||
|
|
||||||
#### RFB.machineReset()
|
#### RFB.machineReset()
|
||||||
|
|
||||||
|
@ -406,7 +422,9 @@ to have any effect.
|
||||||
|
|
||||||
##### Syntax
|
##### Syntax
|
||||||
|
|
||||||
RFB.machineReset( );
|
```js
|
||||||
|
RFB.machineReset();
|
||||||
|
```
|
||||||
|
|
||||||
#### RFB.machineShutdown()
|
#### RFB.machineShutdown()
|
||||||
|
|
||||||
|
@ -416,7 +434,9 @@ have any effect.
|
||||||
|
|
||||||
##### Syntax
|
##### Syntax
|
||||||
|
|
||||||
RFB.machineShutdown( );
|
```js
|
||||||
|
RFB.machineShutdown();
|
||||||
|
```
|
||||||
|
|
||||||
#### RFB.sendCredentials()
|
#### RFB.sendCredentials()
|
||||||
|
|
||||||
|
@ -425,7 +445,9 @@ credentials after a `credentialsrequired` event has been fired.
|
||||||
|
|
||||||
##### Syntax
|
##### Syntax
|
||||||
|
|
||||||
RFB.sendCredentials( credentials );
|
```js
|
||||||
|
RFB.sendCredentials(credentials);
|
||||||
|
```
|
||||||
|
|
||||||
###### Parameters
|
###### Parameters
|
||||||
|
|
||||||
|
@ -441,7 +463,9 @@ around [`RFB.sendKey()`](#rfbsendkey).
|
||||||
|
|
||||||
##### Syntax
|
##### Syntax
|
||||||
|
|
||||||
RFB.sendCtrlAltDel( );
|
```js
|
||||||
|
RFB.sendCtrlAltDel();
|
||||||
|
```
|
||||||
|
|
||||||
#### RFB.sendKey()
|
#### RFB.sendKey()
|
||||||
|
|
||||||
|
@ -449,8 +473,10 @@ The `RFB.sendKey()` method is used to send a key event to the server.
|
||||||
|
|
||||||
##### Syntax
|
##### Syntax
|
||||||
|
|
||||||
RFB.sendKey( keysym, code );
|
```js
|
||||||
RFB.sendKey( keysym, code, down );
|
RFB.sendKey(keysym, code);
|
||||||
|
RFB.sendKey(keysym, code, down);
|
||||||
|
```
|
||||||
|
|
||||||
###### Parameters
|
###### Parameters
|
||||||
|
|
||||||
|
@ -479,9 +505,11 @@ screen encoded as [`Blob`][mdn-blob].
|
||||||
|
|
||||||
##### Syntax
|
##### Syntax
|
||||||
|
|
||||||
RFB.toBlob( callback );
|
```js
|
||||||
RFB.toBlob( callback, type );
|
RFB.toBlob(callback);
|
||||||
RFB.toBlob( callback, type, quality );
|
RFB.toBlob(callback, type);
|
||||||
|
RFB.toBlob(callback, type, quality);
|
||||||
|
```
|
||||||
|
|
||||||
###### Parameters
|
###### Parameters
|
||||||
|
|
||||||
|
@ -503,9 +531,11 @@ of an `img` tag.
|
||||||
|
|
||||||
##### Syntax
|
##### Syntax
|
||||||
|
|
||||||
RFB.toDataURL( );
|
```js
|
||||||
RFB.toDataURL( type );
|
RFB.toDataURL();
|
||||||
RFB.toDataURL( type, encoderOptions );
|
RFB.toDataURL(type);
|
||||||
|
RFB.toDataURL(type, encoderOptions);
|
||||||
|
```
|
||||||
|
|
||||||
###### Parameters
|
###### Parameters
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue