Issue metadata
Sign in to add a comment
|
Align the innerText setter with the HTML spec and Gecko |
||||||||||||||||||||||
Issue descriptionSee https://github.com/whatwg/html/issues/1679 Chromium throws for <br>.innerText = "x" etc, The spec and Gecko do not. https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/html/HTMLElement.cpp?sq=package:chromium&dr=CSs&rcl=1471276009&l=140 https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/html/HTMLElement.cpp?sq=package:chromium&dr=CSs&rcl=1471276009&l=454 Chromium 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. https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/editing/serializers/Serialization.cpp?sq=package:chromium&dr=CSs&rcl=1471276009&l=640 If the assigned value starts with a newline, WebKit/Chromium inserts an empty text node, the spec/Gecko/IE don't. Spec at https://html.spec.whatwg.org/multipage/dom.html#the-innertext-idl-attribute Tests at https://github.com/w3c/web-platform-tests/tree/master/innerText (these might get moved to html/ or something later)
,
Aug 19 2016
|
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by zcorpan@gmail.com
, Aug 18 2016