Add support for element.outerText
Categories
(Core :: DOM: Core & HTML, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox98 | --- | fixed |
People
(Reporter: karlcow, Assigned: emilio)
References
(Blocks 1 open bug)
Details
(Keywords: dev-doc-complete)
Attachments
(2 files)
There is a discussion on adding outerText to the html spec.
https://github.com/whatwg/html/pull/6653/files/511057620a418bb3249ea6ae49bf5a420e8699ae
In addition to textContent in the past we added for compat reasons innerText (Bug 264412 ).
https://github.com/whatwg/compat/issues/5
outerText is being used in the wild, but I don't remember from the top of my head any compat issues related to it. I will dig.
Currently if I'm not mistaken, Chrome returns innerText for outerText.
https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/dom/element.cc;l=4727-4734;drc=be6676e3f9f897ae9c9d14fd890a95d0a54a834a
![]() |
Reporter | |
Comment 1•2 years ago
|
||
innerText and outerText setters have different steps in Chromium.
https://www.chromestatus.com/metrics/feature/popularity#HTMLElementInnerText 31.65%
https://www.chromestatus.com/metrics/feature/timeline/popularity/213
https://www.chromestatus.com/metrics/feature/popularity#HTMLElementOuterText 0.38%
https://www.chromestatus.com/metrics/feature/timeline/popularity/214
Updated•2 years ago
|
Updated•2 years ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Assignee | ||
Updated•1 year ago
|
Assignee | ||
Comment 2•1 year ago
|
||
Assignee | ||
Comment 3•1 year ago
|
||
Depends on D136240
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3d133626b40c Implement HTMLElement.outerText. r=smaug https://hg.mozilla.org/integration/autoland/rev/d220aefbd9c9 Remove no longer needed intervention. r=webcompat-reviewers,denschub
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/32451 for changes under testing/web-platform/tests
Comment 6•1 year ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/3d133626b40c
https://hg.mozilla.org/mozilla-central/rev/d220aefbd9c9
Upstream PR merged by moz-wptsync-bot
Comment 8•1 year ago
|
||
FF98 docs and compatibility updates for this can be tracked in https://github.com/mdn/content/issues/12576#issuecomment-1032211070 (work awaiting review)
Description
•