javascript : domElement.getComputedStyle()
javascript : domElement.getComputedStyle() Target: Applicable with any DOM Element. getElementById getElementsByTagName getElementsByClassName getElementsByName querySelector querySelectorAll select etc. In case of DOM NodeList first Node Element is processed for getComputedStyle. Description : This extension method is exactly window.getComputedStyle(domElement). It return list of all style attribute applicable to that domElement. Note: when list of element passed then it reutrn first element's style attribute list. Syntax: DOMElement.getComputedStyle() DOMNodeList.getComputedStyle() HTMLCollection.getComputedStyle() Usase: document.getElementById('firstDiv').getComputedStyle() It return CSSStyleDeclaration { } document.querySelector('#firstDiv').getComputedStyle() It return CSSStyleDeclaration { } document.querySelectorAll('ul').getComputedStyle() It return CSSStyleDeclaration { } document.body.getComputedStyle().width It return "1366px" do...