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 attribute referencing within arrays #109

Closed bob2517 closed 3 years ago

bob2517 commented 3 years ago

Currently this won't work inside a component:

var: myOtherVar myArr[@id].someProperty;

It would be really handy to implement this to save mucking about with re-assigning the attribute to a variable before use.

bob2517 commented 3 years ago

This is done but it currently looks like this because at the moment attributes get substituted prior to the expression getting evaluated:

var: myOtherVar myArr["{@id}"].someProperty;

This might change at some point before 2.5.0 release, but for now this is what it is.