The main difference between the two pages is the method of sending messages. Recieving messages is the same in both.
Send messages to iframe using iframeEl.contentWindow.postMessage
Recieve messages using window.addEventListener('message')
form.machine | |
input(type="checkbox",id="fire",name="fire",value="fire") | |
button.machine__btn(type="button",aria-labelledby="left-btn",ontouchstart="") | |
span.left-arrow | |
span.sr(id="left-btn")="Left" | |
button.machine__btn(type="button",aria-labelledby="right-btn",ontouchstart="") | |
span.right-arrow | |
span.sr(id="right-btn")="Right" | |
button.machine__btn(type="button",aria-labelledby="up-btn",ontouchstart="") | |
span.up-arrow |
(function (context, trackingId, options) { | |
const history = context.history; | |
const doc = document; | |
const nav = navigator || {}; | |
const storage = localStorage; | |
const encode = encodeURIComponent; | |
const pushState = history.pushState; | |
const typeException = 'exception'; | |
const generateId = () => Math.random().toString(36); | |
const getId = () => { |