this post was submitted on 25 Jan 2025
712 points (98.0% liked)

Programmer Humor

33546 readers
399 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[โ€“] Pika@sh.itjust.works 32 points 3 weeks ago* (last edited 3 weeks ago) (3 children)

I hate that I noticed the syntax error on line 263 before I realized what the joke was. (at least I assume that 260 contains a function with a callback meaning it is missing the closing parenthesis)

[โ€“] master5o1 10 points 3 weeks ago* (last edited 3 weeks ago)

My assumption is that it's setting up an object to map element selectors -> callbacks.

var specialElementHandlers = {
  '#editor': function() {
    return true;
  }
};

But yeah, could be something as

var specialElementHandlers = Object.assign({}, defaultHandlers, {
  '#editor': function() {
    return true;
  }
}; // missing closing parenthesis 
load more comments (2 replies)