@@ -56,13 +56,14 @@ JSFunction fnLog = js_register_function(
5656js_invoke_function_2 (fnLog, "Hello World!");
5757```
5858
59- In your JS function ` context` is passed in to handle most issues you'll encounter
59+ In your JS function context `this` several functions handle most issues you'll encounter
6060
61- * `context.readUtf8FromMemory(start,length)` - Extract utf-8 text from your program's memory.
62- * `context.writeUtf8ToMemory(start,str)` - Write utf-8 to a memory location you are sure it should go.
63- * `context.readCStringFromMemory(start,length)` - Extract C string text from your program's memory.
64- * `context.writeCStringToMemory(start,str)` - Write C string to a memory location you are sure it should go.
65- * `context.storeObject(object)` - Store an object in your context for later reference, get a handle you can give to WebAssembly.
66- * `context.getObject(handle)` - Retreive and object from your context with a handle.
67- * `context.releaseObject(handle)` - Release a stored object so it's memory can be freed.
68- * `context.module` - Get access to your program so you can call methods on it.
61+ * `readUtf8FromMemory(start,length)` - Extract utf-8 text from your program's memory.
62+ * `writeUtf8ToMemory(start,str)` - Write utf-8 to a memory location you are sure it should go.
63+ * `readCStringFromMemory(start,length)` - Extract C string text from your program's memory.
64+ * `writeCStringToMemory(start,str)` - Write C string to a memory location you are sure it should go.
65+ * `readUint8ArrayFromMemory` - Read a list of uint8 from a pointer to a location of a number of elements, followed by a pointer to bytes in memory.
66+ * `storeObject(object)` - Store an object in your context for later reference, get a handle you can give to WebAssembly.
67+ * `getObject(handle)` - Retreive and object from your context with a handle.
68+ * `releaseObject(handle)` - Release a stored object so it's memory can be freed.
69+ * `module` - Get access to your program so you can call methods on it.
0 commit comments