From 934e3de356988bf8676c1056acc3c0825051765c Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Tue, 27 Dec 2022 15:00:39 +0100 Subject: [PATCH] Follow current MDN for syntax examples The now avoid brackets for optional arguments, so let's try to have the same style. --- docs/API.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/API.md b/docs/API.md index 3e9e75cf..eed9e802 100644 --- a/docs/API.md +++ b/docs/API.md @@ -184,7 +184,8 @@ connection to a specified VNC server. ##### Syntax - let rfb = new RFB( target, urlOrChannel [, options] ); + new RFB( target, urlOrChannel ); + new RFB( target, urlOrChannel, options ); ###### Parameters @@ -364,7 +365,8 @@ Keyboard events will be sent to the remote server after this point. ##### Syntax - RFB.focus( [options] ); + RFB.focus( ); + RFB.focus( options ); ###### Parameters @@ -447,7 +449,8 @@ The `RFB.sendKey()` method is used to send a key event to the server. ##### Syntax - RFB.sendKey( keysym, code [, down] ); + RFB.sendKey( keysym, code ); + RFB.sendKey( keysym, code, down ); ###### Parameters