simplestyle-js 5.4.7 → 5.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -133,7 +133,11 @@ function createSheet(ruleId, sheetContents) {
|
|
|
133
133
|
// attempt to reuse the style tag, if it existed
|
|
134
134
|
const existingTag = doc.getElementById?.(ruleId);
|
|
135
135
|
const existing = Boolean(existingTag);
|
|
136
|
-
|
|
136
|
+
let styleTag = existingTag;
|
|
137
|
+
if (!styleTag) {
|
|
138
|
+
styleTag = doc.createElement('style');
|
|
139
|
+
styleTag.dataset.simplestyleCreatedAtRuntime = 'true';
|
|
140
|
+
}
|
|
137
141
|
styleTag.id = ruleId;
|
|
138
142
|
styleTag.innerHTML = sheetContents;
|
|
139
143
|
out.existing = existing;
|
|
@@ -101,7 +101,11 @@ function createSheet(ruleId, sheetContents) {
|
|
|
101
101
|
// attempt to reuse the style tag, if it existed
|
|
102
102
|
const existingTag = doc.getElementById?.(ruleId);
|
|
103
103
|
const existing = Boolean(existingTag);
|
|
104
|
-
|
|
104
|
+
let styleTag = existingTag;
|
|
105
|
+
if (!styleTag) {
|
|
106
|
+
styleTag = doc.createElement('style');
|
|
107
|
+
styleTag.dataset.simplestyleCreatedAtRuntime = 'true';
|
|
108
|
+
}
|
|
105
109
|
styleTag.id = ruleId;
|
|
106
110
|
styleTag.innerHTML = sheetContents;
|
|
107
111
|
out.existing = existing;
|
package/package.json
CHANGED