home

The much more useful extension of this is now working as saving text.

delayed do

a specific version of the source code (probably old)

code that is current for now but subject to deletion if I "promote" the code to another repo, archive the directory, etc.

There is nothing interesting to see without browser developer tools (control-shift-I). The purpose of this goes back several years to my main client's request / requirement that fields be "save on edit" rather than entering a bunch of rows and then hitting "save" for the whole page.

If every keystroke results in a separate network call, the situation can get out of hand. One problem is that one keystroke can easily get ahead of another through the network. If I'm running the PHP debugger (xdebug), as I remember, the whole system can show strain just from all the keystrokes. Even if you timestamp the calls with ms from (client-side) JavaScript, I have seen two keystrokes get the same ms. I just reproduced that, in fact. I can't get event.timeStamp to give me the same ms, but I got within 2ms so far, and I otherwise see all sorts of potential problems there, including intentionally reduced precision (see MDN on the matter).

In any event, the purpose of this code is to send after n ms if the user stops typing and every m ms even if they never stop. Those numbers are constructor arguments and are set to 307 and 2000 right now.