Ext.get and Ext.getCmp can get JsObject as param

master
inpos 2018-08-09 19:01:14 +03:00
parent 7cba50300a
commit 43a41f577f
1 changed files with 4 additions and 0 deletions

View File

@ -27,9 +27,13 @@ def createByAlias(alias, args={}):
return _create('createByAlias', alias, args)
def get(id):
if isinstance(id, js.JsObject):
id = id._id
return js.JsNode('Ext.get(\'%s\')' % id)
def getCmp(id):
if isinstance(id, js.JsObject):
id = id._id
return js.JsNode('Ext.getCmp(\'%s\')' % id)
def getBody():
return js.JsNode('Ext.getBody()')