mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-11-09 22:09:06 -05:00
Update 07.md
Implemented review inputs
This commit is contained in:
parent
b8f2e14e6d
commit
9bf8bb0054
4
07.md
4
07.md
|
@ -22,8 +22,8 @@ async window.nostr.nip04.encrypt(pubkey, plaintext): string // returns ciphertex
|
|||
async window.nostr.nip04.decrypt(pubkey, ciphertext): string // takes ciphertext and iv as specified in nip-04
|
||||
```
|
||||
|
||||
### User experience recommendation
|
||||
Due to the way browsers load the extensions, it may take some time for `window.nostr` object will be fully ready to accept requests. Hence, it is a good idea to run the first `window.nostr` interaction on a user action on the web page (like a button click), and not during the page load.
|
||||
### Recommendation to Implementers
|
||||
When `window.nostr` is injected by a browser extension, it may not be fully available until a certain point in the page's lifecycle. Hence, it is a good idea to invoke the first `window.nostr` based functionality after a user-action on the web page (like a button click), and not during the page load.
|
||||
|
||||
Calling the `window.nostr` based methods during the page load runs the risk of intermittent issues due to race conditions between the client page's script and the extension's script
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user