Closed pyykkis closed 12 years ago
Another possibility to tackle both this issue and https://github.com/leonidas/transparency/issues/21 would be MongoDB convention, e.g.,
directive =
foo: () -> push: {class: " new-class"}
http://www.mongodb.org/display/DOCS/Updating#Updating-ModifierOperations
jQuery have funtion addClass() which should be used with conjunction of $(elem)
$(elem).addClass("foobar")
Also native addClass() implementations exist / are coming, I believe.
I'd rather write directives as pure functions without side-effects. Anyway, I'm happy to drop the issue until someone else asks for it. Closing.
Currently, Transparency replaces existing content. Sometimes, e.g., when adding a new class for an element, appending would be handy.
Current functionality
Proposed functionality
I'm not sure if this is common enough scenario justifying the implementation, so let's have discussion first.
If the feature is worth implementing, in what extent we should support it? Only for attributes, or directives in general, or for both data and directives?