remote-js icon indicating copy to clipboard operation
remote-js copied to clipboard

#9 execute js from file on client

Open pavelpower opened this issue 10 years ago • 6 comments

pavelpower avatar Jan 14 '15 15:01 pavelpower

Hi @pavelpower,

Thanks for the fixes, and I like the idea of running a JS file.

Some questions before merging:

  • What's the commit "added .idea to .gitignore" about? can it be removed?
  • You can change commit messages so issues are closed automatically once they are merged. See: https://help.github.com/articles/closing-issues-via-commit-messages/
  • Have you checked what happens if the file you are loading contains invalid JS?

Also, regarding running a file: do you think it would be useful to specify a file that has to be removed as soon as a client is connected? That might make the debugging workflow with external files more seamless.

What do you think?

Thanks! Ernesto

ernesto-jimenez avatar Jan 14 '15 16:01 ernesto-jimenez

about .idea - yep, you can remove this commit, .idea - it is folder with index for all IDE from JetBrains I used WebStorm

pavelpower avatar Jan 14 '15 17:01 pavelpower

  • Have you checked what happens if the file you are loading contains invalid JS? - yep, the console return the error.

pavelpower avatar Jan 14 '15 17:01 pavelpower

"do you think it would be useful to specify a file that has to be removed as soon as a client is connected?" I don't think it will be a good solution." - I don't think it will be a good solution. Because the use of files with the finished code is good to use for debugging. No need to write a lot of code in the console.

pavelpower avatar Jan 14 '15 17:01 pavelpower

I still think about the task which will return stack errors to debug.

try {
... execute
} catch(err) {
  sendError({
      msg: err.message,
      stack: err.stack
   })
}

pavelpower avatar Jan 14 '15 18:01 pavelpower

try used resolve in commit message, not work :(

pavelpower avatar Jan 14 '15 18:01 pavelpower