views:

39

answers:

2

Just as we have snippet compiler to test a C# code quickly, I can also do the same for javascript in chrome debugger tools and Firebug (firefox).

I would be more interested in a tool or some online tool which can run a small piece of javascript and tell if it properly runs in prominent browsers and the result.

UPDATE:
I'm a developer and not tester. I don't want to install all browsers on my PC. I like chrome and I can debug/test (for syntax/result) almost every javascript quickly in chrome by just clicking Ctrl+Shift+J and pasting my javascript in its console. But that will just test if it works in chrome. I'm not interested in creating a library right now. Google and Stackoverflow helps me get the greatest and latest javascript for a specific task very quickly.

A: 

You can easily make a test page to house your snippets, then try them in your target browsers. That has the added advantage of providing a central library for the snippets you do create, so you don't have to go hunting through entire directories looking for that cool little widget you created back in 2010.

Robusto
Good Idea. But I don't want to install firefox/opera/safari etc just for this.
Ismail
@Ismail: Nota Bene: If you're doing web development you should have them all installed anyway. Sad, but true.
Robusto
Testing is done by testers. We have separate CSS designers. I just work on logic part. Do you still think I should have them all?
Ismail
@Ismail: If it's ever your responsibility to fix bugs cross-browser, it seems like a no-brainer to have the browsers in your arsenal. It's not like it costs you anything.
Robusto
Agreed! I will install it. I know that's only one of the solution for now. But will you agree that a small portable tool to test crossbrowser ability of a small snippet of javascript or a javascript function will help a lot (in terms of saving time and ease of verifying workability of their code) to not just me but all the web developers?
Ismail
A: 

I found one way. But it is not that quick and still would like to know better answer. May be some kind of tool which can do this.

One Way:-
Write your javascript enclosed in try-catch block on JsBin and create its public link. Now check your link with BrowserShots.

Write considerable amount of html (conditionally) using javascript to be able to see the difference on Images given by BrowserShots.

Ismail