diff --git a/docs/grove_lcd.md b/docs/grove_lcd.md index ed7c611f6..4c865ab73 100644 --- a/docs/grove_lcd.md +++ b/docs/grove_lcd.md @@ -15,7 +15,6 @@ ZJS API for Grove LCD * [groveLCDDevice.getFunction()](#grovelcddevicegetfunction) * [groveLCDDevice.setDisplayState(config)](#grovelcddevicesetdisplaystateconfig) * [GroveLCDDevice.getDisplayState()](#grovelcddevicegetdisplaystate) - * [Sample Apps](#sample-apps) Introduction diff --git a/docs/web-socket.md b/docs/web-socket.md index 806a7d908..479f29be5 100644 --- a/docs/web-socket.md +++ b/docs/web-socket.md @@ -36,7 +36,7 @@ explaining [ZJS WebIDL conventions](Notes_on_WebIDL.md). // var ws = require('ws'); [ReturnFromRequire] interface WebSocket { - WebSocketServer Server(object options); + WebSocketServer Server(OptionsObject options); };
[ExternalInterface=(EventEmitter)] interface WebSocketServer: EventEmitter{};
[ExternalInterface=(Buffer),] @@ -44,7 +44,14 @@ interface WebSocketConnection: EventEmitter { void send(Buffer data, boolean mask); void ping(Buffer data, boolean mask); void pong(Buffer data, boolean mask); -}; +};
dictionary OptionsObject {
+ double port; // Port to bind to
+ boolean backlog; // Max number of concurrent connections
+ boolean clientTracking; // enable client tracking
+ double maxPayload; // set the max payload bytes per message
+ string acceptHandler; // handler to call to accept/deny connections
+};
+
WebSocket API
diff --git a/docs/webusb.md b/docs/webusb.md
index e285e26f7..6a74fc947 100644
--- a/docs/webusb.md
+++ b/docs/webusb.md
@@ -2,8 +2,10 @@ Zephyr.js API for WebUSB
========================
* [Introduction](#introduction)
-* [Class: WebUSB](#class-webusb)
-* [API Documentation](#api-documentation)
+* [Class: WebUSB](#webusb-api)
+ * [webusb.setURL(url)](#webusbseturlurl)
+ * [webusb.write(buffer)](#webusbwritebuffer)
+ * [Event: 'read'](#event-read)
* [Sample Apps](#sample-apps)
Introduction
@@ -19,8 +21,33 @@ When you connect your device to a Linux PC or Mac with Chrome >= 60 running, it
will give a notification that the device would like you to visit the URL you've
set. (Windows currently prevents this from working, I believe.)
-API Documentation
------------------
+Web IDL
+-------
+This IDL provides an overview of the interface; see below for documentation of
+specific API functions. We also have a short document explaining [ZJS WebIDL conventions](Notes_on_WebIDL.md).
+ [ReturnFromRequire, ExternalInterface=(Buffer)]
+interface webusb {
+ void setURL(string url);
+ void write(Buffer buf);
+};
+ Click to show/hide WebIDL
+
+// require returns a webusb object
+// var webusb = require('webusb');
+