peckadesign / pd-naja

1 stars 0 forks source link

feature: `Control` provides optional method `detroy` #4

Closed zipper closed 1 year ago

zipper commented 1 year ago

Controls might have an optional method destroy. If this method is present, it is called before snippet's content is being replaced, allowing to destroy any previously initialized JS. This method is only called on snippets, where content is being replaced; when append or prepend operation is used, method is not called as in that case, previously initialized JS content remains intact in those snippets.