-
-
Notifications
You must be signed in to change notification settings - Fork 470
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1556c0b
commit 8a26186
Showing
7 changed files
with
310 additions
and
36 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* istanbul ignore next */ | ||
function setAttributesWithoutAttributes(style, attributes) { | ||
const nonce = | ||
typeof __webpack_nonce__ !== "undefined" ? __webpack_nonce__ : null; | ||
|
||
if (nonce) { | ||
attributes.nonce = nonce; | ||
} | ||
|
||
Object.keys(attributes).forEach((key) => { | ||
style.setAttribute(key, attributes[key]); | ||
}); | ||
} | ||
|
||
module.exports = setAttributesWithoutAttributes; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/* istanbul ignore next */ | ||
function setAttributesWithoutAttributes(style, attributes) { | ||
Object.keys(attributes).forEach((key) => { | ||
style.setAttribute(key, attributes[key]); | ||
}); | ||
} | ||
|
||
module.exports = setAttributesWithoutAttributes; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* istanbul ignore next */ | ||
function setAttributesWithoutAttributes(style) { | ||
const nonce = | ||
typeof __webpack_nonce__ !== "undefined" ? __webpack_nonce__ : null; | ||
|
||
if (nonce) { | ||
style.setAttribute("nonce", nonce); | ||
} | ||
} | ||
|
||
module.exports = setAttributesWithoutAttributes; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.