🐛 Répare l'integration de l'iframe sur IE

pull/299/head
Johan Girod 2018-08-10 12:57:18 +02:00
parent 68e0c72c6b
commit 0213a67170
1 changed files with 2 additions and 2 deletions

View File

@ -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);