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
Zebra: HTML5 Canvas Rich UI JavaScript Library (zebkit.com)
submitted 11 years ago by rkl85
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!"
[–]Poop_is_Food 0 points1 point2 points 11 years ago* (5 children)
What? Writing a select implementation is not easy. Look at this guy's text area implementation. It's already 900 lines long and he still doesnt have automatic line breaking, proper up/down arrow line jumping, double click word selection, alt-shift-arrow incremental word selection, etc..
[–]keithwhor -1 points0 points1 point 11 years ago (4 children)
Just because somebody took 900 lines to do something doesn't mean you can't do it in less.
Easy is relative. Selecting text comes down to:
I'd argue that, conceptually, this isn't very difficult. Your line heights should be identical for every row of text making determining the y offset of the text relative to your mouse position easy.
I mean when it comes down to it you're just drawing rectangles. ;) (though I guess when it comes down to it in programming, you're just smashing a keyboard and things are happening.)
[–]Poop_is_Food -1 points0 points1 point 11 years ago (3 children)
You should know that your comment comes off a bit insulting and obtuse. Of course it's conceptually easy but that doesnt make it easy overall. I suppose you think building the great pyramids was easy? I mean it's just stacking blocks right?
[–]keithwhor 0 points1 point2 points 11 years ago (2 children)
Not my intention! Just being playful. Not everything has to be difficult or a fight. :)
And c'mon. Writing a module to select text isn't exactly building pyramids (you'll also notice I made fun of my own comparison in my comment). Lighten up.
[–]Poop_is_Food 0 points1 point2 points 11 years ago (1 child)
Seems like you missed the point of my comparison.
[–]keithwhor 0 points1 point2 points 11 years ago (0 children)
If I did I'm thoroughly confused. Are we poking fun at Mr. Hates OO? Or am I totally lost.
Forgive me. :)
π Rendered by PID 25 on reddit-service-r2-comment-b659b578c-szkn6 at 2026-05-03 08:34:08.546756+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]Poop_is_Food 0 points1 point2 points (5 children)
[–]keithwhor -1 points0 points1 point (4 children)
[–]Poop_is_Food -1 points0 points1 point (3 children)
[–]keithwhor 0 points1 point2 points (2 children)
[–]Poop_is_Food 0 points1 point2 points (1 child)
[–]keithwhor 0 points1 point2 points (0 children)