From bf6cf45bec138743a8c93c641dedcd39bf0807b0 Mon Sep 17 00:00:00 2001 From: Thiago Zimmermann Date: Fri, 1 Nov 2019 00:22:33 +0100 Subject: [PATCH] branding remove function should work now properly.. --- src/Hypnonema.DUI/src/components/App.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Hypnonema.DUI/src/components/App.jsx b/src/Hypnonema.DUI/src/components/App.jsx index ed31dd3..248c043 100644 --- a/src/Hypnonema.DUI/src/components/App.jsx +++ b/src/Hypnonema.DUI/src/components/App.jsx @@ -63,12 +63,12 @@ class App extends Component { const iframeRef = document.getElementsByTagName('iframe')[0]; if (typeof(iframeRef) !== 'undefined' && iframeRef !== null) { - const head = iframeRef.getElementsByTagName('head')[0]; - const style = iframeRef.createElement('style'); + const head = iframeRef.contentDocument.getElementsByTagName('head')[0]; + const style = iframeRef.contentDocument.createElement('style'); head.appendChild(style); style.setAttribute('type', 'text/css'); - style.appendChild(iframeRef.createTextNode(css)); + style.appendChild(iframeRef.contentDocument.createTextNode(css)); } };