<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Align the innerText setter with the HTML spec and Gecko"
href="https://bugs.webkit.org/show_bug.cgi?id=160971">160971</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Align the innerText setter with the HTML spec and Gecko
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>Product</th>
<td>WebKit
</td>
</tr>
<tr>
<th>Version</th>
<td>WebKit Nightly Build
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Unspecified
</td>
</tr>
<tr>
<th>OS</th>
<td>Unspecified
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>Normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P2
</td>
</tr>
<tr>
<th>Component</th>
<td>HTML DOM
</td>
</tr>
<tr>
<th>Assignee</th>
<td>webkit-unassigned@lists.webkit.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>zcorpan@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>cdumez@apple.com
</td>
</tr></table>
<p>
<div>
<pre>See <a href="https://github.com/whatwg/html/issues/1679">https://github.com/whatwg/html/issues/1679</a>
WebKit throws for <br>.innerText = "x" etc, The spec and Gecko do not.
WebKit will update existing text node's data if element has just 1 text node.
The HTML spec and Gecko always replace with a new text node.
If the assigned value starts with a newline, WebKit/Chromium inserts an empty text node, the spec/Gecko/IE don't.
Spec at <a href="https://html.spec.whatwg.org/multipage/dom.html#the-innertext-idl-attribute">https://html.spec.whatwg.org/multipage/dom.html#the-innertext-idl-attribute</a>
Tests at <a href="https://github.com/w3c/web-platform-tests/tree/master/innerText">https://github.com/w3c/web-platform-tests/tree/master/innerText</a> (these might get moved to html/ or something later)</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>