firefox support

This commit is contained in:
Sebastian 2023-04-13 12:57:23 -03:00
parent 7b2de89444
commit f9d3018668
No known key found for this signature in database
GPG Key ID: 173909D1A5F66069
2 changed files with 10 additions and 0 deletions

View File

@ -21,6 +21,10 @@
"https://*/*", "https://*/*",
"activeTab" "activeTab"
], ],
"web_accessible_resources": [
"static/wallet.html",
"dist/taler-wallet-interaction-support.js"
],
"optional_permissions": [ "optional_permissions": [
"http://*/*", "http://*/*",
"https://*/*", "https://*/*",

View File

@ -98,10 +98,16 @@ function buildApi(config: Readonly<Info>): API {
logger.debug(`onclick: could not convert "${hrefAttr.value}" into path`); logger.debug(`onclick: could not convert "${hrefAttr.value}" into path`);
return; return;
} }
// we can use window.open, but maybe some browser will block it?
window.open(page, windowTarget); window.open(page, windowTarget);
ev.preventDefault(); ev.preventDefault();
ev.stopPropagation(); ev.stopPropagation();
ev.stopImmediatePropagation(); ev.stopImmediatePropagation();
// another possibility is to change the location when the click is made
// or when the anchor is found
// hrefAttr.value = page
// TODO: explore different possibilities and maybe allow the configuration
// using the meta-tag
return false; return false;
} }