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"
                    )
                ),
 ......


-- 
You received this message because you are subscribed to the Google Groups 
"Firebug" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/firebug.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/firebug/942293b4-cdc6-4906-83e0-5c2f6cf3b96d%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to