<!DOCTYPE html>
<script>
navigator.credentials.get({ 'password': true })
.then(c => {
window.top.postMessage({
"credential": c,
"exception": null
}, "*");
})
.catch(omg => {
window.top.postMessage({
"credential": null,
"exception": omg.name
}, "*");
});
navigator.credentials.store(new PasswordCredential({'id': 'name', 'password': 'password' }))
.then(c => {
window.top.postMessage({
"credential": c,
"exception": null
}, "*");
})
.catch(omg => {
window.top.postMessage({
"credential": null,
"exception": omg.name
}, "*");
});
navigator.credentials.preventSilentAccess()
.then(_ => {
window.top.postMessage({
"preventSilentAccess": true,
"exception": null
}, "*");
})
.catch(omg => {
window.top.postMessage({
"preventSilentAccess": false,
"exception": omg.name
}, "*");
});
</script>