You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 2, 2019. It is now read-only.
Remove event handling is inconsistent with the other events. No key name is provided to the event handler for remove actions... making the idea of remove event handling unfortunately useless.
Module.set('key','value');// fires (create, create:key, mutate, mutate:key, change, change:key) events with parametersModule.set('key','othervalue');// fires (update, update:key, mutate, mutate:key, change, change:key) events with parametersModule.remove('key');// fires (remove, change) events without any parameters!
Request that this is changed to:
Module.remove('key');// to fire (remove, remove:key, mutate, mutate:key, change, change:key) events with appropriate parameters// such thatModule.on({'change': function(v){// v === 'key'},'change:key': function(v){// v === LAST VALUE},'mutate': function(v){// v.oldValue === LAST VALUE// v.newValue === undefined// v.key === 'key'},'mutate:key': function(v){// v.oldValue === LAST VALUE// v.newValue === undefined// v.key === 'key'},'remove': function(v){// v === 'key'},'remove:key': function(v){// v === LAST VALUE}});
The text was updated successfully, but these errors were encountered:
I agree, remove() needs to throw the same events as set(). However, i think the implementation is a little too complicated, with having an extra parameter to setAttribute(). It makes the code less readable. If you could provide an implementation that is cleaner i would happily include it in the next release of Stapes.
Remove event handling is inconsistent with the other events. No key name is provided to the event handler for remove actions... making the idea of remove event handling unfortunately useless.
Request that this is changed to:
The text was updated successfully, but these errors were encountered: