I applied to the example here the first test I always make of any things like this: HTML injection. Result: failure. ☹
\_(ʘ_ʘ)_/ "'caused it to show
{ "formData": { "name": "\\_(ʘ_ʘ)_/ \"'
31–40 of 62 posts
I applied to the example here the first test I always make of any things like this: HTML injection. Result: failure. ☹
\_(ʘ_ʘ)_/ "'caused it to show
{ "formData": { "name": "\\_(ʘ_ʘ)_/ \"'
That's the only javascript framework one needs. Actually I've been wanting to write something like that for a long time but didn't get around to it. Nice to see someone else did exactly what I wanted...
Does anybody have real world examples of websites that use this kind of thing? Im always under the assumption that the old "post data to server, save it there" model still works best. Am I missing something?
https://developer.mozilla.org/en-US/docs/Web/API/FormData
Weir thing is, the formData doesn't specify a working .toString(), so if you log it, it looks empty, and you can't see any of the values until you POST. Standards committees are wonderful.
Might be worth benchmarking against the others: http://jsperf.com/angular-vs-knockout-vs-ember/351 For me personally I am loving VueJS right now.
I'm entirely in love with VueJS. It's just amazing. I only wish I could use it with IE8 so I could replace our old version of Angular that we're stuck with at work, but hey, somethings got to give to get that nice an API.
How do you compare this with ractivejs.org?
less dependencies would be an added bonus
Why use invalid 'way-data'-attributes when there is data-attributes?
Earlier quoted context omitted.
Does anybody have real world examples of websites that use this kind of thing? Im always under the assumption that the old "post data to server, save it there" model still works best. Am I missing something?
If what you're doing is simple enough that "serialise the form, send to server, wait for response, do a full page reload" works for you, then no, you don't need two-way data binding, and in fact wouldn't have any use for it. You only need two-way data binding if you need your client-side code to respond to user input, which a truly basic form doesn't need to do. Of course, for a good user experience, you probably wan…
Earlier quoted context omitted.
That depends. How many forms and how many fields do you need to validate? jQuery is pretty much standard on most websites, so I don't count that against the author. The total minified dependency file is 123 kb. I will agree that is pretty large if all you are using it for is a single field, but again, a large portion of that is jquery. Also compared to just core angular, which is 104 kb, I would say this is a viable…
Well, you can argue if 5 dependencies and 123 kilobytes of code is much or not. But what does it bring to the table? Your "sub-total" example would just need a normal javascript event handler. Lets say we are uber lazy and use jquery. Then it looks like this: http://jsfiddle.net/La93vk4q/ How does the way.js version look like? Im sceptical it makes it more elegant.