docs: function Dpdb(url, onDeviceParamsUpdated) {
    // Start with the offline DPDB cache while we are loading the real one.
    this.dpdb = DPDB_CACHE;
  
    // Calculate device params based on the offline version of the DPDB.
    this.recalculateDeviceParams_();
  
    // XHR to fetch online DPDB file, if requested.
    if (url) {
      // Set the callback.
      this.onDeviceParamsUpdated = onDeviceParamsUpdated;
  
      var xhr = new XMLHttpRequest();
      var obj = this;
      xhr.open('GET', url, true);
      xhr.addEventListener('load', function() {
        obj.loading = false;
        if (xhr.status >= 200 && xhr.status <= 299) {
          // Success.
          obj.dpdb = JSON.parse(xhr.response);
          obj.recalculateDeviceParams_();
        } else {
          // Error loading the DPDB.
          console.error('Error loading online DPDB!');
        }
      });
      xhr.send();
    }
  }