On 19.01.2004 18:14, Marc Portier wrote:

I ended up switching easily by not passing the DOM directly into the binding, but rather the root-node.

I tried ownerDocument() and get following exception:


"uncaught JavaScript exception: TypeError: [#document: null] is not a function."

isn't the full name getOwnerDocument()?

*ouch* Ok, it was a bad day after a bad sleep last night - my concentration was not that good today. My information source is http://xulplanet.com/references/elemref/ref_Node.html as it's a good overview of the DOM - unfortunately they mix properties and methods. I have to use either ownerDocument or your getOwnerDocument(), but not my mixture of both.


After understanding my problem even the error message makes sense to a certain extent: it interprets ownerDocument as property and adds the function call after it => #document is not a function.

Can you understand that this is why I hate JavaScript? Tooo much automagic. If a function ownerDocument() does not exist, it should tell me it and not try something else.

This has nothing to do with the immediate steps of loading and saving the model
as also a document.getDocumentElement().ownerDocument() in loadDocument() (where
I expect document again) results in the exception above. How did you save the
document back, Marc? Or do you or anybody else know why ownerDocument() fails?

euh, as you can see in the binding samples I didn't :-)

I thought you have some secret code on your disk :)


Joerg

Reply via email to