Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Issue 146313006: Make arguments to insertAdjacent{Text,Element} non-optional (Closed)

Created:
6 years, 10 months ago by davve
Modified:
6 years, 10 months ago
Reviewers:
ojan
CC:
blink-reviews, arv+blink, sof, eae+blinkwatch, dglazkov+blink, adamk+blink_chromium.org, watchdog-blink-watchlist_google.com, Inactive
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Make 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+46 lines, -25 lines) Patch
M LayoutTests/fast/dynamic/insertAdjacentElement.html View 2 chunks +17 lines, -8 lines 0 comments Download
M LayoutTests/fast/dynamic/insertAdjacentElement-expected.txt View 1 chunk +2 lines, -0 lines 0 comments Download
M LayoutTests/fast/dynamic/insertAdjacentHTML.html View 2 chunks +8 lines, -9 lines 0 comments Download
M LayoutTests/fast/dynamic/insertAdjacentText.html View 2 chunks +15 lines, -4 lines 0 comments Download
M LayoutTests/fast/dynamic/insertAdjacentText-expected.txt View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/dom/Element.idl View 1 chunk +2 lines, -4 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
davve
6 years, 10 months ago (2014-02-11 14:43:51 UTC) #1
ojan
lgtm
6 years, 10 months ago (2014-02-11 19:34:48 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/davve@opera.com/146313006/1
6 years, 10 months ago (2014-02-11 19:35:04 UTC) #3
commit-bot: I haz the power
6 years, 10 months ago (2014-02-11 20:28:38 UTC) #4
Message was sent while issue was closed.
Change committed as 166941

Powered by Google App Engine
This is Rietveld 408576698