2

Late project stage, obscure bug. Think to myself "What's the difference between parentNode and parentElement in javascript?"

Find out both are the same, but parentNode works everywhere with any element and parentElement doesn't. Let's refactor then.

Comments
  • 0
    That there is exactly the reason I use jQuery more or less always. Sure, there's fancy things in there, but honestly I just don't want some obscure compatibility issue to bite me in the ass... It's bad enough when you do use jQuery, it's much much worse when you don't :/
  • 0
    @Bikonja to tell you the truth, ES6 coupled with browserify and babel is pure bliss. Not recommended if you still need to support IE9 and down, but if it's IE10 and over, no issues at all.

    I've built a fairly complex front end framework/component collection and had very few bugs, and these bugs were very minor. Give it a try on ES6/7/Next with a good compiler, learn vanilla js, and you'll see jQuery is not that needed anymore.
  • 0
    @Bikonja Also, regarding this bug I mentioned on the post, it's because MS tried to do it's own thing for a long while, and these proprietary selectors are still around. This is not on JS, it's on browser vendors with little vision of the future.
  • 1
    @VinnyFonseca IE9 is, unfortunately, something I still need to support and, regardless of whether the browser vendor went off-spec or the spec is lacking, there's differences between browsers and I'm sick of trying every single thing on every single (version of) browser so jQuery is very nice for that. I do write plain JS when I can, though, but that's very​ rarely...
Add Comment