create-credential-inner.https.html (811B)
1 <!DOCTYPE html> 2 <script src="/webauthn/helpers.js"></script> 3 <script src="/common/get-host-info.sub.js"></script> 4 <script src="utils.js"></script> 5 <title>Fenced frame content to report the result of navigator.credentials.create</title> 6 7 <body> 8 <script> 9 function base_path() { 10 return location.pathname.replace(/\/[^\/]*$/, '/'); 11 } 12 13 // This file is meant to be navigated to from a <fencedframe> element. It 14 // reports back to the page hosting the <fencedframe> whether or not 15 // `navigator.credentials.create` is allowed. 16 const [key] = parseKeylist(); 17 18 // Report whether or not `credentials.create` is allowed. 19 createCredential().then( 20 () => { 21 writeValueToServer(key, 'createCredential passed'); 22 }, 23 () => { 24 writeValueToServer(key, 'createCredential failed'); 25 }, 26 ); 27 </script> 28 </body>