UNPKG

@gobistories/gobi-web-integration

Version:

This library will let you put your Gobi stories on your site.

55 lines (48 loc) 1.42 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <title>Gobi - Web Integration test</title> <script type="text/javascript" src="/dist/run-config.js"></script> <style> #outer-container { display: flex; width: 5000px; height: 200px; overflow: scroll; } #click-container, #touch-container { display: flex; align-items: center; justify-content: center; width: 200px; height: 200px; margin-right: 20px; background-color: gold; cursor: pointer; } #touch-container { background-color: cadetblue; } </style> <script type="text/javascript" src="../index.js?v=d85e77"></script></head> <body> <p>This page can be used to test click and touchstart events. For example you can test if events are fired when the page is overscrolled, or content is scrolling.</p> <p>When an event is fired, an alert will be shown.</p> <div id="outer-container"> <div id="click-container"> Click me! </div> <div id="touch-container"> Touch me! </div> </div> <script> document.querySelector("#click-container").addEventListener("click", () => alert("Got click")); document.querySelector("#touch-container").addEventListener("touchstart", () => alert("Got touch")); </script> </body> </html>