Closed Bug 1612560 Opened 5 years ago Closed 2 years ago

When typing `document.getSelection().` no methods/properties are proposed.

Categories

(DevTools :: Console, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: mbrodesser-Igalia, Unassigned)

References

Details

What were you doing?

Please tell us what site you were on, and what steps led to the error you are reporting

  1. Open data:text/html,asdf.
  2. Press CTRL+a to select all text.
  3. Open the developer console and type document.getSelection()..

What happened?

No methods or attributes are proposed.

What should have happened?

The attribute rangeCount should have been proposed.

Anything else we should know?

The same works on Chrome. Used Firefox 73.0b12 on Ubuntu 18.04.

Depends on: 1580083
Priority: -- → P3

Nicolas, if this API is side-effect free and we can whitelist, should we still block on bug 1580083?

Flags: needinfo?(nchevobbe)

Looks like this method isn't pure https://searchfox.org/mozilla-central/source/dom/webidl/Document.webidl#525

If it's actually side-effect-free maybe it should be? Looking at the implementation, it sure looks like it could be marked [Pure].

In general, [Pure] annotations are not guaranteed to be present on all side-effect-free things, and we should add them as desired/needed.

(In reply to :Harald Kirschner :digitarald from comment #2)

Nicolas, if this API is side-effect free and we can whitelist, should we still block on bug 1580083?

yes, I'd rather do this than having a different codepath with the current autocomplete.

Flags: needinfo?(nchevobbe)
Severity: normal → S3

this was probably fixed by one of arai's patch on eager evaluation

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.