Note that a test which simply triggers clone would be enough to break it because it would result in _cloneAndAppend(toClone) being called where toClone is null.
However, to illustrate the caveats (bug or feature?), I have added a couple of sample test cases which show that the user may still handle the "third-party" clone event at their discretion, reminding them to check event.namespace if necessary.
See https://github.com/Yapapaya/jquery-cloneya/issues/62
Note that a test which simply triggers
clone
would be enough to break it because it would result in_cloneAndAppend(toClone)
being called wheretoClone
is null.However, to illustrate the caveats (bug or feature?), I have added a couple of sample test cases which show that the user may still handle the "third-party"
clone
event at their discretion, reminding them to checkevent.namespace
if necessary.