Skip to content
Myr

client.js

This file

Path

examples/search/client.js

14 lines · 375 bytes · JavaScript

Last changed by

Not known.

History of this file

Take it

The walk stopped after 200 commits: lines older than a10f695 point at it.

pin jade dev dep so tests do not breakTJ Holowaychukbefore adoptiona10f695

lines 1–14why, one step back
1
2var search = document.querySelector('[type=search]');3var code = document.querySelector('pre');45search.addEventListener('keyup', function(){6 var xhr = new XMLHttpRequest;7 xhr.open('GET', '/search/' + search.value, true);8 xhr.onreadystatechange = function(){9 if (4 == xhr.readyState) {10 code.textContent = xhr.responseText;11 }12 };13 xhr.send();14}, false);