static function handleButtonClick() {
	window.buttonClickCalls.push(arguments);
}

<div>
	<button key="ok" type="button" onClick(handleButtonClick, 'ok')>OK</button>
	<button key="cancel" type="button" onClick(handleButtonClick, 'cancel')>Cancel</button>
</div>