WebAPI/Inter App Communication Alt proposal: Difference between revisions

Jump to navigation Jump to search
Line 213: Line 213:
The user allows that connection and a system message is sent to the Music app. This app only wants to be controlled only by certified apps, so it checks for this kind of applications.
The user allows that connection and a system message is sent to the Music app. This app only wants to be controlled only by certified apps, so it checks for this kind of applications.


  navigator.setMessageHandler('connect', function(connectionRequest) {
  navigator.setMessageHandler('connection', function(connectionRequest) {
   if (connectionRequest.keyword !== 'musicremotecontrol') {
   if (connectionRequest.keyword !== 'musicremotecontrol') {
     return;
     return;
Confirmed users
110

edits

Navigation menu