Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.

Please don't inject &lt;script&gt; into the <html> tag [Adobe Experience Cloud Debugger Chrome extension]

Avatar

Level 1

The chrome extension injects a <script> tag into the <html>, and not the <head> portion of the html. This is ugly, and makes other scripts that are initiated async also to be put in the <html> tag, because it detects it as the first script

 

var firstScript = document.getElementsByTagName('script')[0];

firstScript.parentNode.insertBefore(element, firstScript);

0 Replies