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
So, I'm a bit confused here because I can't get the action, onAdd, or onRemove functions to fire.
Do these fire when the element is added, removed, or have an event fired?
In the v2 beta docs it says the following --
xtag.pseudos.example = {
onAdd: function(){
/*
This function is fired once when the base function is added to
the target object. For instance:
If you added an event with xtag.addEvent(someNode, 'tap:example', fn),
the onAdd function of the 'example' pseudo would be fired once when
the event is first attached to the element 'someNode'.
*/
},
onRemove: function(){
/*
This is basically the opposite of the onAdd function above.
With onRemove, you can clean up whatever you may have done
in your onAdd or action function invocations.
*/
},
action: function(pseudo, event) {
/*
This function is fired each time the pseudo chain is fired.
Pseudo actions are fired in the order they are chained, meaning
the in the pseudo 'toggle:log:example', the action function
for the 'log' pseudo would fire first, then the 'example' action
and finally the base function 'toggle' they are chained to.
*/
}
};
but in the jasmine tests it's done like the folowing--
xtag.pseudos.foo = {
onInvoke(){
count++;
}
}
The text was updated successfully, but these errors were encountered:
So, I'm a bit confused here because I can't get the action, onAdd, or onRemove functions to fire.
Do these fire when the element is added, removed, or have an event fired?
In the v2 beta docs it says the following --
but in the jasmine tests it's done like the folowing--
The text was updated successfully, but these errors were encountered: