Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    May 2004
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    dt.nodeName =span in gecko 1.7?

    hi,

    my dts are telling me that they are spans in gecko (mozilla 1.7 and firefox)

    var adtnotaspan = document.getElementsByTagName('dt')[0].;

    alert(adtnotaspan) shows objectHTMLSpanElement


    is this my stupidity or the browsers?
    Last edited by david_currey; 05-09-2004 at 09:35 PM. Reason: wrong posting

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Posts
    338
    Thanks
    0
    Thanked 0 Times in 0 Posts
    In my browser (Firefox 0.8), it alerts 'DT'...

    Happy coding!

  • #3
    Master Coder
    Join Date
    Feb 2003
    Location
    Umeå, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    Well, you could argue that Mozilla is wrong here. That should be [object HTMLElement], not [object HTMLSpanElement]. However, the DOM wastes no interface for alike elements, but Mozilla might just have to. The elements span and dt are practically the same, though. Neither one of them adds something over the other. So, I'm not surprised they clumped them together in one object.

    Note that op7.50 does exactly as the DOM specifies and returns [object HTMLElement].

    Anyway, the DOM does allow for extending from the part of user agents, and there is really nothing that says that the DOM interfaces should be implemented as objects and prototypes, so you should be glad it tells you anything at all about the object.
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •