Are there performance issues depending on which elements triggers a jquery event?
$('body').on('myEvent',function(e){
// access to e properties
});
$('#innerDiv').on('myEvent',function(e){
// access to e properties
});
Which one is better? In the first case "e" carries more information than "e" returned in the second snippet. So the "e" returned in the first case is a bigger object than the "e" returned in the second case. The question is, does this affects javascript performances? Heap? Memory? Or this object "e", indipendently from his size is already cached and easy-accessible?
Is it a good practice make "lighter objects" triggering events instead the entire body, document or html?