Add alert function to js module
parent
2909a53756
commit
1650c0da18
|
@ -161,14 +161,14 @@ class JsObject(object):
|
|||
write('%s.%s = %s' % (self._id, attr, json.dumps(value)))
|
||||
self._js[attr] = value
|
||||
|
||||
def alert(msg):
|
||||
write(client.alert(msg))
|
||||
|
||||
def load(filename, klass=JsObject):
|
||||
return klass(**json.load(open(filename)))
|
||||
|
||||
cli = client = JsClient()
|
||||
|
||||
def call(self, *args):
|
||||
print('call')
|
||||
|
||||
if __name__ == '__main__':
|
||||
class MyManager(JsManager):
|
||||
def write(self, code):
|
||||
|
|
Loading…
Reference in New Issue