mardi 21 mars 2017

Supporting user-made javascript plugin in web app

I would like to let my users write JavaScript plugins for my web app. I intend to let my users write JavaScript plugins right in the browser or let them upload a js file. Think of it as greasemonkey but built in and shareable among users.

I'm not sure how to execute the plugins enabled by a logged in user... If I inject into my html's head, what is gonna happen if the code is buggy or outdated? Will my entire app just stop working? Can I prevent this somehow? I've looked into JsInterpreter which is a js interpreter written in js but I would like something a little bit speedier. Is there a way to eval() js code and catch errors?




Aucun commentaire:

Enregistrer un commentaire