online Javascript code evaluation tools [closed] - javascript

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
Do you have a favorite site or homegrown page in your toolbox to help you during development of your Javascript?
Something to help you:
validate
run
debug, inspect
unit test
Looking for somewhere to paste my JS into, click a Run button, and have it evaluate the statements. This might be for simple snippets for manipulation of numbers, strings, custom objects, etc.
ANSWER (since no answers before the question was closed actually address the requirements:
turb0js - lets you step through the code without having to open the browser's console and hunt for the right JavaScript file. Also allows adding an HTML description to the code snippet, and comments from other users. DOM and Console methods don't work.
jsbin with // noprotect at the beginning of the code, to enable debugging in the browser console
Non-answers: Codepen (can't debug due to its autorun on edit creating a new script); JSFiddle (no direct support for the browser console)

Give a look to JsBin it's a great online tool for collaborative JavaScript debugging...
You can easily incorporate the most popular JavaScript libraries, and you can even use it for Ajax Request Debugging...
Check the introductory videos...

jsfiddle.net is what you need

JSLint helps a lot for validating JS.
In terms of running/debugging, I use Firebug on Firefox, and Opera/Safari/IE8's built in JS debuggers. (None of these are online, but all are pretty powerful.) I think that Firebug Lite would make for a decent online JS debugger (in that it's a bookmarklet instead of a plugin or specific browser feature).

It's a Firefox extension, not an online service, but you should look into Firebug if you need to execute arbitrary JavaScript for debugging. Or Firebug Lite if you need support for other browsers.
If you're using a WebKit based browser, (Safari or Chrome), then you can use the Web Inspector. I think that IE 8 and Opera also have equivalent features.
If you need to run JavaScript from the command line, you can use SpiderMonkey directly; it has a JavaScript REPL that you can run.

You can run/debug javascript online with Overbyte

Related

Best Way to Display "Unsupported" Browser Message [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
We are working on a web application which only supports "modern" browsers (basically IE9 and up, and any other browser which has roughly the same amount of modern features).
Our web application will also work on mobile devices like tablets and smartphones.
Since this is a web application (as opposed to a normal website), we are okay with some users being left out in the cold for some of the advanced features which rely on modern features (i.e., older browsers).
However, we want to at least display a message letting them know.
We want to maintain basically two lists: "supported browsers" and "unsupported browsers", with a third implicit list "not supported browsers" (i.e., browsers that are on neither least).
If the browser was on the supported list, we wouldn't show anything.
If it is on the "unsupported" list, it will always show a message which says "This browser is unsupported, please upgrade blah blah".
If the browser is not in either, it will display a message (which can be almost-permanently dismissed) which says something like "This browser isn't tested directly against our site and some features may not function as intended. If you experience any issues, please report them blah blah".
Building this and what not isn't an issue. However, I was wondering if there was some site/service out there with an API that already did this sort of thing, or at least maintained lists of browsers which I could pull from. (If not, I just plan to use manual testing combined with info from sites like "Can I use..." and Modernizr).
Any ideas?
Poking around online all the resources I've looked at say that you should essentially never use browser detect. It's better to test for features you know DO NOT exist in the browsers you can't support instead of trying to look at the user-agent string.
http://www.quirksmode.org/js/support.html (If you want to know whether the browser that views your page supports certain objects you want to use in your code, you should never EVER use a browser detect. )
http://api.jquery.com/jQuery.support/ (Rather than using $.browser to detect the current user agent and alter the page presentation based on which browser is running, it is a good practice to use feature detection.)
So I think your approach with modernizer is probably the best.
You don't need a service.
The 'supported' list contains only those browser/device/OS combinations that you actually test.
The 'unsupported' list contains those browser/device/OS combinations that you know don't work (i.e, they failed your tests)
The 'might work' list is implicit as you've mentioned.

Eclipse Javascript Editor 2012 with full Outliner support [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
The reason for using an IDE is the comprehensive facilities it provides.
Therefore, I assume there is a Javascript editor for Eclipse that provides basic outliner-based IDE facilities such as:
Outliner with Object Literal support (which apparently is rare)
Intelligent Code Completion using Outliner data
Intelligent Code Highlighting using Outliner data, not just similar words
Inter-file scoping (#include "otherfile.js")
However, for Javascript, these features seem scattered across multiple editors:
Amateras Javascript Editor
+ Inter-file scoping (uses external files automatically from certain code constructs)
- No code highlighting
- No object literal outlining
Javascript Editor (Eclipse WDT JSDT)
+ Intelligent code highlighting for reads and writes
- No inter-file scoping
- No object literal outlining
Javascript Source Editor (Aptana plugin)
+ Object Literal is outlined fully
- Fake (similar word) code highlighting
- No inter-file scoping
Spket Javascript Editor
~ Object Literal is outlined partially
- Fake (similar word different vars) code highlighting
- No inter-file scoping
VJET Ebay Open Source Javascript Editor
- I can't get it to work, but it's supposed to be one of the better projects.
Javascript is a very popular language, and more and more frameworks such as ExtJS rely solely on JSON-like Object Notation.
Are there any Javascript editors for Eclipse that provide full Outliner-support? How else do these developers (e.g. for ExtJS) facilitate their Javascript development for modern frameworks?
Although lacking specifics, this is a good and popular question in general that is yet to be answered to satisfaction:
Javascript Editor '08
Javascript Editor '10
Note that devs depend on an IDE by preference and dependence on other Eclipse plugins such as the Chome Developer Tools and the V8 Debugger. Therefore, the scope of this question is Eclipse plugins only.
If you want the best JavaScript editor (not free) then go with PhpStrom from JetBrains
You can use one month trial and this will fulfill all your requirements.
If you want to go with open source then I would recommend you to go with Aptana.
Hope this solve your problem :)

Is there a tool to determine if my jQuery will run cross-browser? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
Recently, I discovered that Internet Explorer flat-out doesn't support certain selectors in jQuery (see Why can't Internet Explorer run this simple jQuery?). My question is: how can I know that my code will actually work while I'm writing it? Since I'm on Linux, my options are really just Chrome and Firefox. Is there a tool which emulates the functionality of major browsers for testing compatibility for a given site? My entire script mentioned in the above post failed for a few reasons but largely because the selector didn't get anything.
I initially thought that jQuery was cross-browser compliant, but it seems that selectors vary from browser to browser. Is there a way of testing for this?
Being a Linux user doesn't mean that you cannot use Internet Explorer. Create and start a Virtual Machine, such as VirtualBox, and simulate Windows + Internet Explorer.
The indexOf function has nothing to do with jQuery. It's an array function. The selectors work just fine, it's just that the code you're using to process the results is not cross-browser compatible.
Yea, cross-browser testing is simply a PITA. There's no real good way around it. As was mentioned, setting up virtual machines with various OS configurations is a good approach. However, there are several "cloud" services online that allow you to "rent" boxes you can TS into and debug. One such example I found with a quick Google search was: http://www.cloudtesting.com/
Though jQuery is a cross-platform library, it doesn't mean there doesn't exist bugs on certain browsers or certain versions of different browsers. jQuery is an open-source project, and if you find bugs in their platform you're welcome to fix them or at least report them so that they can be addressed.
For specific IE bugs, there are usually some work-arounds. For example, if Array doesn't support indexOf, you can always implement it yourself by modifying the Array.prototype
Good luck!
You can use browsershots to get a screenshot in a LOT of browers.
Sometimes you have to wait a long time before you get the screenshot, and the code has to accessible to any computer. But it's not like you are publishing it to everyone.
I know that sometimes, a screenshot wont cut it. But it is better than nothing.

Decent JavaScript IDE [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
What is a decent IDE for developing JavaScript, I'll be writing both client side stuff and writing for Rhino. Ideally It needs to run on Mac OSX, although something that runs on Windows too would be nice.
ADDITIONAL:
Having had a play with both js2 and Aptana, I think I'll be continuing to use Aptana. Mainly because I find emacs a bit hard to get my head round, although I did think that the error hi-lighting in js2 was better than that in Aptana.
I'm still looking for a way to visually debug my js code that is running atop Rhino...
Aptana IDE, absolutely. Stable, great syntax support for all the major javascript libraries, very good css and html editors. Also good support for php, air, ruby on rails and iPhone app development (I never tested this one).
Aptana can also connect to remote site via ftp (sftp in the pro edition) and to svn and cvs repositories.
It's based on Eclipse, so it's not exactly a lightweight application. But it's really, really good. You can also use it as an Eclipse plugin if you develop java wab app, but when I tested it in this version, about 1 year ago, it was not stable. Much better to use the standalone version.
If you're familiar with Emacs Steve Yegge's js2-mode could be worth a look.
Aptana Studio, both standalone and Eclipse plugin versions were quite ok last time I used them.
I have found the Spket Eclipse plugin very useful.
Take a look at WebStorm HTML/JavaScript Editor. It's lightweight and runs on MacOS. It supports debugging and running your code right from IDE and has very smart autocompletion capabilities for JavaScript both DOM-based and browser-based.
Komodo Edit/IDE is definitely the best IDE/editor (that I have used) for developing JavaScript.
Notable features include live error reporting, JavaScript macros and syntax auto-complete for ALL major frameworks!
If you have a very big application written in Javascript, there's only IntelliJ Idea. It parses multiple Javascript files and highlights not only syntax errors but undeclared variables and functions, allows to jump from function call to function definition, and more.
I've tried Emacs (because that's my favorite editor) and Komodo, and they don't come close. I guess it's the same for Eclipse.
Personally, I think that superior parsing and navigation abilties of Idea are only required when you're working with crappy undocumented code, otherwise I'd happily write the code in Emacs using js2-mode, but I'm working with huge poorly documented and buggy framework and it really helps to be able to jump to the source of the function or superclass to check how they work.

Recommendations for Javascript Editor on Windows? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Are there any good recommendations anyone can provide for a good Javascript editor on Windows?
I currently use combinations of FireBug and TextPad but would hate to miss out on the party if there are better options out there.
Thanks.
I know jsight already mentioned this, but Aptana Studio really is a great, free editor for JavaScript if you find yourself doing a lot of work with it - it has great support for most of the well-known libraries. If it were not for the fact that I work with C# in addition to JavaScript, I would use Aptana for all of my work.
I use NotePad++ and am happy (of course, that is when I am not using Visual Studio).
NotePad++ contains support for intellisense type feature as well.
(This is a cross-answer post)
Netbeans
I've tried out all of the above and my vote goes for Netbeans, which has been mentioned. However the answer didn't really sell you on the features which you can find here.
It has:
Intellisense including jQuery built in
Extended (Eclipse-style) documentation for functions
Function and field outlining
Code folding
Refactoring
It makes Visual Studio 2010's Javascript support look very primitive.
The Zeus editor has support for Java Script.
It has the stock standard set of features like code folding and syntax highlighting features etc, but more importantly Zeus is fully scriptable and Zeus scripts can be written in Java Script.
In case you're a .Net programmer: VS 2008 has pretty great JS support including intellisense on dynamically added methods/properties and comfortable debugging.
The best that I've ever used is Netbeans, although its kind of heavyweight for some tasks due to being a fullblown multi-language IDE (not just Javascript). I've also had pretty good experiences with Aptana IDE, though, and I hear that IntelliJ is good if you don't mind paying the price.
WebStorm. If you have used any Jetbrains products you'll love it. It has Autocomplete and all the other javascript goodies. Even node.js support is provided. Check it out
If you are using eclipse, then I would recomend JSEclipse
I'm still a huge fan of HomeSite, even though Adobe discontinued development in May 2009: http://www.adobe.com/products/homesite/.
Both NetBeans and Eclipse have JavaScript editing support. The latest version of NetBeans actually does a really good job. They are both free and you can use them for other languages as well, this way you have a chance to get to know the IDE and the shortcuts as well.
Komodo Ide or Komodo Edit of course.
Editra may be worth a look, the code colouring isn't bad, and I believe it has plugins to enable script execution.. Although I have not used this myself.
GVim is still awesome - not only for JavaScript for for almost all languages.

Categories

Resources