From a1457f1b043c227c3700e847f2f257461b076200 Mon Sep 17 00:00:00 2001 From: Simon Tang Date: Sun, 6 Oct 2019 13:49:24 -0400 Subject: [PATCH] Inject styles into Shadow DOM when inside Shadow DOM (#5763) --- src/platforms/platform.dom.js | 44 +++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/src/platforms/platform.dom.js b/src/platforms/platform.dom.js index 66f95668997..03f8486be43 100644 --- a/src/platforms/platform.dom.js +++ b/src/platforms/platform.dom.js @@ -294,17 +294,22 @@ function removeResizeListener(node) { } } -function injectCSS(platform, css) { +/** + * Injects CSS styles inline if the styles are not already present. + * @param {HTMLDocument|ShadowRoot} rootNode - the node to contain the