Advertisement
Guest User

Listener Callback Test

a guest
Aug 9th, 2015
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE html>
  2. <html>
  3.     <head>
  4.         <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  5.         <title>Demo app</title>
  6.     </head>
  7.  
  8.     <body>
  9.         <h1>Hello, world!</h1>
  10.        
  11.         <script>
  12.             overwolf.games.getRunningGameInfo(
  13.                 function(value) {
  14.                     console.log(value);
  15.                 }
  16.             );
  17.            
  18.             overwolf.games.events.onNewEvents.addListener(
  19.                 function (value) {
  20.                     console.log(value);
  21.                     alert("onNewEvent called!");
  22.                 }
  23.             );
  24.            
  25.             overwolf.games.events.onInfoUpdates.addListener(
  26.                 function (value) {
  27.                     console.log(value);
  28.                     alert("onInfoUpdates called!");
  29.                 }
  30.             );
  31.            
  32.             overwolf.games.events.onError.addListener(
  33.                 function (value) {
  34.                     console.log(value);
  35.                     alert("onError called!");
  36.                 }
  37.             );
  38.         </script>
  39.     </body>
  40. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement