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

Avatar

Avatar
Shape 1
Level 1
anpotv2
Level 1

Likes

0 likes

Total Posts

6 posts

Correct reply

0 solutions
Top badges earned
Shape 1
Give Back
View profile

Avatar
Shape 1
Level 1
anpotv2
Level 1

Likes

0 likes

Total Posts

6 posts

Correct reply

0 solutions
Top badges earned
Shape 1
Give Back
View profile
anpotv2
Level 1

08-06-2020

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);

Accepted Solutions (0)

Answers (0)