From 0b62f28f94633d121ee8c1b9103490025fc819d4 Mon Sep 17 00:00:00 2001 From: Simon Tang Date: Fri, 25 Oct 2019 07:15:40 -0400 Subject: [PATCH] Inject styles into Shadow DOM when inside Shadow DOM (#5763) (#6556) --- 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