Are event.pageX and event.pageY safe?

I am currently developing a web app that implements drag and drop and I need to get the YPosition where the item is dropped. This works fine using event.clientX and event.clientY until scollbars appear on the screen, at which time they don't account for the amount of free space.

There are also properties event.pageX and event.pageY that contain this information, but the Mozilla page stated that they should not be the same they are not standardized.

enter image description here

From looking at Jack Moore's blog post, it looks like these properties might be part of a W3C working draft, which might be this standards document .

I tested my solution in IE11, Firefox and Chrome and it works in all browsers, but I was curious to know if pagesX and pageY are safe to use in a production web application?

+3


source to share


1 answer


If you don't need IE8 support, you'll be fine using it.



+2


source







All Articles