Skip to content

Commit

Permalink
Merge pull request #2732 from getAlby/webln-events
Browse files Browse the repository at this point in the history
feat: webln:enabled event
  • Loading branch information
rolznz authored Sep 11, 2023
2 parents caff63f + 8574a81 commit 9dd0df6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/extension/content-script/webln.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ async function init() {
// if it is the enable call we store if webln is enabled for this content script
if (ev.data.action === "webln/enable") {
isEnabled = response.data?.enabled;
const enabledEvent = new Event("webln:enabled");
window.dispatchEvent(enabledEvent);
if (response.error) {
console.error(response.error);
console.info("Enable was rejected ignoring further webln calls");
Expand Down

0 comments on commit 9dd0df6

Please sign in to comment.