Skip to content

Commit

Permalink
Fix compatibility to IE8
Browse files Browse the repository at this point in the history
Thanks @ jfprevot (http://stackoverflow.com/users/4713246/jfprevot) for
the bug report. See http://stackoverflow.com/q/35776821/315935 for more
details.
  • Loading branch information
OlegKi committed Mar 3, 2016
1 parent 629d16f commit 640cde1
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 68 deletions.
10 changes: 8 additions & 2 deletions js/jquery.fmatter.js
Expand Up @@ -89,7 +89,8 @@
no: no
};
},
YesObject = Object.create(null, {
// http://jsperf.com/regex-vs-indexof-vs-in/12
/*YesObject = Object.create(null, {
1: { value: 1 },
x: { value: 1 },
"true": { value: 1 },
Expand All @@ -101,7 +102,12 @@
"false": { value: 1 },
no: { value: 1 },
off: { value: 1 }
});
});*/
// one can use typeof Object.create != "function" and use either
// Object.create or simple object firm, but the performance differences
// are so low, that the compatibility to IE8 is more important
YesObject = { 1: 1, x: 1, "true": 1, yes: 1, on: 1 },
NoObject = { 0: 1, "false": 1, no: 1, off: 1 };
$.extend(true, jgrid, {
formatter: { // setting common formatter settings, which are independent from the language and locale
date: {
Expand Down

0 comments on commit 640cde1

Please sign in to comment.