tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

permissions-policy-payment.html (425B)


      1 <script>
      2 'use strict';
      3 
      4 window.onload = function() {
      5  var supportedInstruments = [ { supportedMethods: [ 'visa' ] } ];
      6  var details = {
      7      total: { label: 'Test', amount: { currency: 'USD', value: '5.00' } }
      8  };
      9  let enabled = true;
     10  try {
     11    new PaymentRequest(supportedInstruments, details);
     12  } catch (e) {
     13    enabled = false;
     14  }
     15  parent.postMessage({ type: 'availability-result', enabled }, '*');
     16 }
     17 </script>