upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVivek Ganesan <vivek@vivekganesan.com>2023-05-16 04:05:24 +0530
committerGitHub <noreply@github.com>2023-05-16 04:05:24 +0530
commit9bf8bb0054f236533c8bc04f6a2966970c7d5bd9 (patch)
tree286cac99998d3c4ddda9052e312e0d1602066faa
parentb8f2e14e6dc6b688605e55c86e68ac17b53338f0 (diff)
Update 07.md
Implemented review inputs
-rw-r--r--07.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/07.md b/07.md
index 0fe8121..b350d0c 100644
--- a/07.md
+++ b/07.md
@@ -22,8 +22,8 @@ async window.nostr.nip04.encrypt(pubkey, plaintext): string // returns ciphertex
22async window.nostr.nip04.decrypt(pubkey, ciphertext): string // takes ciphertext and iv as specified in nip-04 22async window.nostr.nip04.decrypt(pubkey, ciphertext): string // takes ciphertext and iv as specified in nip-04
23``` 23```
24 24
25### User experience recommendation 25### Recommendation to Implementers
26Due 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. 26When `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.
27 27
28Calling 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 28Calling 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
29 29