Please post some of your code (or a simplified test case). It is
not clear (to me) from your description exactly what your code is
doing.
John.
Praki Prakash wrote:
>
> I hope this makes sense to someone.
>
> I am passing a XULElement as an argument to a XPConnect wrapped Java script
> method(nsIDocHandler::attach. It is a component implemented in Javascript)
> When I invoke any method (even getAttribute) on the argument, the method
> received, I get the following error.
>
> * Call to xpconnect wrapped JSObject produced this error: *
> [Exception... "'[JavaScript Error: "e.getAttribute is not a function" {file:
> "e:\mozilla\dist\win32_d.obj\bin\components\nsDocHandler.js" line: 53}]'
> when calling method: [nsIDocHandler::attach]" nsresult: "0x80570021
> (NS_ERROR_XPC_JAVASCR
> IPT_ERROR_WITH_DETAILS)" location: "JS frame ::
> chrome://makara/content/ContentArea.js :: anonymous :: line 57" data: yes]
> ************************************************************
> [Exception... "'[JavaScript Error: "e.getAttribute is not a function" {file:
> "e:\mozilla\dist\win32_d.obj\bin\components\nsDocHandler.js" line: 53}]'
> when calling method: [nsIDocHandler::attach]" nsresult: "0x80570021
> (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)" location: "JS frame ::
> chrome://makara/content/ContentArea.js :: anonymous :: line 57" data: yes]
>
> I am at a complete loss as to what is happening. All I can see in the
> javascript interpreter is that at the time this error is reported, the
> interpreter is expecting the callee to be an object and it is not. I can
> invoke the same getAttribute method at the call site just fine. dump on the
> argument displays the object class to be XULElement as expected.
>
> Any insight into what is happening? Are components implemented in Javascript
> second class citizens?
>
> Thanks, Praki