127

Wondering why that link doesn't work.
My junior developer uses onlick instead of onclick.

Comments
  • 21
    Bright future is ahead of him.
  • 7
    @xaero I'll ask him to test it.
  • 3
    @DanijelH Yes, very bright
  • 5
    "The Future's So Bright, I Gotta Wear Shades"
  • 32
  • 7
    I'm happy that I don't need to deal with this kind of bullshit using a compiled language.
  • 0
    I wasn't aware that input method was an option.
  • 3
    Using inline events on HTML is not a good practice. You should add:

    DOM.addEventListener("click", function(){
    //whatever
    });
  • 1
    @LuxARTS I know about this but I never understood why. If I ever look back at the code and use inline event trigger I get a report for a broken feature, see exactly when what triggers why and have a much easier time debugging than looking through the computed listeners. The only sensible argument I come to is that they hide the internal workings but I never understood why someone would want that.
  • 2
    Because the "code" is not the HTML file, is the JavaScript file. If you want to get info about the event simply set a variable to send to the trigger function and read it.

    DOM.addEventListener("click", function(event){
    console.log(event);
    });
  • 1
    Typos happen wtf
  • 0
    😛
  • 0
    `onlick`? Smart Ice cream in the future?
Add Comment