Webportal v1

embedded apps

API Reference - WebPortal.notification.evt.show

WebPortal.notification.evt.show

Type Event

WebPortal.notification.evt.show

Description This event is triggered when an Notification Center (NC) Notification is opened. It can be triggered when the user select the OK button in a prompt popup or by browsing the Notification Center App in the infotainment system. A WebPortal Notification is always create using WebPortal.notification.new. Check out the dedicated tutorial.
Type event message.
Output Data Type Description
type String WebPortal.notification.evt.show
notifId String Id of the notification

Example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
window.addEventListener("message", function(event){
  
  if (typeof event.data !== 'undefined' && typeof event.data.type !== 'undefined' ){

    var data = event.data;
    var type = event.data.type;

    switch(type){

      // When the a NC Notification is opened
      case "WebPortal.notification.evt.show":
        console.log("[WebPortal Notification] The NC Notification has been opened.");
        console.log("[WebPortal Notification] ID:" + data.notifId +);
        break;

    }
  }
});

See Also