From 80ea69735eb7d422b06ddcf843afaa423b41ec04 Mon Sep 17 00:00:00 2001 From: Marco Roth Date: Tue, 23 Aug 2022 15:40:32 +0200 Subject: [PATCH] Use `localName` over `tagName.toLowerCase()` (#696) --- src/core/drive/head_snapshot.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/drive/head_snapshot.ts b/src/core/drive/head_snapshot.ts index 70fb0ea9b..3892332c1 100644 --- a/src/core/drive/head_snapshot.ts +++ b/src/core/drive/head_snapshot.ts @@ -96,22 +96,22 @@ function elementIsTracked(element: Element) { } function elementIsScript(element: Element) { - const tagName = element.tagName.toLowerCase() + const tagName = element.localName return tagName == "script" } function elementIsNoscript(element: Element) { - const tagName = element.tagName.toLowerCase() + const tagName = element.localName return tagName == "noscript" } function elementIsStylesheet(element: Element) { - const tagName = element.tagName.toLowerCase() + const tagName = element.localName return tagName == "style" || (tagName == "link" && element.getAttribute("rel") == "stylesheet") } function elementIsMetaElementWithName(element: Element, name: string) { - const tagName = element.tagName.toLowerCase() + const tagName = element.localName return tagName == "meta" && element.getAttribute("name") == name }