vitaly-t / excellent

Basic DOM Component Framework
https://vitaly-t.github.io/excellent/
MIT License
57 stars 5 forks source link

Fix 'onDestroy' not been called + 'findeOne' more stable in dynamic dom/controller structures #32

Closed stonecooler closed 3 years ago

stonecooler commented 3 years ago

Will call 'onDestroy' on all subordinate controllers if superordinate excellent controlled nodes will be removed from DOM. 'findeOne' (both!) will just log waring if one controller can not be found (0 or >1, but does not throw an error anymore which stops excecuting the rest of JS code in the browser.

vitaly-t commented 3 years ago

Thank you for taking your time to look into the problem and attempt a solution!

There are couple of problems with this PR...

vitaly-t commented 3 years ago

@stonecooler Will you be able to update the PR as per the comment I left above?

stonecooler commented 3 years ago

Will you be able to update the PR as per the comment I left above?

@vitaly-t Yes, i will try, but haven't had time yet. Then also properly with tests.