diff --git a/source b/source index 6ce33ef86e2..e5df61bdd0d 100644 --- a/source +++ b/source @@ -2691,6 +2691,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
IndexSizeError
"HierarchyRequestError
"InvalidCharacterError
"NoModificationAllowedError
"NotFoundError
"NotSupportedError
"InvalidStateError
"Event
interfaceinnerText
getter and
- setterinnerText
and outerText
propertiesinnerText
[ = value ]Can be set, to replace the element's children with the given value, but with line breaks
converted to br
elements.
outerText
[ = value ]Returns the element's text content "as rendered".
+ +Can be set, to replace the element with the given value, but with line breaks converted to
+ br
elements.
The innerText
getter
- steps are:
The innerText
and
+ outerText
getter steps
+ are:
For each child node node of this:
Let current be the list resulting in running the inner - text collection steps with node. Each item in results will either - be a string or a positive integer (a required line break count).
+Let current be the list resulting in running the + rendered text collection steps with node. Each item in + results will either be a string or a positive integer (a required + line break count).
Intuitively, a required line break count item means that a certain number of line breaks appear at that point, but they can be collapsed with the line breaks @@ -12626,19 +12642,19 @@ interface DOMStringMap { count items at the start or end of results.
Replace each remaining run of consecutive required - line break count items with a string consisting of as many U+000A LINE FEED (LF) characters - as the maximum of the values in the required line break count items.
Return the concatenation of the string items in results.
The inner text collection steps, given a node node, are - as follows:
+The rendered text collection steps, given a node node, + are as follows:
Let items be the result of running the inner text collection steps - with each child node of node in tree order, and then concatenating - the results to a single list.
Let items be the result of running the rendered text collection + steps with each child node of node in tree order, and then + concatenating the results to a single list.
If node's computed value of 'visibility' is not 'visible', then return items.
If node is a br
element, then append a string containing a single U+000A LINE FEED (LF) character to
+ append">append a string containing a single U+000A LF code point to
items.
If node's computed value of 'display' is 'table-cell', and node's CSS box is not the last 'table-cell' box of its enclosing 'table-row' box, then append a string containing a single U+0009 CHARACTER TABULATION (tab) - character to items.
If node's computed value of 'display' is 'table-row', and node's CSS box is not the last 'table-row' box of the nearest ancestor 'table' box, then append a string containing a single U+000A LINE FEED (LF) character - to items.
If node is a p
element, then append 2 (a required line break count) at the beginning and end of
@@ -12716,18 +12732,48 @@ interface DOMStringMap {
stringifier and maybe expose it directly on ranges. See Bugzilla bug 10583.
The innerText
setter steps are:
Let document be this's node document.
Let fragment be the rendered text fragment for the given value + given this's node document.
Replace all with fragment within + this.
The outerText
setter steps are:
If this's parent is null, then throw a
+ "NoModificationAllowedError
" DOMException
.
Let next be this's next sibling.
Let fragment be a new DocumentFragment
object whose node
- document is document.
Let previous be this's previous sibling.
Let input be the given value.
Let fragment be the rendered text fragment for the given value + given this's node document.
Let position be a pointer into input, initially pointing at the start - of the string.
Replace this with + fragment within this's parent.
If next is non-null and next's previous sibling is a
+ Text
node, then merge with the next text node given next's
+ previous sibling.
If previous is a Text
node, then merge with the next text
+ node given previous.
The rendered text fragment for a string input given a
+ Document
document is the result of running the following steps:
Let position be a position variable for input, + initially pointing at the start of input.
Let text be the empty string.
While position is not past the end of input:
Collect a sequence of code points that are not U+000A LINE FEED (LF) or - U+000D CARRIAGE RETURN (CR) characters from input given position. Set - text to the collected characters.
Collect a sequence of code points that are not U+000A LF or U+000D CR from + input given position, and set text to the result.
If text is not the empty string, then append a new Text
node whose DOMStringMap {
document to fragment.
While position is not past the end of input, and the character at - position is either a U+000A LINE FEED (LF) or U+000D CARRIAGE RETURN (CR) - character:
+While position is not past the end of input, and the code point at + position is either U+000A LF or U+000D CR:
If the character at position is a U+000D CARRIAGE RETURN (CR) character and - the next character is a U+000A LINE FEED (LF) character, then advance position to - the next character in input.
If the code point at position is U+000D CR and the next code point is + U+000A LF, then advance position to the next code point in + input.
Advance position to the next character in input.
Advance position to the next code point in input.
Append the result of creating an element given document,
- br
, and the HTML namespace to fragment.
Append the result of creating an element given document, br
, and the
+ HTML namespace to fragment.
Replace all with fragment within - this.
To merge with the next text node given a Text
node node:
Let next be node's next sibling.
If next is not a Text
node, then return.
Replace data with node, node's data's length, 0, and next's data.
If next's parent is non-null, then remove next.
+ +The parent check is necessary as the previous step might have triggered mutation + events.
+HTMLElement
's outerText
IDL attribute
HTMLInputElement
's webkitdirectory
and incremental
IDL attributes
HTMLLinkElement
's scope
IDL attribute
ShadowRoot
's innerHTML
IDL attribute