Whats the difference between a DISPHTMLUListElement and HTMLUListElement?

57 views Asked by At

we have an asp.net Winforms application which is approaching almost 10 years of age, and has some mixture of technologies being used within (and coded at large my people no longer working at my company).

To be able to run in IE10 / 11 (let alone other browsers), we need to run in compatibility mode, and the time has come to try and at least make a start to fix the issues.

One of the first problems I come across is to do with is asp:Repeater that is used something like...

<asp:Repeater ID="MyRepeater" runat="server"    
    OnItemDataBound="MyRepeater_ItemDataBound" >
   <HeaderTemplate>
       <ul class="MyHeader" >
    </HeaderTemplate>
    <ItemTemplate>
    ....
    <ItemTemplate>

There is some code that accesses this DOM element..

var list = helper.getElementByClassName(this.get_hostElement(), 'MyHeader', 'ul');

Without worrying about what is inside of the above calls (yet), the end result is that when in compatibility mode, if we look at the result if 'list' in the IE debugger, I can see..

[object DISPHTMLUListElement]

and when with no compatibility mode, the result is

[object HTMLUListElement]

From there it goes down hill, the child elements of of different types (they also differing this DISP prefix), and we have other access functions failing (objects with missing properties/functions etc)

The question initial question here is does anyone know the difference between the DISPHTMLUListElement and HTMLUListElement objects returned?

Thanks in advance for any help!

1

There are 1 answers

0
Supersharp On

First one is an XHTML (aka HTML 4.0) element (quirk mode) ; Last one is an HTML5 element introduced with IE 9, with more standard features (edge mode).

You can force one or the other mode if you want.