What is web api's in javascript?

 Are  they are inbuilt in web browsers?

No they’re not built in. Each developer creates a set of rules that say: When I receive this information, the program does that.

Hey Paul, I’m not asking about that api’s.I’m asking about following api’s

https://developer.mozilla.org/en-US/docs/Web/API

what it has to do with javascript?

They’re all extensions to JavaScript that are supported by all modern web browsers.

Browser support varies based on the individual API. Browser support is listed at the end of each API section.

so those event functions like click,mouseover etc are from this api’s and they are not built in function of javascript?

That’s right. The click event for example is a part of the DOM level 3 spec.

2 Likes

As I understand it, the core of JavaScript is ECMAScript, which I think of like an internal combustion engine. By itself, an engine can just sit on a table and run, without doing anything. But that engine can be placed into all kinds of machines to power them. How that engine interacts with the machine depends on the nature of the machine. So an engine is connected to a car in a particular way, and connected to a lawn mower in a different way.

When ECMAScript is used in a browser, it needs a particular interface to be able to interact with that environment, so there are lots of browser APIs etc. that utilize ECMAScript in a particular way.

2 Likes

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.