Note: The defaultView property is supported in Internet Explorer from version 9. In older versions, use the parentWindow property for similar functionality.
var computedStyle = document.defaultView.getComputedStyle(li, null);
var doc_d = document.defaultView ? document.defaultView : document.parentWindow;
var computedStyle = doc_d.getComputedStyle(li, null);