From 68f5a80f6c5094288d2c770bd343e98839598068 Mon Sep 17 00:00:00 2001 From: John Hildenbiddle Date: Fri, 29 Jul 2022 14:30:53 -0500 Subject: [PATCH] Fix `fixKeyframes` error when using shadowDOM Fix #171 --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index abf365e..db5e01a 100644 --- a/src/index.js +++ b/src/index.js @@ -834,7 +834,7 @@ function fixKeyframes(rootElement) { ].filter(prop => getComputedStyle(document.body)[prop])[0]; if (animationNameProp) { - const allNodes = rootElement.getElementsByTagName('*'); + const allNodes = [].slice.call(rootElement.querySelectorAll('*')); const keyframeNodes = []; const nameMarker = '__CSSVARSPONYFILL-KEYFRAMES__';