Microsoft Internet Explore does not support CSS3 Pointer-events:none; Provides a Mselementfrompointer/mselementfromrect method

Source: Internet
Author: User
Tags object model
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 >  


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.