mirror of
https://github.com/github/codeql.git
synced 2025-12-19 18:33:16 +01:00
16 lines
461 B
JavaScript
16 lines
461 B
JavaScript
$(document).ready(function () {
|
|
var xhr = new XMLHttpRequest();
|
|
var url = "{{ some_url }}"
|
|
xhr.open("GET", url, true)
|
|
xhr.setRequestHeader("Content-Type", "application/json")
|
|
xhr.onreadystatechange = function () {
|
|
if (xhr.readyState !== 4) { return }
|
|
var json = JSON.parse(xhr.responseText)
|
|
$("#myThing").html(json.message);
|
|
}
|
|
try {
|
|
xhr.send()
|
|
} catch (error) {
|
|
console.log(error)
|
|
}
|
|
}) |