Open GoogleCodeExporter opened 9 years ago
Hi,
There was a long discussion about using Javascript objects in Brython on the
French forum. The solution that arose was a built-in function (currently called
JSObject, but the name may change) transforming a Javascript object into one
that can be used by Brython, ie with the __ methods
In your example you would use :
obj = JSObject(js_obj)
getElementsByName is currently not implemented, but you can do
x=JSObject(doc.getElementsByName('x'))
alert(x.length)
I leave the issue open, please reply if JSObject doesn't work as you expect.
The feature needs to be documented
Original comment by pierre.q...@gmail.com
on 28 Jan 2013 at 9:05
I will let you know if that works - while thinking on the issue, I had came
with this approach as a good solution.
If that works for me, I will add a patch for the English documentation here.
(sorry, can't help with French)
Original comment by gwid...@gmail.com
on 28 Jan 2013 at 9:35
Original issue reported on code.google.com by
gwid...@gmail.com
on 27 Jan 2013 at 2:54