Duh! Changed the idl parameter type to nsIDOMXULElement and works as
expected. Thanks a bunch.
Praki
"John Bandhauer" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Your idl declares 'attach' as a method that takes a string param.
> That means that your call
> dh.attach(document.getElementById('t1')); will convert
> document.getElementById('t1') to a string and your 'attach' impl
> then tries to call the equivelent of "foo".getAttribute('id').
> You can see why that wouldn't work. It looks to me like you can
> just fix your idl to declare the correct interface type for the
> param to 'attach' and you should see something more like what you
> expect.
>
> John.