code: func (w *Window) SendMessage(message interface{}, callbacks ...CallbackMessage) (err error) {
  	if err = w.isActionable(); err != nil {
  		return
  	}
  	var e = Event{Message: newEventMessage(message), Name: eventNameWindowCmdMessage, TargetID: w.id}
  	if len(callbacks) > 0 {
  		e.CallbackID = w.callbackIdentifier.new()
  		w.On(eventNameWindowEventMessageCallback, func(i Event) (deleteListener bool) {
  			if i.CallbackID == e.CallbackID {
  				for _, c := range callbacks {
  					c(i.Message)
  				}
  				deleteListener = true
  			}
  			return
  		})
  	}
  	return w.w.write(e)
  }
docs: // SendMessage sends a message to the JS window and execute optional callbacks upon receiving a response from the JS
  // Use astilectron.onMessage method to capture those messages in JS