From fd74dbf82a5f6e14e089d03c757d0d7e0387373b Mon Sep 17 00:00:00 2001 From: Vadim Dalecky Date: Sat, 17 Mar 2018 17:28:56 +0000 Subject: [PATCH] refactor: rename .sheet to .sh --- addon/keyframes.js | 2 +- index.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/addon/keyframes.js b/addon/keyframes.js index 3f059306..66f4e22f 100644 --- a/addon/keyframes.js +++ b/addon/keyframes.js @@ -25,7 +25,7 @@ exports.addon = function (renderer) { str = prelude + '{' + str + '}'; if (renderer.client) { - renderer.sheet.appendChild(document.createTextNode(str)); + renderer.sh.appendChild(document.createTextNode(str)); } else { renderer.raw += str; } diff --git a/index.js b/index.js index 070eb539..d5ebd9c1 100644 --- a/index.js +++ b/index.js @@ -39,20 +39,20 @@ exports.create = function (config) { }, config); if (renderer.client) { - document.head.appendChild(renderer.sheet = document.createElement('style')); + document.head.appendChild(renderer.sh = document.createElement('style')); renderer.putRaw = function (rawCssRule) { if (process.env.NODE_ENV === 'production') { - renderer.sheet.insertRule(rawCssRule, 0); + renderer.sh.sheet.insertRule(rawCssRule, 0); } else { try { - renderer.sheet.sheet.insertRule(rawCssRule, 0); + renderer.sh.sheet.insertRule(rawCssRule, 0); } catch (error) { // eslint-disable-next-line console.info('Could not insert CSS rule.'); console.error(error); - renderer.sheet.appendChild(document.createTextNode(rawCssRule)); + renderer.sh.appendChild(document.createTextNode(rawCssRule)); } } };