|
|
@@ -44,7 +44,7 @@ this.RulesMatcher = this.RulesMatcher || (() => {
|
|
|
const matchedElementsCache = new Map();
|
|
|
doc.querySelectorAll("style").forEach((styleElement, sheetIndex) => {
|
|
|
if (styleElement.sheet) {
|
|
|
- let cssRules = styleElement.sheet.cssRules;
|
|
|
+ const cssRules = styleElement.sheet.cssRules;
|
|
|
if (styleElement.media && styleElement.media != MEDIA_ALL) {
|
|
|
const mediaInfo = createMediaInfo(styleElement.media);
|
|
|
this.mediaAllInfo.medias.set("style-" + sheetIndex + "-" + styleElement.media, mediaInfo);
|
|
|
@@ -194,7 +194,7 @@ this.RulesMatcher = this.RulesMatcher || (() => {
|
|
|
} else {
|
|
|
const styleInfo = elementStyleInfo.selectorInfo.styleInfo;
|
|
|
const cssStyle = styleInfo.cssStyle;
|
|
|
- let matchedStyleInfo = mediaAllInfo.matchedStyles.get(cssStyle);
|
|
|
+ const matchedStyleInfo = mediaAllInfo.matchedStyles.get(cssStyle);
|
|
|
if (!matchedStyleInfo) {
|
|
|
mediaAllInfo.matchedStyles.set(cssStyle, styleInfo);
|
|
|
}
|
|
|
@@ -224,7 +224,7 @@ this.RulesMatcher = this.RulesMatcher || (() => {
|
|
|
stylesInfo.forEach(styleInfo => {
|
|
|
const important = cssStyle.getPropertyPriority(styleInfo.name);
|
|
|
const styleValue = cssStyle.getPropertyValue(styleInfo.name) + (important && "!" + important);
|
|
|
- let elementStyleInfo = elementStylesInfo.get(styleInfo.name);
|
|
|
+ const elementStyleInfo = elementStylesInfo.get(styleInfo.name);
|
|
|
if (!elementStyleInfo || (important && !elementStyleInfo.important)) {
|
|
|
elementStylesInfo.set(styleInfo.name, { selectorInfo, styleValue, important });
|
|
|
}
|