Cannot open File as Chrome Snippet
Asked Answered
L

0

1

I am looking for a javascript testing tool, like LinqPad for C#. Chrome has snippets, which let you edit and test javascript, and that looks close. However I cannot Open an existing file. Ctrl+P should do it, but that just brings up this help-like dialog.

I would like to be able to edit and save these scripts. Any idea how to do so? Google's help is, as usual, not so helpful.

enter image description here

enter image description here

Lemmy answered 28/12, 2018 at 1:37 Comment(5)
What about an html page? Javascript in browser is meant to be ran from a document. Or are you testing code that should get executed in an other environment? Then a browser is not the best place to test it... And for saving your snippet right-click + save-as will do, while ctrl+P is meant to open a File that is loaded from the Document (and not as a Snippet, just in the Source visualizer)Diary
I am looking for a playground to test and run javascript. It looks like Chrome Snippets is supposed to fill this need. It's not really about HTML at all. But if I cannot load and save my files, that does not help too much.Lemmy
@DanielWilliams We are building something like this right now, but won't be ready for alpha testers for another month or so. Would this interest you? twitter.com/_MattWay/status/1070965320393707520Damson
You can save your snippets as files (right click your snippet's name in the left panel then save as), and yes it is about HTML since in a browser javascript is dependent of the DOM. Now, there are many js playground websites if you don't mind testing in a browser env, and there might also be for nodejs if you aim this environment. (repl.it does support nodejs too)Diary
@MattWay - yes this does look like what I'm seeking. Kind of like jsfiddle, but working locally.Lemmy

© 2022 - 2024 — McMap. All rights reserved.