Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

html5 mssenger

var messageEventHandler = function(event){
   
   // check that the origin is one we want.
   if(event.origin == 'https://www.tutorialspoint.com') {
      alert(event.data);
   }
}
window.addEventListener('message', messageEventHandler,false);
Source by www.tutorialspoint.com #
 
PREVIOUS NEXT
Tagged: #mssenger
ADD COMMENT
Topic
Name
2+6 =