DescriptionMake arguments to insertAdjacent{Text,Element} non-optional
In https://codereview.chromium.org/109273003/ the arguments to
insertAdjacentHTML were made non-optional. Even though
insertAdjacent{Text,Element} is not in any spec yet, it's reasonable
that they should behave similarly, if ever spec'ed.
Since there's already (still necessary) error reporting at lower
levels, the only real functional difference by this change is that:
element.insertAdjacentText('beforeEnd')
will now throw TypeError instead of appending the string 'undefined'
to the element's text content. The other cases will just get more
descriptive error messages, like:
"2 arguments required, but only 0 present."
instead of:
"The node provided is null."
when both arguments are missing.
Also align the insertAdjacent{HTML,Element,Text}.html tests to look
and behave similarly.
IE10 passes all three with slightly different error message output.
R=ojan@chromium.org
BUG=342754
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=166941
Patch Set 1 #
Messages
Total messages: 4 (0 generated)
|