Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- </head>
- <body>
- <script src="iframeapi.js"></script>
- <script>
- // The event emitted when everything is loaded
- OSjs.on('init', function() {
- console.log(arguments);
- // Send something
- OSjs.send({cool: 'Awesome'});
- });
- // The event emitted when app is closed
- OSjs.on('destroy', function() {
- });
- // Whenever you get data without `message` parameter
- OSjs.on('data', function(data) {
- console.log(data.zazz); // === "jazz"
- });
- // Whenever you get data with `message` set
- OSjs.on('message:something', function(data) {
- console.log(data.bar); // === "baz"
- });
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement