Вопрос

I am working on a JS application that needs to support IE8. To check my source, I am using JSLint. Works fine so far, unfortunately it allows functions like "bind()", which are not supported by IE8.

Is there a way to "tighten up" JSLint, so that it doesn't allow source that wouldn't run in IE8?

Это было полезно?

Решение

I'm not sure about JSLint, you can view the available options here.

Using JSHint however, you could use the //jshint es3:true option to

[...] tell JSHint that your code needs to adhere to ECMAScript 3 specification. Use this option if you need your program to be executable in older browsers—such as Internet Explorer 6/7/8/9—and other legacy JavaScript environments.

as described in the documentation

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top