This project is archived and is in readonly mode.

#542 ✓invalid
Nico

Event Delegation => onCreate / onRemove / onModify elements

Reported by Nico | March 18th, 2011 @ 11:35 AM

Event Delegation is a great tools and I thinks we can add events like this :

document.id(myElement).addEvent('add:relay(a.myStyle)', function(){

{mkd-extraction-5176f89fb4f5bfa0ce88f5754e742c0d}

});

document.id(myElement).addEvent('remove:relay(a.myStyle)', function(){

{mkd-extraction-a522f5bb42b0f62baf09692187a51d20}

});

document.id(myElement).addEvent('modify:relay(a.myStyle)', function(){

{mkd-extraction-8f3014fd0c27515af6d7426c287cdf30}

});

Comments and changes to this ticket

  • Arian

    Arian March 18th, 2011 @ 04:32 PM

    Could you explain your ideas a bit more? Are you asking for delegation of custom events? What is onCreate / onRemove / onModify?

  • Nico

    Nico March 19th, 2011 @ 07:47 AM

    I mean, on an element $(myElement) I add events on each new elements (a.myStyle) created inside, events is fired on each (a.myStyle) on creation and "this" refer to each (a.myStyle).

    for removed/modify it's the same but on already existing and future a.myStyle.

    I thinks is a Built-in Custom Events, but delegation in custom/pseudo events is a good idea also.

  • Arian

    Arian March 29th, 2011 @ 02:14 PM

    Sorry, don't really follow you. Could you make a jsfiddle or something with some (non-working) code how it would work so I might understand it?

  • Arian

    Arian May 6th, 2011 @ 11:25 PM

    • State changed from “new” to “invalid”

    Please reopen with a code example if you think it's important.

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

The MooTools Extensions

People watching this ticket

Pages