Basic fetch example
by Nick Hulea
HTML
<input type="button" id="basicFetchButton" value="Try it">
JavaScript
document.getElementById("basicFetchButton").addEventListener("click", function() {
// Loading the jQuery code
fetch("https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js")
.then(function(response) {
response.text().then(function(responseText) {
console.log(responseText);
});
});
});