On Jul 10, 2012 10:03 AM, "Daniel Gonzalez" <gonva...@gmail.com> wrote: > > The problem is that I get the following error: > > Uncaught TypeError: Object [object HTMLDivElement] has no method 'add' > > How can I recreate a <div> structure in pyjs?
I've mentioned this already, but part of your issues is trying to interact with DOM as if you were in JavaScript ... _every_ DOM operation _must_ pass thru DOM.py. Every. Single. One. :-) Don't ever ever [ever] do this: div.setAttribute(...) div.appendChild(div2, ...) ... you MUST: DOM.setAttribute(div, ...) DOM.appendChild(div, div2, ...) ... remember, these objects are foreign, black box entities: ie, not python! they have no public attributes, methods, or annotations of any kind, whatsoever. You have only ONE tool available, that which created them ... DOM.py. -- C Anthony