Skip to content

Commit

Permalink
fix: CSSKeyframesRule cssText Permission Denied on Internet Explorer …
Browse files Browse the repository at this point in the history
…11 (#1830)
  • Loading branch information
niklasvh committed May 11, 2019
1 parent 6577ac4 commit bc270bb
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/dom/document-cloner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export class DocumentCloner {
const sheet = node.sheet as CSSStyleSheet | undefined;
if (sheet && sheet.cssRules) {
const css: string = [].slice.call(sheet.cssRules, 0).reduce((css: string, rule: CSSRule) => {
if (rule && rule.cssText) {
if (rule && typeof rule.cssText === 'string') {
return css + rule.cssText;
}
return css;
Expand Down
50 changes: 50 additions & 0 deletions tests/reftests/animation.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<!DOCTYPE html>
<html>
<head>
<title>Animation</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="../test.js"></script>
<style>
span {
color:blue;
}
p {
background-color: green;
}
div {
background: red;
border: 5px solid blue;
animation: spin 3s linear 1s infinite;
}
body {
font-family: Arial;
}

@-webkit-keyframes spin {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
/* Firefox 16+, IE 10+, Opera */ }
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
/* Firefox 16+, IE 10+, Opera */ } }

@keyframes spin {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
/* Firefox 16+, IE 10+, Opera */ }
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
/* Firefox 16+, IE 10+, Opera */ } }
</style>

</head>
<body>
<div style="clip: rect(0px, 400px, 50px, 200px); ">Some inline text <span> followed by text in span </span> followed by more inline text.
<p>Then a block level element.</p>
Then more inline text.</div>
</body>
</html>

3 comments on commit bc270bb

@federicorOT
Copy link

Choose a reason for hiding this comment

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

Hi @niklasvh do you know when this will be released?
We are having this issue #1374
and look anxious for the fix 🥇
Thank you!

@aasomed
Copy link

Choose a reason for hiding this comment

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

Hi @niklasvh do you know when this will be released?
We are having this issue #1374
and look anxious for the fix 🥇
Thank you!

Same here

@seshadriallimani
Copy link

Choose a reason for hiding this comment

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

Hi @niklasvh, can you tell me when new version will be release with the fix for issue #1374 . Eagerly waiting to see fix in the version.

Please sign in to comment.