code: function broadcastEventFromNative(nativeMessage) {
    var params = {};
    if (nativeMessage.error != null) {
      params.error = nativeMessage.error;
    }
  
    var chcpEvent = new CustomEvent(nativeMessage.action, {
      'detail': params
    });
    document.dispatchEvent(chcpEvent);
  }
docs: Broadcast event that was received from the native side.
  
  @param {Object} arguments, received from the native side