Abhishek Pathak Abhishek Pathak - 3 months ago 9
HTML Question

What's wrong with my browser JavaScript engine on jsbin.com?

I am new to JavaScript. I am trying to add text into a

p
tag and targeting it using the ID. Now, using the
document.getElementById('text').innerHTML
, when I set the text that contains the
do
word, it returns the original text in the
p
tag.



document.getElementById('text').innerHTML='as I add??? do';

<p id="text" class="abc">Hello</p>





It is happening only with the
do
word in between.
Here's a GIF explaining the issue:

enter image description here

I hope I am doing this right. But, there might be some quirk that is messing with me.

Answer

As commented by Juhana and jsbin member on github, it's a false positive, this can be achieved by adding // noprotect in the code.

e.g.

console.clear(); 
document.getElementById('abc').innerHTML = 'this is abc do '; 

// noprotect

p.s. As of now it's to work around to loop protection, until it's get fixed.

Comments