Is it possible to retrieve the card element object by referencing the ID of the DOM element that it is attached to, with the Stripe elements API in Javascript? For example, if I create the card element like this:
var card = elements.create('card', {style: style});
card.mount('#card-element');
...
...
var card = elements.retrieve(card-element') // in some other function
...or do I have to store the card object in a variable? The reason I'm asking is because I would like to clear the credit card details entered in the form at a later stage, and I was hoping there was a way to retrieve the card object without actually storing a reference to it in memory.