|
|
|
|
|
by farinasa
4813 days ago
|
|
>TBH with an attitude like that, you're keeping yourself dependent on jQuery and therefore preventing yourself from progressing as a professional software engineer. Well said. Sometimes the easiest way isn't the best for your own future. jQuery will not be here forever. I can promise that much. |
|
It's certainly good to know about the DOM and have some clue about what jQuery is doing, but getting to the point where you can switch to native DOM at will without losing any speed, just to say you can, seems like a textbook case of premature optimization. Do it if you're interested, but not to solve a business problem.
And remembering which browsers use textContent and which ones use innerText is not nearly as important as understanding that the DOM is there, what it does, and being able to use JavaScript to do things that jQuery doesn't have a method for.
In the unlikely case that the Internet explodes and changes such that jQuery is busted but your old DOM knowledge still applies, or you very quickly switch environments to something where it's not an option, what would you do? Well, jQuery was more or less a DOM replacement with some promises and stuff built in. You'd probably just write that. So why not skip the hassle and just stick to jQuery? Learning how things work underneath is valuable and good, but only when it's really an investment—or you do it in a way that doesn't cut your current productivity.