single-file-core 1.5.72 → 1.5.74
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.
|
@@ -140,7 +140,7 @@ function getProcessorHelperClass(utilInstance) {
|
|
|
140
140
|
doc.head.appendChild(styleElement);
|
|
141
141
|
}
|
|
142
142
|
element.textContent = "/* */";
|
|
143
|
-
element.setAttribute("onload", "this.textContent=document.querySelector('style[" + DUPLICATE_STYLESHEET_ATTRIBUTE_NAME + "=\"" + stylesheetRefIndex + "\"]')
|
|
143
|
+
element.setAttribute("onload", "this.textContent=document.querySelector('style[" + DUPLICATE_STYLESHEET_ATTRIBUTE_NAME + "=\"" + stylesheetRefIndex + "\"]')?.textContent;this.removeAttribute(\"onload\")");
|
|
144
144
|
} else {
|
|
145
145
|
element.textContent = options.inlineStylesheets.get(stylesheetRefIndex).content;
|
|
146
146
|
}
|
|
@@ -23,7 +23,6 @@
|
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
25
|
import * as cssTree from "./../vendor/css-tree.js";
|
|
26
|
-
|
|
27
26
|
const UNMATCHABLE_PSEUDO_CLASSES = [
|
|
28
27
|
"active-view-transition",
|
|
29
28
|
"active-view-transition-type",
|
|
@@ -47,13 +46,42 @@ const UNMATCHABLE_PSEUDO_CLASSES = [
|
|
|
47
46
|
"stalled",
|
|
48
47
|
"volume-locked",
|
|
49
48
|
"after",
|
|
50
|
-
"before"
|
|
49
|
+
"before",
|
|
50
|
+
"visited",
|
|
51
|
+
"link",
|
|
52
|
+
"any-link",
|
|
53
|
+
"local-link",
|
|
54
|
+
"target",
|
|
55
|
+
"scope",
|
|
56
|
+
"hover",
|
|
57
|
+
"active",
|
|
58
|
+
"focus",
|
|
59
|
+
"focus-within",
|
|
60
|
+
"focus-visible",
|
|
61
|
+
"target-current",
|
|
62
|
+
"enabled",
|
|
63
|
+
"disabled",
|
|
64
|
+
"read-only",
|
|
65
|
+
"read-write",
|
|
66
|
+
"placeholder-shown",
|
|
67
|
+
"autofill",
|
|
68
|
+
"default",
|
|
69
|
+
"checked",
|
|
70
|
+
"indeterminate",
|
|
71
|
+
"blank",
|
|
72
|
+
"valid",
|
|
73
|
+
"invalid",
|
|
74
|
+
"in-range",
|
|
75
|
+
"out-of-range",
|
|
76
|
+
"required",
|
|
77
|
+
"optional",
|
|
78
|
+
"user-valid",
|
|
79
|
+
"user-invalid"
|
|
51
80
|
];
|
|
52
81
|
|
|
53
82
|
export {
|
|
54
83
|
sanitizeSelector,
|
|
55
84
|
};
|
|
56
|
-
|
|
57
85
|
/**
|
|
58
86
|
* Sanitize a selector AST into a QSA-safe selector string.
|
|
59
87
|
* Optional `ancestors` array may be provided to expand nesting selectors (`&`).
|
|
@@ -74,7 +102,6 @@ function sanitizeSelector(selector, ancestors, docContext) {
|
|
|
74
102
|
docContext.normalizedSelectorText.set(selector, normalized);
|
|
75
103
|
return normalized;
|
|
76
104
|
}
|
|
77
|
-
|
|
78
105
|
function normalizeSelectorNode(selector, ancestors) {
|
|
79
106
|
let current = selector.children.head;
|
|
80
107
|
while (current) {
|