cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <>
Subject Re: [Woody] observations, issues, questions, best practices
Date Mon, 19 Jan 2004 19:04:58 GMT
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 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 :)


View raw message