Arturo 'Buanzo' Busleiman wrote:
>I was wondering, mozillazine says that when I use addeventlistener for submit,
>the "this" object
>changes to what we expect.
>
>I'm playing around with this (from within overlay.js in my extension)
>
>window.addEventListener("submit",function(e) {enigform.onSubmit(e); },false);
>
>handler:
>
>onSubmit: function(e) {
>},
>
>So, I was wondering: How can I see what this and e make available to me?
>
In the event listener itself [function(e)] "this" will be "window"
because that's what you added the event listener to. In onSubmit "this"
will be the enigform variable. Meanwhile e.target should be the actual
form being submitted.
_______________________________________________
Project_owners mailing list
[email protected]
http://mozdev.org/mailman/listinfo/project_owners