I found the answer after I looked at pyjs translator. What you have to do to implement a built-in function is:
1. add your code to pyjs/builtin/pyjslib.py 2. add your function name to PYJSLIB_BUILTIN_FUNCTIONS in pyjs/translator_proto.py 3. check whether your code is correctly translated by running pyjs/translator.py I don't know why there are two different implementations mentioned above. Anyway my implementation of id() and vars() work correctly after doing the three steps. I will push the updated pyjs to GitHub after more tests. Thanks. -- --- You received this message because you are subscribed to the Google Groups "Pyjs.org Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to pyjs-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.