JS equivalent for jQuery one()
<p>Can someone point me towards a solution for the following? I'm trying to find a JS equivalent for this jQuery code:</p>

<pre><code>var formSelector = 'my selector here';
var attribute = 'name';
var formHistory = [];

$(formSelector).one('focusout', function(e) {
    formHistory.push(e['target'].getAttribute(attribute));
});
</code></pre>