Closed
Bug 49511
Opened 24 years ago
Closed 24 years ago
Selection.toString() shouldn't need arguments
Categories
(Core :: DOM: Selection, defect, P4)
Tracking
()
RESOLVED
FIXED
M18
People
(Reporter: akkzilla, Assigned: akkzilla)
References
Details
(Whiteboard: [nsbeta3+])
When the toString() method was added to Selection.idl, it was added with
arguments. We talked about renaming this method, and making a toString() method
which did not require arguments since that's standard JS, but apparently this
never got done. It's been causing confusion among customers of selection and
should be fixed before release.
I propose making toString() with no arguments, and toStringWithType(mimeType,
flags, wrapColumn). jst, do you know of any reason not to do this? Anybody
want to propose a better name than toStringWithType?
Assignee | ||
Comment 1•24 years ago
|
||
nsbeta3. Not hard, and we don't want to ship it this way since people will
write JS that depends on it.
Comment 2•24 years ago
|
||
Just want to note that toString is called implicitly when you dump an
nsIDOMSelecition in JS, so it has to have no args.
Comment 4•24 years ago
|
||
PDT is downgrading this to beta3-minus.
Whiteboard: [nsbeta3+] → [nsbeta3-][minus]
Assignee | ||
Comment 5•24 years ago
|
||
Anyone who uses getSelection in javascript is going to run into this (we've
already had outside contributors hit it) and the fix is very straightforward.
Requesting reconsideration.
Whiteboard: [nsbeta3-][minus]
akkana, can you tell PDT how often this might happen? What user action may
cause this?
Whiteboard: [need info]
Assignee | ||
Comment 7•24 years ago
|
||
This isn't a user action issue: this is a content authoring issue. Any content
author or JS tester who tries to do anything in Javascript involving the
selection is likely to get bitten by this.
Comment 9•24 years ago
|
||
need to talk with sfraser and akkana
Comment 10•24 years ago
|
||
Akkana, I would like to make this minus, but move it to m19
Assignee | ||
Comment 11•24 years ago
|
||
Beth: Mike is already working on a bigger bug involving the Selection idl, which
will include this. So please don't make it minus.
Comment 12•24 years ago
|
||
which bug?
Comment 14•24 years ago
|
||
duh -- sfraser already told me -- sorry
i'll plus this if you want me to
Assignee | ||
Comment 15•24 years ago
|
||
Yes, please. This is a necessary part of the API change.
Assignee | ||
Comment 17•24 years ago
|
||
This was integrated into Mike's changes, checked in last night.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Comment 18•24 years ago
|
||
how can QA verify?
Assignee | ||
Comment 19•24 years ago
|
||
If QA can write JS, try writing something that gets the selection then dumps it
or calls ToString() directly, and see if it works, or if it prints an error.
If that's too elaborate, just take my word for it.
Comment 20•24 years ago
|
||
window.getSelection isn't working now (bug 48575)
You need to log in
before you can comment on or make changes to this bug.
Description
•