Re:How JavaScript works: inside the V8 engine
by robin_reala on Tuesday August 22, 2017 @02:38AM
(#15070240)
Most of what jQuery does could be moved into standard browser APIs and then presumably implemented in native code.
It pretty much has been. CSS syntax for selection lead to querySelectorAll, simpler AJAX calls to fetch, DOM manipulation functions were ported into the DOM spec wholesale.
But this could not be implemented by writing C++ class that gets exported to JS code as $ when something that looks like jquery is loaded. In JS you can load jQuery and then monkey patch it, which will break when you use this kind of "transparent" optimization.