I have a method which is called by a button and which I can't modify for some reason.
<button onclick="onMyButtonClick()">button1</button>
<button>button2</button>
function onMyButtonClick() {
// how to know who is a caller?
}
how to know who is a caller?
UPDATE:
<button onclick="onMyButtonClick(123)">button1</button>
<button>button2</button>
function onMyButtonClick(a, b) { // b is undefined
// how to know who is a caller?
}