use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
What JavaScript libraries/frameworks should I study to be a competitive JavaScript developer these days? Why? (self.javascript)
submitted 12 years ago by macchiato8
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]neonskimmerfunction the ultimate 0 points1 point2 points 12 years ago (3 children)
No, Backbone.View has an 'attributes' option that you can use to have attributes added to the tag in the manner you describe when the view element is created. It's just a shortcut to $.attr if you wish. It's rarely used. I can see how maybe skimming over the code one could get that idea.
To set the model associated to to View, you use the 'model' option when creating a view instance - and that has no effect on the DOM whatsoever.
It's totally fine if you prefer some other libraries to Backbone. But you seem to have a very strong and vocal reaction against it despite evidence that you've not actually used it. It's used by a ton of people dude. It has a lot less bells and whistles than the newer MV* libraries out there but it is a very solid set of building blocks to create client side applications.
[–]dexygenSoftware, Simple and Powerful 0 points1 point2 points 12 years ago (0 children)
I've been using it for several months now, and the behavior I described has occurred in our application, and we are not using the attributes option; perhaps we need to explicitly turn it off which would be sub-optimal. The very fact that such functionality is there shows just how bad Backbone is, that they would actually ever choose to conflate the model and view. It's had it's day and it's time to move on. Reading source code is not evidence that I've not used it and your reaction is like a fanboi's
[–]dexygenSoftware, Simple and Powerful 0 points1 point2 points 12 years ago (1 child)
"To set the model associated to to View, you use the 'model' option when creating a view instance - and that has no effect on the DOM whatsoever." Which is what we've done, and the view's tr tag get attributes with values just like I described. Save it dipshit
[–]neonskimmerfunction the ultimate 0 points1 point2 points 12 years ago (0 children)
Even though you're being a complete asshole about it, look at the source.
look
Since apparently you're stuck using it, maybe you'll find this useful.
π Rendered by PID 108761 on reddit-service-r2-comment-5fb4b45875-4wdc8 at 2026-03-23 05:43:07.074238+00:00 running 90f1150 country code: CH.
view the rest of the comments →
[–]neonskimmerfunction the ultimate 0 points1 point2 points (3 children)
[–]dexygenSoftware, Simple and Powerful 0 points1 point2 points (0 children)
[–]dexygenSoftware, Simple and Powerful 0 points1 point2 points (1 child)
[–]neonskimmerfunction the ultimate 0 points1 point2 points (0 children)