result = {
const target = new MyEventTarget(6);
target.addEventListener(
"bar",
function(e) {
this._secret = e.detail;
},
{ once: true }
);
const valueBefore = target.secret;
target.dispatchEvent(new CustomEvent("bar", { detail: 8 }));
target.dispatchEvent(new CustomEvent("bar", { detail: 9 }));
const valueAfter = target.secret;
return { valueBefore, valueAfter, target };
}