PrefixedLocalStorageResource = function (options) {
  PrefixedLocalStorage.call(this);
  this.options = Object.assign({}, {
    close_on_cleanup: false
  }, options || {});
  // Check URL querystring for prefix to use
  var regex = new RegExp(`[?&]${this.param}(=([^&#]*)|&|#|$)`),
    results = regex.exec(document.location.href);
  if (results && results[2]) {
    this.prefix = results[2];
  }
  // Optionally have this window close itself when the PrefixedLocalStorageTest
  // sets a `closeAll` item.
  if (this.options.close_on_cleanup) {
    this.onSet('closeAll', () => {
      window.close();
    });
  }
}
**************************************************************************
Use in test resource files to share a prefix generated by a
PrefixedLocalStorageTest. Will look in URL querystring for prefix.
Setting `close_on_cleanup` opt truthy will make this script's window listen
for storage `closeAll` event from controlling test and close itself.

var PrefixedLocalStorageResource({ close_on_cleanup: true });