jgravois
jgravois

Reputation: 2579

AngularJS - Remove two warnings from Chrome Console

I am preparing to deliver a Release Candidate of an Angular Application but there are two warning in the Chrome console that I can't seem to get rid of.

The warnings:

'Attr.textContent' is deprecated. Please use 'value' instead. [aph.js:141]

and

Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. [jquery.js:8556]

I just upgraded to the latest jquery and I can't find out what "aph.js" is. I would appreciate any help because I don't want to call it a Release Candidate with warnings in the console.

Thanks in advance!

Upvotes: 1

Views: 455

Answers (1)

Reactgular
Reactgular

Reputation: 54771

The first warning could be anything, but the name textContent is used by HTMLElement nodes. It is not deprecated.

https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent

The second warning means XMLHttpRequest was used with async disabled. The main JavaScript thread will be blocked until the HTTP request is finished.

 xmlhttp.open("GET","ajax_info.txt",false);
 xmlhttp.send();
 document.getElementById("myDiv").innerHTML=xmlhttp.responseText;

It's a very rare but a bad thing to be doing in the code.

Neither of these warnings should affect the operation of the app.

Upvotes: 1

Related Questions