client.js
This file
Path
examples/search/public/client.js
15 lines · 390 bytes · JavaScript
Last changed by
Not known.
History of this fileTake it
The walk stopped after 200 commits: lines older than 2027b87 point at it.
fix(deps): cookie@0.7.0Josh Bukerbefore adoption2027b87
lines 1–15why, one step back1'use strict'23var search = document.querySelector('[type=search]');4var code = document.querySelector('pre');56search.addEventListener('keyup', function(){7 var xhr = new XMLHttpRequest;8 xhr.open('GET', '/search/' + search.value, true);9 xhr.onreadystatechange = function(){10 if (xhr.readyState === 4) {11 code.textContent = xhr.responseText;12 }13 };14 xhr.send();15}, false);