-
Notifications
You must be signed in to change notification settings - Fork 20.5k
Closed
Description
Hi,
Using Polymer in my application, I have found out that the function
var getStyles = function( elem ) {
// Support: IE<=11+, Firefox<=30+ (#15098, #14150)
// IE throws on elements created in popups
// FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
if ( elem.ownerDocument.defaultView.opener ) {
return elem.ownerDocument.defaultView.getComputedStyle( elem, null );
}
return window.getComputedStyle( elem, null );
};throws an exception when elem is a shadow dom element, because elem.ownerDocument.defaultView is undefined.
Adding the control, all works well.
if ( elem.ownerDocument.defaultView && elem.ownerDocument.defaultView.opener ) {Metadata
Metadata
Assignees
Labels
No labels