# dom.position **Repository Path**: mirrors_defunctzombie/dom.position ## Basic Information - **Project Name**: dom.position - **Description**: dom position functions - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-09-24 - **Last Updated**: 2026-02-22 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # dom.position get the coordinates of the element relative to the document ## examples mouse coordinates inside of an element ```js var pos = require('dom.position'); div.addEventListener('mouseclick', function(ev) { var ppos = pos(ev.currentTarget); var x = ev.clientX - ppos.left; var y = ev.clientY - ppos.top; // coordinates {x,y} are relative to the click container }); ```