@paypal/paypal-js
    Preparing search index...

    Type Alias ApplePayButtonElement

    ApplePayButtonElement: HTMLElement

    The <apple-pay-button> custom element, defined and rendered by Apple's Apple Pay JS SDK (not the PayPal SDK). Load Apple's script alongside the PayPal SDK for the element to be registered:

    <script
    crossorigin
    src="https://applepay.cdn-apple.com/jsapi/1.latest/apple-pay-sdk.js"
    ></script>

    Configure the element with setAttribute — the element observes the buttonstyle, type, and locale attributes via attributeChangedCallback and does not expose DOM property setters for them. See Apple's documentation for the supported values of each attribute.

    const applePayButton = document.createElement("apple-pay-button");
    applePayButton.setAttribute("buttonstyle", "black");
    applePayButton.setAttribute("type", "buy");
    applePayButton.setAttribute("locale", "en-US");