Use reference style links in API docs
Makes everything a bit more readable.
This commit is contained in:
parent
e16b3b8620
commit
ceadcd6e83
50
docs/API.md
50
docs/API.md
|
@ -17,10 +17,12 @@ protocol stream.
|
||||||
### Properties
|
### Properties
|
||||||
|
|
||||||
`background`
|
`background`
|
||||||
- Is a valid CSS [background](https://developer.mozilla.org/en-US/docs/Web/CSS/background)
|
- Is a valid CSS [background][mdn-bg] style value indicating which
|
||||||
style value indicating which background style should be applied
|
background style should be applied to the element containing the
|
||||||
to the element containing the remote session screen. The default value is `rgb(40, 40, 40)`
|
remote session screen. The default value is `rgb(40, 40, 40)` (solid
|
||||||
(solid gray color).
|
gray color).
|
||||||
|
|
||||||
|
[mdn-bg]: https://developer.mozilla.org/en-US/docs/Web/CSS/background
|
||||||
|
|
||||||
`capabilities` *Read only*
|
`capabilities` *Read only*
|
||||||
- Is an `Object` indicating which optional extensions are available
|
- Is an `Object` indicating which optional extensions are available
|
||||||
|
@ -187,10 +189,12 @@ connection to a specified VNC server.
|
||||||
###### Parameters
|
###### Parameters
|
||||||
|
|
||||||
**`target`**
|
**`target`**
|
||||||
- A block [`HTMLElement`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement)
|
- A block [`HTMLElement`][mdn-elem] that specifies where the `RFB`
|
||||||
that specifies where the `RFB` object should attach itself. The
|
object should attach itself. The existing contents of the
|
||||||
existing contents of the `HTMLElement` will be untouched, but new
|
`HTMLElement` will be untouched, but new elements will be added
|
||||||
elements will be added during the lifetime of the `RFB` object.
|
during the lifetime of the `RFB` object.
|
||||||
|
|
||||||
|
[mdn-elem]: https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement
|
||||||
|
|
||||||
**`urlOrDataChannel`**
|
**`urlOrDataChannel`**
|
||||||
- A `DOMString` specifying the VNC server to connect to. This must be
|
- A `DOMString` specifying the VNC server to connect to. This must be
|
||||||
|
@ -286,8 +290,7 @@ property is an `Object` containing the following properties:
|
||||||
| `status` | `long` | The failure status code
|
| `status` | `long` | The failure status code
|
||||||
| `reason` | `DOMString` | The **optional** reason for the failure
|
| `reason` | `DOMString` | The **optional** reason for the failure
|
||||||
|
|
||||||
The property `status` corresponds to the
|
The property `status` corresponds to the [SecurityResult][rfb-secresult]
|
||||||
[SecurityResult](https://github.com/rfbproto/rfbproto/blob/master/rfbproto.rst#securityresult)
|
|
||||||
status code in cases of failure. A status of zero will not be sent in
|
status code in cases of failure. A status of zero will not be sent in
|
||||||
this event since that indicates a successful security handshaking
|
this event since that indicates a successful security handshaking
|
||||||
process. The optional property `reason` is provided by the server and
|
process. The optional property `reason` is provided by the server and
|
||||||
|
@ -295,6 +298,8 @@ thus the language of the string is not known. However most servers will
|
||||||
probably send English strings. The server can choose to not send a
|
probably send English strings. The server can choose to not send a
|
||||||
reason and in these cases the `reason` property will be omitted.
|
reason and in these cases the `reason` property will be omitted.
|
||||||
|
|
||||||
|
[rfb-secresult]: https://github.com/rfbproto/rfbproto/blob/master/rfbproto.rst#securityresult
|
||||||
|
|
||||||
#### serververification
|
#### serververification
|
||||||
|
|
||||||
The `serververification` event is fired when the server provides
|
The `serververification` event is fired when the server provides
|
||||||
|
@ -365,13 +370,17 @@ Keyboard events will be sent to the remote server after this point.
|
||||||
|
|
||||||
**`options`** *Optional*
|
**`options`** *Optional*
|
||||||
- A `object` providing options to control how the focus will be
|
- A `object` providing options to control how the focus will be
|
||||||
performed. Please see [`HTMLElement.focus()`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus)
|
performed. Please see [`HTMLElement.focus()`][mdn-focus] for
|
||||||
for available options.
|
available options.
|
||||||
|
|
||||||
|
[mdn-focus]: https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus
|
||||||
|
|
||||||
#### RFB.getImageData()
|
#### RFB.getImageData()
|
||||||
|
|
||||||
The `RFB.getImageData()` method is used to return the current content of the
|
The `RFB.getImageData()` method is used to return the current content of
|
||||||
screen encoded as [`ImageData`](https://developer.mozilla.org/en-US/docs/Web/API/ImageData).
|
the screen encoded as [`ImageData`][mdn-imagedata].
|
||||||
|
|
||||||
|
[mdn-imagedata]: https://developer.mozilla.org/en-US/docs/Web/API/ImageData
|
||||||
|
|
||||||
##### Syntax
|
##### Syntax
|
||||||
|
|
||||||
|
@ -448,11 +457,12 @@ The `RFB.sendKey()` method is used to send a key event to the server.
|
||||||
|
|
||||||
**`code`**
|
**`code`**
|
||||||
- A `DOMString` specifying the physical key to send. Valid values are
|
- A `DOMString` specifying the physical key to send. Valid values are
|
||||||
those that can be specified to
|
those that can be specified to [`KeyboardEvent.code`][mdn-keycode].
|
||||||
[`KeyboardEvent.code`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code).
|
|
||||||
If the physical key cannot be determined then `null` shall be
|
If the physical key cannot be determined then `null` shall be
|
||||||
specified.
|
specified.
|
||||||
|
|
||||||
|
[mdn-keycode]: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code
|
||||||
|
|
||||||
**`down`** *Optional*
|
**`down`** *Optional*
|
||||||
- A `boolean` specifying if a press or a release event should be
|
- A `boolean` specifying if a press or a release event should be
|
||||||
sent. If omitted then both a press and release event are sent.
|
sent. If omitted then both a press and release event are sent.
|
||||||
|
@ -460,7 +470,9 @@ The `RFB.sendKey()` method is used to send a key event to the server.
|
||||||
#### RFB.toBlob()
|
#### RFB.toBlob()
|
||||||
|
|
||||||
The `RFB.toBlob()` method is used to return the current content of the
|
The `RFB.toBlob()` method is used to return the current content of the
|
||||||
screen encoded as [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob).
|
screen encoded as [`Blob`][mdn-blob].
|
||||||
|
|
||||||
|
[mdn-blob]: https://developer.mozilla.org/en-US/docs/Web/API/Blob
|
||||||
|
|
||||||
##### Syntax
|
##### Syntax
|
||||||
|
|
||||||
|
@ -471,8 +483,8 @@ screen encoded as [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob
|
||||||
###### Parameters
|
###### Parameters
|
||||||
|
|
||||||
**`callback`**
|
**`callback`**
|
||||||
- A callback function which will receive the resulting [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob)
|
- A callback function which will receive the resulting
|
||||||
as the single argument
|
[`Blob`][mdn-blob] as the single argument
|
||||||
|
|
||||||
**`type`** *Optional*
|
**`type`** *Optional*
|
||||||
- A string indicating the requested MIME type of the image
|
- A string indicating the requested MIME type of the image
|
||||||
|
|
Loading…
Reference in New Issue