Open mickmcgrath13 opened 7 years ago
@justinbmeyer What should happen if someone puts both events on an element?
{{#if showDemo}}
<div class="demo"
($beforeremoved)="*animations.customFadeOut2"
($beforedetached)="*animations.customFadeOut3">
</div>
{{/if}}
1) beforedetached & beforeremoved
We might have a situation like this in which case if
prop
becomes falsey, the beforeremove event will not be fired (it will only be fired on the helper's root element).Instead, we will provide two events - one that 'bubbles' down to all children, and one that only happens on the actual element.
beforeremoved
(past tense) - called only when specific element is targeted for removal.beforedetached
(past tense) - called when element or any parent element is targeted for removal. (Similar to this)2) Counter - not going to do anything unless the event counter is up
var oldRemoveChild = domMutate.removeChild; domMutate.removeChild = function(child){ if(counter === 0 ) { oldRemoveChild.call(self, child); } else { var self = this;
}
};