Using JSLint in Java/GWT

巧了我就是萌 提交于 2019-12-11 14:02:44

问题


I'm currently working on a project in Java, that will allow users to type Javascript code into a GWT Widget. How would I go about importing/using JSLint to check for errors? I looked around and found LSLint4Java, but I couldn't find the way to import it into eclipse. I just need a simple JS error checker that will check a string for errors.

If anyone has any other suggestions for error checking, please share them! Thanks.


回答1:


The JSlint javascript source can be found here. You could include the javascript in your WAR, reference it with a script link in your page(s), and make JSNI calls from/to your GWT code.

Note that JSLint has a No Evil clause in it's license:

// The Software shall be used for Good, not Evil.

Here's a good start on JSNI.



来源:https://stackoverflow.com/questions/11440076/using-jslint-in-java-gwt

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!