-
-
Notifications
You must be signed in to change notification settings - Fork 470
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(addStyles): check if HTMLIFrameElement
exist
#296
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
HTMLIFrameElement
exist
What is Cobalt ( |
You have a list of supported features here http://cobalt.foo/development/reference/supported-features.html |
HTMLIFrameElement
existHTMLIFrameElement
exist
@@ -30,7 +30,7 @@ var getElement = (function (fn) { | |||
if (typeof memo[selector] === "undefined") { | |||
var styleTarget = fn.call(this, selector); | |||
// Special case to return head of iframe instead of iframe itself | |||
if (styleTarget instanceof window.HTMLIFrameElement) { | |||
if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
window
is not defined in server side rendering :(
What kind of change does this PR introduce?
Fix on some browser the fact that
window.HTMLIFrameElement
doesn't existDid you add tests for your changes?
Not relevant IHMO
If relevant, did you update the README?
Not relevant IHMO
Summary
Style-loader can be used with Cobalt browser (https://cobalt.foo)
Does this PR introduce a breaking change?
No
Other information
Thank for your work
Cobalt
(https://cobalt.foo)
I had some trouble to connect in https on their website with chrom{ium, e} but not with firefox