1
0
mirror of https://github.com/DataTables/DataTables.git synced 2025-01-30 23:52:11 +01:00

Dev: Don't syntax highlight in IE6/7 as it slows them down hugely

This commit is contained in:
Allan Jardine 2015-04-30 14:01:36 +01:00
parent 5484fdaec3
commit bf0b4d0a42
2 changed files with 8 additions and 1 deletions

View File

@ -1 +1 @@
95edc5a4c02c6d7a55ca037d08220ca4f276976c
a4e87505aa6087ba76eb5821e76304b7cf78ebf7

View File

@ -302,6 +302,13 @@ var sh = {
*/
highlight: function(globalParams, element)
{
// Don't run the syntax highlighter on IE6/7 as it absolutely kills
// performance
var userAgent = navigator.appVersion;
if (userAgent.indexOf("MSIE 7.") !== -1 || userAgent.indexOf("MSIE 6.") !== -1) {
return;
}
var elements = this.findElements(globalParams, element),
propertyName = 'innerHTML',
highlighter = null,