From f4fc9ed779ba87bd6ed11ee48fd84b920f9de30c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Benoi=CC=82t=20Pin?= Date: Wed, 9 Jul 2014 13:39:25 +0200 Subject: [PATCH] =?utf8?q?Ajout=20attribut=20html5=20fictif=20'classList'?= =?utf8?q?=20pour=20qu'IE8=20arr=C3=AAte=20de=20faire=20chier.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- skins/ajax_scripts/javascript_events_api.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/skins/ajax_scripts/javascript_events_api.js b/skins/ajax_scripts/javascript_events_api.js index bff4300..127ac6f 100644 --- a/skins/ajax_scripts/javascript_events_api.js +++ b/skins/ajax_scripts/javascript_events_api.js @@ -26,6 +26,7 @@ var getCopyOfNode; /* (node) returns a clone of the given node. * the node came from a foreign document (eg. XmlHttpRequest xml reponse) * to inject HMTL code inside tags where innerHtml is read only (IE) */ + var copyPrototype; // (descendant, parent) lightwheight javascript inheritance if (!history.pushState) { history.pushState = function(){}; @@ -222,9 +223,19 @@ function _build_clearSelection() { } } - 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; + } +}); + + + var ELEMENT_NODE = 1; var TEXT_NODE = 3; var _setAttribute; -- 2.20.1