Skip to content
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

Merged
merged 1 commit into from
Jan 26, 2018

Conversation

gregaou
Copy link
Contributor

@gregaou gregaou commented Jan 23, 2018

What kind of change does this PR introduce?

Fix on some browser the fact that window.HTMLIFrameElement doesn't exist

Did 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)

A high-performance, small-footprint platform that implements a subset of HTML5/CSS/JS to run applications, including the YouTube TV app.

I had some trouble to connect in https on their website with chrom{ium, e} but not with firefox

Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@michael-ciniawsky michael-ciniawsky changed the title fix(addStyle): check if HTMLIFrameElement exist (not the case for cob… fix(addStyle): check if HTMLIFrameElement exist Jan 23, 2018
@michael-ciniawsky
Copy link
Member

michael-ciniawsky commented Jan 23, 2018

that implements a subset of HTML5/CSS/JS to run applications

What is Cobalt (NET::ERR_CERT_COMMON_NAME_INVALID) ? Is there any data about general language support of this 'browser'.
What's the last e.g IE version without HTMLIFrameElement support ?

@gregaou
Copy link
Contributor Author

gregaou commented Jan 24, 2018

You have a list of supported features here http://cobalt.foo/development/reference/supported-features.html

@@ -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) {

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 :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants