User Agent: Mozilla/5.0 (Windows NT 5.1; rv:10.0.2) Gecko/20100101 Firefox/10.0.2 Build ID: 20120215223356 Steps to reproduce: i encounter a problem in dev recently: i need to do some tricks on text string in html dom document -- i need to select a sentence intelligently within a text string currently i parse the document tree & contruct a series of Range objects & and then `surroundContents` with a <span> element and bind events on these <span>'s using `surroundContents` API sometimes, call to `surroundContents` may fail accounding to W3C Range API spec My question is, why cannot just addEventListener on W3C Range objects, so that i do NOT need to insert extra <span> elements to modify the DOM tree? Actual results: This is feature request. Expected results: This is feature request.
Also, wouldn't it be nice if we can simply make a Range object highlight-able? Selection highlight currently seems to be browser internal default behavour.
Attachment #604298 - Attachment mime type: text/plain → text/html
Severity: normal → enhancement
Component: Untriaged → DOM
OS: Windows XP → All
Product: Firefox → Core
QA Contact: untriaged → general
Hardware: x86 → All
Version: 10 Branch → Trunk
If you want to change standardized DOM APIs, please file bugs on W3C https://www.w3.org/Bugs/Public/
Status: UNCONFIRMED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → INVALID
Verified. This would be in violation of the spec: <https://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html>
Status: RESOLVED → VERIFIED
sorry, i didn't see any `violation ` this is a feature enhancement, not a `change` to W3C DOM spec, btw, a multiline <span> will internally contain render-elements for each line, these are NOT parts of DOM tree, so as to Range, which should also be possible to implement event listener using some internal sync-shadow fragment nodes. This can also make web dev more easier, -- Hey, if one says Mozilla/Firefox MUST fully obey the W3C spec and any feature enhancement needs will be ignored, then W3C obeys whom? That saying would be irresponsible doubtly.
You need to log in before you can comment on or make changes to this bug.