www/chcp.js
function broadcastEventFromNative(nativeMessage) {
  var params = {};
  if (nativeMessage.error != null) {
    params.error = nativeMessage.error;
  }

  var chcpEvent = new CustomEvent(nativeMessage.action, {
    'detail': params
  });
  document.dispatchEvent(chcpEvent);
}
function broadcastEventFromNative(nativeMessage) {
  var params = {};
  if (nativeMessage.error != null) {
    params.error = nativeMessage.error;
  }

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

@param {Object} arguments, received from the native side
Broadcast event that was received from the native side .