new ParentAPI(methods, properties)
Initialize a listening instance and set available methods.
Parameters:
Name | Type | Description |
---|---|---|
methods |
object |
Functions that are available for the parent to call. |
properties |
object |
Properties to memorize in the instance for later use, optional |
Properties:
Name | Type | Description |
---|---|---|
listener |
promise |
Promise that is waiting for parent to connect |
msg_bus |
object |
Postmate instance |
methods |
object |
Method storage |
properties |
object |
Set properties storage |
Methods
(async) connect() → {this}
Wait for parent to connect.