Damus
nomadshiba⚡ · 2d
why inject it inside the browser? it can be message and event based, allowing multiple extensions. nip07 had the same issue of extensions fighting. you emit an event or broadcast a message using the ...
nomadshiba⚡ profile picture
so example.

extensions add an event listener to the page, listening the event "nip123:requestAPI" for example.

then the page loads and the webapp listens the event "nip123:announceAPI", then it dispatches the event "nip123:requestAPI".

then the extension listening on that event respond with their name, description, logo, and api object by dispatching the event "nip123:announceAPI".

then the app can pick one or show the users options to pick one. or multiple. etc.