Ejemplo n.º 1
0
 def execute(self, js):
     """executes javascript js in current context"""
     try:
         if not self.__started:
             code = translate_js(js)
             self.__started = True
         else:
             code = translate_js(js, '')
     except:
         dbg(js)
         raise
     dbg(code)
     #print code
     exec code in self.context
Ejemplo n.º 2
0
 def execute(self, js):
     """executes javascript js in current context"""
     try:
         if not self.__started:
             code = translate_js(js)
             self.__started = True
         else:
             code = translate_js(js, '')
     except:
         dbg(js)
         raise
     dbg(code)
     #print code
     exec code in self.context
Ejemplo n.º 3
0
 def execute(self, js):
     """executes javascript js in current context"""
     code = translate_js(js, '')
     exec code in self._context
Ejemplo n.º 4
0
 def execute(self, js):
     """executes javascript js in current context"""
     code = translate_js(js, '')
     exec code in self._context