Closed griebd closed 7 years ago
Hi Adriano --
Yes, 0.5 changes the syntax for using mixin functions. In 0.4, the spread syntax <tag {... } />
was overloaded between spread objects and mixin functions. In 0.5 you have to be explicit. Mixin functions now use the special fn={}
attribute. So change all those {...data(...)}
mixins to fn={data(...)}
and it should work. This is actually the main reason for the version bump to 0.5, since it's breaking compatibility.
Sorry the example there confused you. I plan to bump it to 0.5 syntax once 0.5 is released.
The fact that html entities aren't being transpiled is something I noticed just recently. You can replace the ×
with ×
directly in the code for that. I'll update the readme with that and add a bug to figure out what's going on with entities.
Thanks for the report! If there's anything else that was a stumbling point, let me know. -- Adam
my mistake then! :wink:
about the html entities, we need then sometimes! and taking this opportunity, is this library safe against XSS? I mean, html entities from the view code should be interpreted as html, but anything from variables (may come from user input, db, unknown source) shouldn't...
thanks again!!!
Yes, Surplus works on DOM nodes, not strings, so any funny characters in, say, user supplied variables, just comes through as text, not HTML code.
good!!! thanks again!!! I will keep evaluating it for my project... now I need a router! (mithril was all included...)
Hi there, nice approach, I'm just trying it out...
After some trouble to start I made the example in the README of S.js work except by the
×
, it shows exactly like that and not as "×".Anyway, I went forward and moved to 0.5 beta and now the data bindings for the inputs are not working anymore!!! the only change was the library version!
Thanks, and again, congratulations! I hope it does thrive!