metaskills/space-pen — comment on commit 24866675c0a8993c98cadbc9ebe9a5dcf9a8b51e
File:  line 0
By nathansobo:

I like the idea of avoiding random attributes in the markup, but I'm concerned about the linear traversal through all children looking for the spTriggerAttachEvent data entry. When you use attributes you can lean on the DOM's native selector support in modern browsers to pull out just the elements with the "triggerAttachEvents" property. Any thoughts on the efficiency difference? An approach of just removing the attribute before going to the DOM would work for the first time, but wouldn't allow us to detach and reattach views, which is unfortunate.

What's the reason you don't like having extra attributes? Is it aesthetic? Removing the outlet attributes in the other case seems harmless, but it seems like removing the attach event attribute in this case will cause performance degradation or a significant increase in code complexity. So I wonder if it's really worth it.