- }
-
- // Name the dep after our id.
- dep.name = id;
-
- // Arrange to update the dep `shortly after' updates.
- var soon = new Soon(kick);
- function kick_soon () { soon.kick(); }
- e.addEventListener('click', kick_soon, false);
- e.addEventListener('blur', kick_soon, false);
- e.addEventListener('keypress', kick_soon, false);
-
- // Sadly, the collection of events above isn't comprehensive, because we
- // don't actually get told about edits as a result of clipboard operations,
- // or even (sometimes) deletes, so add our `kick' function to a list of
- // such functions to be run periodically just in case.
- KICK_INPUT_FIELDS.push(kick);