Looking for official docs for all Javascript (BOM, DOM, built-in) Objects

瘦欲@ 提交于 2020-02-23 08:48:32

问题


when I make Web Application. As far as I know, There are three objects(BOM, DOM, built-in Objects) to javascript. If I want to manipulate DOM object. I refer DOM official documentation in w3c.org following this.

https://www.w3.org/DOM/DOMTR

If I want to know built-in objects. I can refer ECMA-262 documentation. It's very hard to read but it's official documentation.

https://www.ecma-international.org/publications/standards/Ecma-262.htm

If I want to control browser. I am googleing about BOM. I wonder where is offical BOM Object documentation. I think Google and Mozilla have to provide official documentation. but I couldn't find Where it is.

first question : Is there BOM standard like DOM?

Second question : Where is Chrome official BOM documentation?


回答1:


I think maybe the closest thing to what you are looking for is a list of Web API interfaces - these are things like the Clipboard API and Navigator, which are implemented different on each browser, but accessible via a shared Javascript interface. The list on MDN Docs is pretty comprehensive.

Browsers can also expose extra internal controls, like adding extra options to the right click menu, by providing APIs that are callable from "extensions". However, unlike the Web APIs, these are often very different browser-to-browser, and it is best to refer to the documentation of that specific browser. For example, to add something to the right click menu in Chrome, that would be through the chrome.contextMenus API.

  • Chrome Extension APIs: here
  • Firefox Extension APIs: here

Finally, if you really want to go in-depth, you could always look at the source-code for Chromium or Firefox/Gecko. One of the great benefits of open-source!




回答2:


As I explain in my other answer, the term "BOM" (browser object model) is not widely used, the more common name is the Web APIs.

The way the web standards are organized, there's no single specification describing all the APIs, instead there is a separate spec for each group of related APIs. For example the DOM, XMLHttpRequest, Full screen, etc. are all separate specs, usually worked on at WHATWG and/or W3C.

The (browser-agnostic) documentation for web developers is hosted on MDN (developer.mozilla.org). A Google Chrome team's post from 2017 indicates they have "been transitioning [their] web documentation efforts to MDN" and invide to use MDN Web Docs as "the centralized source of web API documentation".



来源:https://stackoverflow.com/questions/56370293/looking-for-official-docs-for-all-javascript-bom-dom-built-in-objects

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!