On 5/30/06, Nickolay Ponomarev <[EMAIL PROTECTED]> wrote:
- but you're better off not using this unless you understand how it
works. (And it's really unnecessary if all you need to pass is a
simple string).
eh... I prefer this form. I think tacking attributes onto random
elements to store state is, err, tacky and has more chance to collide
with other people's random additions. Also, with bind() it is really
quite elegant:
for (var i = 0; i < 5; i++) {
button.addEventListener("click", bind(i); i++);
}
Finally, I've read that attributes are quite expensive in mozilla,
since they can be tied to CSS, XBL, etc.
Why do you think it's better to store something in the DOM rather than
in pure JS?
- a
_______________________________________________
Project_owners mailing list
[email protected]
http://mozdev.org/mailman/listinfo/project_owners