Closed bob2517 closed 1 year ago
This is fixed on the branch for trigger on anything but a trigger on a draw event. Still to do that. Added the trigger-fresh command with accompanying ActiveCSS.triggerFresh command, which should hopefully solve any memory leaks on infinite loops, but still more tests to do on that before it's documented.
Skipping draw event implementation for now - could add that in later if it comes up.
Closing in preparation for release.
This is using the JS external command ActiveCSS.trigger(el, "myEvent");
The visible effect on my example is that it pulls private vars out into the main document scope, which is no good. That example was based on calling an event outside the component, but yet still needed to inherit the variable scoping.
The solution, without re-writing how component details are fetched in the event loop, is to fetch the component details in the external trigger command and call the event loop with those details. This is perhaps more performant anyway, bearing in mind the way the event loop is currently structured. It's maybe worth revisiting the event loop structure now that the core is stable and seeing if there is or isn't a better way to organise it.
This solution should also solve the problem of accessing inner component events when externally called.