'Why is getcomputedstyle a method of window rather than element?

Why is it necessary to write:

window.getComputedStyle(element);

rather than the object-oriented:

element.getComputedStyle();



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source