Skip to content

Commit

Permalink
Use JavaScript highlighting for Synax sections
Browse files Browse the repository at this point in the history
Follows what MDN does, and makes things a bit easier to read.
  • Loading branch information
CendioOssman committed Dec 27, 2022
1 parent 934e3de commit 367bfd2
Showing 1 changed file with 52 additions and 22 deletions.
74 changes: 52 additions & 22 deletions docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,10 @@ connection to a specified VNC server.

##### Syntax

new RFB( target, urlOrChannel );
new RFB( target, urlOrChannel, options );
```js
new RFB(target, urlOrChannel);
new RFB(target, urlOrChannel, options);
```

###### Parameters

Expand Down Expand Up @@ -323,7 +325,9 @@ and that the connection can continue.

##### Syntax

RFB.approveServer( );
```js
RFB.approveServer();
```

#### RFB.blur()

Expand All @@ -333,7 +337,9 @@ point.

##### Syntax

RFB.blur( );
```js
RFB.blur();
```

#### RFB.clipboardPasteFrom()

Expand All @@ -342,7 +348,9 @@ to the remote server.

##### Syntax

RFB.clipboardPasteFrom( text );
```js
RFB.clipboardPasteFrom(text);
```

###### Parameters

Expand All @@ -356,7 +364,9 @@ connected server.

##### Syntax

RFB.disconnect( );
```js
RFB.disconnect();
```

#### RFB.focus()

Expand All @@ -365,8 +375,10 @@ Keyboard events will be sent to the remote server after this point.

##### Syntax

RFB.focus( );
RFB.focus( options );
```js
RFB.focus();
RFB.focus(options);
```

###### Parameters

Expand All @@ -386,7 +398,9 @@ the screen encoded as [`ImageData`][mdn-imagedata].

##### Syntax

RFB.getImageData( );
```js
RFB.getImageData();
```

#### RFB.machineReboot()

Expand All @@ -396,7 +410,9 @@ to have any effect.

##### Syntax

RFB.machineReboot( );
```js
RFB.machineReboot();
```

#### RFB.machineReset()

Expand All @@ -406,7 +422,9 @@ to have any effect.

##### Syntax

RFB.machineReset( );
```js
RFB.machineReset();
```

#### RFB.machineShutdown()

Expand All @@ -416,7 +434,9 @@ have any effect.

##### Syntax

RFB.machineShutdown( );
```js
RFB.machineShutdown();
```

#### RFB.sendCredentials()

Expand All @@ -425,7 +445,9 @@ credentials after a `credentialsrequired` event has been fired.

##### Syntax

RFB.sendCredentials( credentials );
```js
RFB.sendCredentials(credentials);
```

###### Parameters

Expand All @@ -441,16 +463,20 @@ around [`RFB.sendKey()`](#rfbsendkey).

##### Syntax

RFB.sendCtrlAltDel( );
```js
RFB.sendCtrlAltDel();
```

#### RFB.sendKey()

The `RFB.sendKey()` method is used to send a key event to the server.

##### Syntax

RFB.sendKey( keysym, code );
RFB.sendKey( keysym, code, down );
```js
RFB.sendKey(keysym, code);
RFB.sendKey(keysym, code, down);
```

###### Parameters

Expand Down Expand Up @@ -479,9 +505,11 @@ screen encoded as [`Blob`][mdn-blob].

##### Syntax

RFB.toBlob( callback );
RFB.toBlob( callback, type );
RFB.toBlob( callback, type, quality );
```js
RFB.toBlob(callback);
RFB.toBlob(callback, type);
RFB.toBlob(callback, type, quality);
```

###### Parameters

Expand All @@ -503,9 +531,11 @@ of an `img` tag.

##### Syntax

RFB.toDataURL( );
RFB.toDataURL( type );
RFB.toDataURL( type, encoderOptions );
```js
RFB.toDataURL();
RFB.toDataURL(type);
RFB.toDataURL(type, encoderOptions);
```

###### Parameters

Expand Down

0 comments on commit 367bfd2

Please sign in to comment.