0👍
✅
Answer was deduced from comments to main post.
if (event) {
const { target } = event
if (target) {
var el: HTMLButtonElement = (target as HTMLButtonElement)
if (el && el.firstChild) {
console.log(el.firstChild.textContent);
}
}
}
Source:stackexchange.com