document window.webxdc.selfName()

This commit is contained in:
B. Petersen
2022-01-04 12:30:57 +01:00
committed by bjoern
parent 59658f2b0b
commit 5a77df7cc5

View File

@@ -66,6 +66,7 @@ and also incorporate updates that may have arrived while the app was not running
eg. `[{payload: "foo"},{payload: "bar"}]`
if `webxdc.sendUpdate("foo"); webxdc.sendUpdate("bar");` was called on the last run.
### selfAddr()
```
@@ -78,6 +79,17 @@ just send the address along with the payload,
and, if needed, compare the payload addresses against selfAddr() later on.
### selfName()
```
addr = window.webxdc.selfName()
```
Returns the peer's own name.
This is name chosen by the user in their settings,
if there is nothing set, that defaults to the peer's address.
## Webxdc Example
The following example shows an input field and every input is show on all peers.