projects
/
Plinn.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9bd0dc7
)
Ajout attribut html5 fictif 'classList' pour qu'IE8 arrête de faire chier.
author
Benoît Pin
<pin@cri.ensmp.fr>
Wed, 9 Jul 2014 11:39:25 +0000
(13:39 +0200)
committer
Benoît Pin
<pin@cri.ensmp.fr>
Wed, 9 Jul 2014 11:39:25 +0000
(13:39 +0200)
skins/ajax_scripts/javascript_events_api.js
patch
|
blob
|
history
diff --git
a/skins/ajax_scripts/javascript_events_api.js
b/skins/ajax_scripts/javascript_events_api.js
index
bff4300
..
127ac6f
100644
(file)
--- 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)
*/
* 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(){};
var copyPrototype; // (descendant, parent) lightwheight javascript inheritance
if (!history.pushState) {
history.pushState = function(){};
@@
-222,9
+223,19
@@
function _build_clearSelection() {
}
}
}
}
-
buildMetaFunctions();
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;
var ELEMENT_NODE = 1;
var TEXT_NODE = 3;
var _setAttribute;