mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 01:03:35 +00:00
Change WebAuthn connectors from using inline onclick to external (#969)
This commit is contained in:
@@ -9,7 +9,9 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
|
||||
const text = getQsParam('btnText');
|
||||
if (text) {
|
||||
document.getElementById('webauthn-button').innerText = decodeURI(text);
|
||||
const button = document.getElementById('webauthn-button');
|
||||
button.innerText = decodeURI(text);
|
||||
button.onclick = executeWebAuthn;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -76,8 +78,6 @@ function executeWebAuthn() {
|
||||
.catch(err => error('WebAuth Error: ' + err));
|
||||
}
|
||||
|
||||
(window as any).executeWebAuthn = executeWebAuthn;
|
||||
|
||||
function onMessage() {
|
||||
window.addEventListener('message', event => {
|
||||
if (!event.origin || event.origin === '' || event.origin !== parentOrigin) {
|
||||
|
||||
Reference in New Issue
Block a user