JSFiddle - React, Tailwind, and code Playground
by codef0rmer
HTML
<span id='barfoo'>clientX and Y</span>
<div id='foobar'>
<img src="http://b.dryicons.com/files/graphics_previews/wallpaper_pattern.jpg" alt="" width="400" />
</div>
<div style='position:absolute;left:100px;top:100px;font-size:30px;'>Click this word</div>
<div style='position:absolute;left:100px;top:140px;font-size:30px;'>And drag the finger</div>
CSS
body * {
-ms-touch-action: none;
-ms-user-select: none !important;
}
div#foobar {
width: 200px;
height: 200px;
background: gray;
}
JavaScript
document.getElementById('body').addEventListener('MSPointerMove', function(e) {
document.getElementById('barfoo').innerHTML = e.clientX + ' ' + e.clientY;
});