Closed Bug 1429294 Opened 8 years ago Closed 8 years ago

浏览器dom文字的位置信息(坐标,宽高等)

Categories

(developer.mozilla.org Graveyard :: API, enhancement)

All
Other
enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: xieyi_maple, Unassigned)

Details

(Whiteboard: [specification][type:feature])

What problem would this feature solve? ====================================== 可以进行文字位置分析 Who has this problem? ===================== Registered users of MDN How do you know that the users identified above have this problem? ================================================================== 根据文字位置分析DOM结构 How are the users identified above solving this problem now? ============================================================ 根据文本节点父节点去计算位置信息 Do you have any suggestions for solving the problem? Please explain in detail. ============================================================================== 希望浏览器放出查找文字坐标的接口API Is there anything else we should know? ======================================
Thanks xieyi, this doesn't look like a security issue, so I'm dropping the security group. Google Translate is giving me: Browser dom text location information (coordinates, width, etc.) What problem would this feature solve? ====================================== Can be text position analysis Who has this problem? ===================== Registered users of MDN How do you know that the users identified above have this problem? ================================================== ================ Analyze DOM structure based on text position How are the users identified above solving this problem now? ================================================== ========== According to the text node parent node to calculate the location information Do you have any suggestions for solving the problem? Please explain in detail. ================================================== ============================= Hope that the browser release interface to find text coordinates API Is there anything else we should know? ======================================
Group: websites-security
xieyi, MDN documents web technologies and how browsers implement those technologies. MDN and Bugzilla are not the right place to propose new web technologies. The current APIs would allow you to get the location of a node containing text: https://stackoverflow.com/questions/442404/retrieve-the-position-x-y-of-an-html-element https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect http://javascript.info/coordinates There are also ways to calculate the size of text: https://stackoverflow.com/questions/118241/calculate-text-width-with-javascript I hope this helps you solve your problem.
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → INVALID
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.