Active-CSS / active-css

The epic event-driven browser language for UI with functionality in one-liner CSS. Over 100 incredible CSS commands for DOM manipulation, ajax, reactive variables, single-page application routing, and lots more. Could CSS be the JavaScript framework of the future?
https://activecss.org
Other
42 stars 7 forks source link

Allow console-log to output elements assigned to variables #278

Closed bob2517 closed 1 year ago

bob2517 commented 2 years ago

This syntax now works on the latest branch:

$panelSection: o.secSelObj.closest('panel-section');

The variable does actually contain the element, and can be used to get further properties, which is great.

It would be great if console-log could output the element for this with "console-log: $panelSection;", but it's not currently supported and instead shows the internal variable name for the variable.

There are other things yet to be set up that could use this type of variable, like being able to run actions directly on it, or iterating through a set of elements, but I haven't got to those yet as this is a new thing. I did just try to console-log and it didn't work, hence the immediate requirement. This is way way in advance of anything CSS can do, yet it shows there is still a way to go. And the weird thing is that no change of direction is necessary for ACSS - the enhancements flow one to the next. It almost designs itself.

bob2517 commented 1 year ago

Done on branch.

bob2517 commented 1 year ago

Closing in preparation for release.