Hi,
I'm creating a Firebug extension and struggling with domplate events.
Given 2 separate elements, each with a separate onclick handler, the same handler (onBtnOneClick) is called for both elements.
Sure, I could check the event.target, but the ui is going to get a lot more complicated than this, and surely I should be able to attach different handlers to different elements?
See the template (some of it) below.
FYI, if I delete btnOne, then onBnTwoClick is called when btnTwo is clicked.
Is this a bug, expected behaviour, or am I doing something else wrong?
var MyPlate = domplate({
ui:
TABLE({"class" : "stretch"},
TR(
TD({"class" : "fit nowrap"},
A({"class" : "btn flush", "id" : "btnOne", onclick : "$onBtnOneClick"},
SPAN({"class" : "icon one"}),
" One"
),
A({"class" : "btn", "id" : "btnTwo", onclick : "$onBtnTwoClick"},
SPAN({"class" : "icon select"}),
" Two"
)
),
......