Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
breakoutModewide
languagehtml
<html>
    <body>
        <script type="application/javascript">
            window.addEventListener("message", messageListener, false);
            function messageListener(event) {
                if (event.data.search(/consent-callback/) >= 0) {
                    const urlback = event.data.replace(/.*consent-callback\/([^"]*).*/, '$1');
                    window.location.assign(urlback);
                }
            }
        </script>
        <iframe src="<?php echo getFormUrl(getToken()) ?>" width="100%" title="Consent iFrame" id="consent"></iframe>
    </body>
</html>

Références

...

Code source

Retrouvez une version plus complète de ce code sur github : https://github.com/fairandsmart/consent-iframe-integration-test

Références