Closed robertothais closed 12 years ago
This works for me Internet Explorer 8.0.7601.17514 and Firefox 12.0 windows
After further testing
map.class('name').to('username');
Fails in IE as class is seen as a reserved word.
This is a separate issue but maybe it should be discussed as part of this IE8 Patch?
If plates.js is minified and variable names rewritten, IE 8 and below run into issues when instantiating a Mapper. It seems that if the variable that holds the constructor (re-written) and the constructor name itself differ, the methods in the prototype don't get copied into the instance. Solved by not using the function declaration style.
Using
string.charAt(i)
instead ofstring[i]
seems to help quite a bit in improving compatibility with IE 7. The semantics of the bracket notation and charAt should be identical in browsers that support brackets. The performance of both is comparable, except for Firefox 9+ where charAt is substantially faster.http://jsperf.com/string-charat-vs-bracket-notation