the Document Object model of the IE 10 Developer's GuideReproduced in: Http://blogs.ejb.cc/archives/3128/ie-10-developers-guide-document-object-models
The IE10 or Metro style application in the Windows Developer Preview contains many of the features of the new Document object model, including: Advanced hit test api-advanced Hit testing APIs Cssom floating-point value support-cssomfloating Point Value Support Media Query Listener-media Query Listeners Touch and gesture DOM event-pointer and gesture DOM Events Note: These features are in IE10 or using HTML
Metro style apps work the same way. The Advanced Click Test API IE10 and the Document Object Model (DOM) in Metro style applications support the elementFromPoint method, which returns the element at coordinates (X,Y) in a viewport (viewport). This method is still valid for a single element, such as clicking on a picture on the page.
However, for applications that use multiple layers, such as games and graphics editors, clicking on a screen doesn't get everything that intersects that point.
IE10 introduces the Mselementsfrompoint and Mselementsfromrect methods, which get all the elements that intersect the specified (x,y) or rectangular region, and return the list of nodes. The Mselementsfrompoint method Mselementsfrompoint the method with the coordinates of a point (x,y) as a parameter, returning all the set of ELEMENT nodes that intersect at that point.
The list is sorted in Z-order, which means that the first element is the topmost element.
Mselementsfrompoint (x, y) returns the list of ELEMENT nodes under a point (x,y) coordinate. The following example code creates some overlapping div blocks of different colors. When you click on one of these, the Mselementsfrompoint method gets all the elements of the click and turns the background color to gray.
Since all colors are returned, including body and HTML, we only change the background color of the elements that NodeName is Div. <! DOCTYPE HTML >