Skip to content
Myr

client.js

This file

Path

examples/search/client.js

13 lines · 374 bytes · JavaScript

Last changed by

Merge pull request #2008 from agchou/clean-up-codeJonathan Ongbefore adoption2e830ff

History of this file

Take it

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

expose connect.middleware using Object.getOwnPropertyDescriptor()Jonathan Ongbefore adoption2e68ddb

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