libdot: storage: memory/terminal: fix missing change events for clear/remove

The Local & Chrome backends generate events when items are removed
from storage, but our Memory & Terminal backends were not.  Add an
internal helper function to both to make it easier to do so.

The Terminal backend was trying to generate change events via its
global onSettingsChanged_, but in practice that never worked: that
callback would fire only after we already updated the cache, so the
new state would match the cache (by design), so we'd never generate
any events.  The code was working for when state changed outside of
our context in the system, but that rarely happens.

Change-Id: Idf1e0b4f549333762c2e63adefba57b88e31542f
Reviewed-by: Joel Hockey <>
Tested-by: kokoro <>
2 files changed
tree: 37ed5a0cadf8965ef8c3a998f8c11b810cd2ecfa
  1. .clang-format
  2. .eslintrc.js
  3. .gitignore
  4. .markdownlintrc
  5. .npmrc
  6. .pylintrc
  7. CPPLINT.cfg
  8. Dockerfile
  11. OWNERS
  12. PRESUBMIT.cfg
  14. hterm/
  15. kokoro/
  16. libdot/
  17. nassh/
  19. package.json
  20. ssh_client/
  21. terminal/
  22. wasi-js-bindings/
  23. wassh/


This repository contains the libdot JavaScript library and some web applications that make use of it.

The official copy of this repository is hosted at

There is also a mirror on github at A few subprojects are also extracted out into their own git repo and mirrored. Keep in mind that these mirrors may occasionally be behind the official repository.

All changes must go through the Gerrit code review server on Github pull requests cannot be accepted. Please see the document in this directory for the details.

Top level directories

  • libdot/ is a small set of JS libraries initially developed as part of hterm, now available as shared code.

  • hterm/ is a JS library that provides a terminal emulator. It is reasonably fast, reasonably correct, and reasonably portable across browsers.

  • nassh/ is the Secure Shell Chrome extension that combines hterm with a NaCl build of OpenSSH to provide a PuTTY-like app for Chrome users.

  • ssh_client/ is the NaCl port of OpenSSH. It is used by nassh to create the Secure Shell App.