};

        iframe.srcdoc = `
\u003cscript src="gamepad-helper.js"\u003e\u003c/script\u003e
\u003cscript\u003e
    window.onmessage = async ({ data }) => {
        switch (data) {
        case 'getGamepads':
            window.parent.postMessage(getStringifiedGamepads(), '*');
            break;
        default:
            break;
        }
    };
\u003c/script\u003e`;

        document.body.appendChild(iframe);
    });
</script>
