function requestViaDedicatedWorker(url, options) {
  var worker;
  try {
    worker = new Worker(url, options);
  } catch (e) {
    return Promise.reject(e);
  }
  worker.postMessage('');
  return bindEvents2(worker, "message", worker, "error")
    .then(event => wrapResult(event.data));
}
Creates a new Worker, binds message and error events wrapping them into.
    {@code worker.eventPromise} and posts an empty string message to start
    the worker.
@param {string} url The endpoint URL for the worker script.
@param {object} options The options for Worker constructor.
@return {Promise} The promise for success/error events.