Closed
Bug 734315
Opened 12 years ago
Closed 12 years ago
Support addEventListener on W3C Range objects
Categories
(Core :: DOM: Core & HTML, enhancement)
Core
DOM: Core & HTML
Tracking
()
VERIFIED
INVALID
People
(Reporter: chenzx, Unassigned)
Details
Attachments
(1 file)
9.97 KB,
text/html
|
Details |
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.
Reporter | ||
Comment 1•12 years ago
|
||
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.
Reporter | ||
Comment 2•12 years ago
|
||
Updated•12 years ago
|
Attachment #604298 -
Attachment mime type: text/plain → text/html
Updated•12 years ago
|
Severity: normal → enhancement
Component: Untriaged → DOM
OS: Windows XP → All
Product: Firefox → Core
QA Contact: untriaged → general
Hardware: x86 → All
Version: 10 Branch → Trunk
Comment 3•12 years ago
|
||
If you want to change standardized DOM APIs, please file bugs on W3C https://www.w3.org/Bugs/Public/
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
Comment 4•12 years ago
|
||
Verified. This would be in violation of the spec: <https://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html>
Status: RESOLVED → VERIFIED
Reporter | ||
Comment 5•12 years ago
|
||
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.
Assignee | ||
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•