DescriptionNode.textContent setter should treat undefined the same way as null
Node.textContent setter should treat undefined the same way as null.
Previously, undefined would get stringified to "undefined" in the
setter, instead of being treated as "". This is inconsistent with
what happens when assigning null and with the DOM specification:
http://dom.spec.whatwg.org/#dom-node-textcontent
Since the textContent attribute is nullable, both null and undefined
input should be treated as null as per the Web IDL specification:
http://heycam.github.io/webidl/#es-nullable-type
The new behavior is consistent with Firefox 29. However, IE11 returns
"undefined" in this case.
R=arv@chromium.org, tkent@chromium.org
BUG=378454
TEST=fast/dom/Node/textContent-set-undefined.html
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=175103
Patch Set 1 #
Total comments: 3
Patch Set 2 : Add spec url to test case #
Messages
Total messages: 9 (0 generated)
|