Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(8)  |  Call(8)  |  Derive(0)  |  Import(0)
Declares a javascript function.
    

src/p/y/pyojo-0.0.2/src/examples/TEST/srv/pyojo/gui_tree_js.py   pyojo(Download)
    newpanel.add("TABS")
    newpanel.select("TABS")
    newpanel.connect(onLoad=js.Function("sh_highlightDocument();"))
 
    onload = js.Function('result', 
             ])            
 
    onclick = js.Function("item", 
              ["status('Loading '+item.name + ' ' + item.ctype+ ' ...');",                  
               newpanel,

src/p/y/pyojo-0.0.2/src/pyojo/js/lib/tree.py   pyojo(Download)
class TreeJSON(js.Block):
    """ A tree widget for JSON data.
    """
    _z = js.Function("fullObject", 
                     "return fullObject.children;")
 
    getChildren = js.Function("object", 
                              "return this.get(object.id).then(%s);" % _z)
 
    getRoot = js.Function("onItem", 
                          "this.store.get('root').then(onItem);")
 
    mayHaveChildren = js.Function("object", 
                                  "return 'children' in object;")
 

src/p/y/pyojo-0.0.2/src/pyojo/tests/basic/test_js.py   pyojo(Download)
                         "function() {function() {}}")
 
        func = js.Function()
        self.assertEqual(js.Function([func, func]).code(), 
                         "function() {"+func.code()*2+"}")