From 0213a6717074bb98ad6ede4a653be5b5448df064 Mon Sep 17 00:00:00 2001 From: Johan Girod Date: Fri, 10 Aug 2018 12:57:18 +0200 Subject: [PATCH] =?UTF-8?q?:bug:=20R=C3=A9pare=20l'integration=20de=20l'if?= =?UTF-8?q?rame=20sur=20IE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/sites/embauche.gouv.fr/iframe-script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/sites/embauche.gouv.fr/iframe-script.js b/source/sites/embauche.gouv.fr/iframe-script.js index acf89ed9f..6e01c54c8 100644 --- a/source/sites/embauche.gouv.fr/iframe-script.js +++ b/source/sites/embauche.gouv.fr/iframe-script.js @@ -1,5 +1,5 @@ +import { forEachObjIndexed } from 'ramda'; -// Get the "couleur" parameter passed to this script let script = document.getElementById('script-simulateur-embauche'), couleur = script.dataset.couleur, baseUrl = script.dataset.iframeUrl || script.getAttribute('src').split('dist')[0], @@ -16,7 +16,7 @@ const iframeAttributes = { webkitallowfullscreen: true, mozallowfullscreen: true } -Object.entries(iframeAttributes).forEach(([key, value]) => iframe.setAttribute(key, value)); +forEachObjIndexed((value, key) => iframe.setAttribute(key, value), iframeAttributes) script.replaceWith(iframe, null);