Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a number of ECMA-5-isms in the test runner
We do still support IE7/8. Also removes some non-CodeMirror-code-style things like left-aligned commas and semicolons.
- Loading branch information
Showing
2 changed files
with
27 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cab9417
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@marijnh Indentation is off a bit on line 60/61, if you wanted to fix.
Also, I knew the indexOf() calls may cause an issue in some browsers, but you seem to use it quite a bit in
lib/codemirror.js
, so I thought it was fine (e.g. inonKeyPress()
,skipTo()
,match()
, etc). But, if it's not, you may want to consider using this code instead (pulled from Array indexOf method | MDN):cab9417
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's on strings. ECMA 3 defines
indexOf
on strings but not on arrays.I don't think it'd be a very good idea for a library to pollute standard prototypes. In the test driver, it would be less of an issue, but still, I'd rather not.
cab9417
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Learn something new every day. Thanks!