From: Benoît Pin Date: Wed, 13 Aug 2014 16:23:52 +0000 (+0200) Subject: Element n'existe pas dans IE <=7.Element n'existe pas dans IE <=7 X-Git-Url: https://scm.cri.ensmp.fr/git/Plinn.git/commitdiff_plain/47c592d60c4673c0dd7ad36b579a7aa47a87529c?ds=inline;hp=558758391ea0565e9a8c1adcf22e3ed38eb13c39 Element n'existe pas dans IE <=7.Element n'existe pas dans IE <=7 --- diff --git a/skins/ajax_scripts/javascript_events_api.js b/skins/ajax_scripts/javascript_events_api.js index b93c583..2083018 100644 --- a/skins/ajax_scripts/javascript_events_api.js +++ b/skins/ajax_scripts/javascript_events_api.js @@ -255,11 +255,14 @@ buildMetaFunctions(); addListener(window, 'load', function(evt) { // html5 facade - if (!document.body.classList) { - var nop = function(){}; - var fakeDOMTokenList = {'length':0, 'item':nop, 'contains':nop, 'add':nop, 'remove':nop, 'toggle':nop}; - Element.prototype.classList = fakeDOMTokenList; + try { + if (!document.body.classList) { + var nop = function(){}; + var fakeDOMTokenList = {'length':0, 'item':nop, 'contains':nop, 'add':nop, 'remove':nop, 'toggle':nop}; + Element.prototype.classList = fakeDOMTokenList; + } } + catch (e) {} });