less-docs icon indicating copy to clipboard operation
less-docs copied to clipboard

XMLHttpRequest Deprecation..

Open Cordux opened this issue 8 years ago • 2 comments

I have looked over the code for less.min.js and it needs to change for it. Otherwise you get the error:

[Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.

Correct way should be:

var xhr = new XMLHttpRequest() xhr.onreadystatechange = function() { if (this.readyState === this.DONE) { console.log(this.status) // do something; the request has completed } } xhr.open("HEAD", "http://example.com") // replace with URL of your choosing xhr.send()

Cordux avatar Jun 12 '18 11:06 Cordux

  1. Wrong repo (this is the repository for Less documentation, for Less compiler bugs/issues use https://github.com/less/less.js/).
  2. See https://github.com/less/less.js/issues/2384.

seven-phases-max avatar Jun 12 '18 13:06 seven-phases-max

Closing as "wrong repo" (and duplicate of https://github.com/less/less.js/issues/2384).

seven-phases-max avatar Jun 15 '18 11:06 seven-phases-max