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

Workaround HTML Imports bug that blocks imported link rel="stylesheet"s in IE/Edge, #59

Conversation

tomalec
Copy link
Member

@tomalec tomalec commented Sep 17, 2018

Remove type="import-disable" attribute of stamped links, clean all templates recursively,
https://github.com/webcomponents/webcomponentsjs/issues/1008

https://github.com/Starcounter/uniform.css/issues/63

Copy link
Contributor

@alshakero alshakero left a comment

Choose a reason for hiding this comment

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

LGTM!

@@ -54,6 +64,9 @@
singleTemplate = templates[nodeNo];
//d debugger // or innerHTML in this case
singleFragment = document.importNode(singleTemplate.content, true);
if(isIE){
stripDisabledType(singleFragment);
}
// convert dynamic NodeList to regullar array
nodes = Array.prototype.slice.call(singleFragment.childNodes);
Copy link
Contributor

Choose a reason for hiding this comment

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

regullar -> regular.

Isn't Array.from cleaner?

@@ -0,0 +1,3 @@
#green{
color: rgb(0, 128, 0);
Copy link
Contributor

@alshakero alshakero Sep 18, 2018

Choose a reason for hiding this comment

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

I would use a different value (than the other stylesheet) for easier debugging in case we needed that.

instead of `Array.prototype.slice.call`,
as suggested at
#59 (comment)
tomalec added a commit that referenced this pull request Sep 18, 2018
@tomalec tomalec force-pushed the Starcounter/uniform.css/issues/63-add-workaround-for-HTMLImports-bug branch from 54932e2 to 306cbe1 Compare September 18, 2018 14:33
@tomalec tomalec merged commit 2d1b440 into master Sep 18, 2018
tomalec added a commit to Starcounter/starcounter-include that referenced this pull request Sep 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants