asvd / jailed

execute untrusted code with custom permissions
MIT License
1.01k stars 69 forks source link

Write code without application.remote #49

Open vBoykoGit opened 5 years ago

vBoykoGit commented 5 years ago

How can I write clean code without 'application.remote.'? I don't want write like that: var code = "application.remote.alert('Hello from the plugin!');"; I need this clean code: var code = "alert('Hello from the plugin!');"; So can i write wihtout 'application.remote.' or can i add it in runtime?

alijaya commented 4 years ago

interested in this one too

alijaya commented 4 years ago

I just use this one quick hack... just add this to the plugin code

for (const props in application.remote) {
  eval(`var ${props} = application.remote.${props}`)
}