Created
May 4, 2017 04:42
-
-
Save freshyill/b9d7e1ca2ec9a2d48b872af311a9fc76 to your computer and use it in GitHub Desktop.
Pym.js test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Child</title> | |
| <style media="screen"> | |
| #child { | |
| color: fuchsia; | |
| font-weight: bold; | |
| font-family: Arial; | |
| /* padding: 1rem; */ | |
| /* font-size: 3em; */ | |
| } | |
| html, body { width:auto; height:auto; } | |
| </style> | |
| </head> | |
| <body> | |
| <div id="child"></div> | |
| <script> | |
| //published | |
| window.TrivluQuiz = window.TrivluQuiz || { | |
| onReady: function() { | |
| TrivluQuiz.init({ | |
| accessKey: "5456f0906e521868a2b493a3", //key used by service subscriber to authenticate use of app | |
| id: "5881b10e4d7c0e876381fa13", //unique ID for identifying app | |
| version: "1.0", //version of the TrivluQuiz being used | |
| target: "#child", //DOM element where quiz will be inserted | |
| }); | |
| } | |
| }; | |
| </script> | |
| <script type="text/javascript" src="http://embed.trivlu.com/quiz/js/app.min.js"></script> | |
| <script type="text/javascript" src="https://pym.nprapps.org/pym.v1.min.js"></script> | |
| <script> | |
| const pymChild = new pym.Child({ polling: 1000 }); | |
| </script> | |
| </body> | |
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Testing Pym.js</title> | |
| <style> | |
| .container { | |
| max-width: 700px; | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <h1>Parent</h1> | |
| <div class="container"> | |
| <div id="example"></div> | |
| </div> | |
| <script type="text/javascript" src="https://pym.nprapps.org/pym.v1.min.js"></script> | |
| <script> | |
| const pymParent = new pym.Parent('example', 'child.html', {}); | |
| </script> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment