When typing `document.getSelection().` no methods/properties are proposed.
Categories
(DevTools :: Console, defect, P3)
Tracking
(Not tracked)
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
- Open
data:text/html,asdf
. - Press CTRL+a to select all text.
- 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.
Updated•5 years ago
|
Reporter | ||
Updated•5 years ago
|
Comment 1•5 years ago
|
||
Looks like this method isn't pure https://searchfox.org/mozilla-central/source/dom/webidl/Document.webidl#525 , but Chrome has it on its side-effect-free list: https://github.com/chromium/chromium/blob/77578ccb4082ae20a9326d9e673225f1189ebb63/third_party/blink/web_tests/http/tests/inspector-protocol/side-effects/evaluate-embedder-side-effect-free-methods.js#L63
Bug 1609426 should add more DOM methods, but maybe this needs extra work.
Comment 2•5 years ago
|
||
Nicolas, if this API is side-effect free and we can whitelist, should we still block on bug 1580083?
![]() |
||
Comment 3•5 years ago
|
||
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.
Comment 4•5 years ago
|
||
(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.
Updated•2 years ago
|
Comment 5•2 years ago
|
||
this was probably fixed by one of arai's patch on eager evaluation
Description
•