In the website of W3Schools is showing the Window Object and Screen Object below DOM (check it here), but in the course that I am participating, is saying that it belongs to BOM API.
Can somebody help me to clarify where this objects belong?
Once again w3School is misleading, avoid reading too much into what they say, they often are at least out-dated.
A better documentation site can be found at MDN though even there don't treat everything as definitive source of trust, it's still written by humans who do mistakes.
To the question, let's first state that there is nothing officially called the "BOM API", while the DOM API is clearly defined and has its own specification.
One sure thing: none of these interfaces are part of the DOM API.
The Window interface is defined by the HTML standards, which makes w3School's HTML DOM classification only half of a lie.
The Screen interface is being defined by the CSSOM-view standards
Other interfaces that would fit well in something called BOM like Navigator is defined by the HTML standards but then, the actual extensions to this interface are being defined somewhere else, for instance MediaDevices are defined by an entirely different organization in W3C's Media-Capture group.
And I won't even get into weird monsters like the Location interface which lives across multiple realms both DOM and Window interface.
But to make all this simpler, if we take as definition of "BOM" any Web API that is neither ECMAScript standardized nor from the DOM API, then yes, these are both from this BOM.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With