Commented sections of template to test with single problematic IF, added notes on how to handle the problem
Introduced a conditional scope
Implemented scope re-use by type and position lookup, and by storing deprecated scopes as conditional childScopes when the condition is false
Added scope debugging function
Updated notes on IF
Improved scope re-use, even with nested conditionals. Dependencies required element updates. Perhaps looking into HTML re-use will prevent that requirement. No issues when toggling the top condition. The nested condition sometimes still re-creates scopes.
Removed spacing
Fixed wrong line in compiler
Fixed issue with nested childscope by moving childscope creating to the true condition
Fixed an issue with using a foreach inside a conditional scope
Updated a comment
Added notes on HTML re-use
Simplified handling of conditions, implemented re-use of HTMLnode, simplified scope re-use along with it. Nested conditions are still an issue.
Fixed nested IF's updating the HTML regardless of parent IF conditions
Research, since conditional scopes prove very complex
It's a mess, but with documentation
Moved childScope statement to CompiledComponent, to remember indexes of childScopes per CompiledTemplate. Added setIndex method to Componentn, and invalidate HTMLnode of children of ForEach when they are retrieved for re-use.
Removed unused function
Research on false condition compilation re-using HTML as well
Fixed an issue with nested conditional scopes causing two false-compilation, and no re-use of the CompiledTemplate.