Skip to main content
The Deno 2 Release Candidate is here
Learn more

XMLHttpRequest Deno Polyfill

A buggy polyfill of XMLHttpRequest for Deno (and other browser and browser-like environments) by browserifying @driverdan/node-XMLHttpRequest.

import XMLHttpRequest from "https://deno.land/x/xmlhttprequest_deno@v0.0.2/mod.js";

let xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() {
  if(this.readyState == 4 && this.status == 200) {
    console.log(this.responseText);
  }
};

xhr.open("GET", "https://example.com", true);
xhr.send();

TODO