when get a element\'s style, we always use
if(document.defaultView && document.defaultView.getComputedStyle)
to check whether the browser suppo
So in short, the reason why we use document.defaultView && document.defaultView.getComputedStyle
is that we want a cross-browser working-on-every-element method of checking whenever it supports fetching computed styles.
Simple if(window.getComputedStyle)
would fail for iframes in Firefox 3.6 (according to article linked in comment by Alex K.).