Why aren't they based on structural functions inside?

I'm just wondering why trivial functions, such as String.contains(), are not part of the core JavaScript itself. I mean, although the core of JavaScript contains all the functions needed to create new functions based on the core, some obvious functions are not available by default.

There are some great frameworks that basically extend the core of JavaScript, but I just don't understand why they weren't built originally.

Also, for example, the jQuery function is ajax()much more developer friendly than the native XMLHttpRequestobject. It is practically necessary to use frameworks for such things.

So why are functions like these not available in the JavaScript core itself?

+3
source share
3 answers

There are some great frameworks that basically extend the JavaScript core, but I just don't get why they weren't built originally.

I don’t think that someone had the foresight to think 10-15 years in advance and see how the implementations of technologies will develop, from the point of view of which browsers will support parts of the specifications that are currently standardized at the time to create these service features that we consider useful in 2011.

Javascript was created in 1995 by Eych, and the landscape was completely different. "Ajax" did not exist at that time, and how would anyone think that in 15-16 years we will need some kind of cross-browser function ajax? Microsoft introduced IFrame in 1996 and XMLHttp (Ajax) in 1999.

1995 , , , - ? , "", ?

, , , IE , IE6 IE7, 5-6 , IE7 - ECMA-262, CSS1/CSS2, , , Javascript, , .

, Javascript - Javascript, ECMAScript. ECMAScript, , ActionScript Javascript , DOM , XMLHttpRequest. /DOM .

+4

X Y? :

.

? , .

+1

, , JavaScript, ECMAScript, . , , , . , XMLHttpRequest, , [i] [/i], JavaScript .

String, , String . , Trim? .

+1

Source: https://habr.com/ru/post/1795092/


All Articles