2nd arg of document.createElement should be an object |
|||||||
Issue descriptionThe 2nd argument to d.createElement is now an object (https://dom.spec.whatwg.org/#dom-document-createelement): document.createElement('button', {is: 'fancy-button'}); However, this returns <button is="[object Object]"> in Blink. Blinks implementation is for the older spec: document.createElement('button', 'fancy-button'); FF is trying to ship v1 and running into compatibility issues: https://bugzilla.mozilla.org/show_bug.cgi?id=1294100 Can we... 1.) implement the new call as spec'd 2.) support both syntaxes in Blink for now, and console warn if users use the outdated call 3.) After some time deprecated the first call
,
Sep 6 2016
Hi Dominic, I could help with this one. Are you guys already implementing v1 customized built-in elements? May be I could jump in.
,
Sep 6 2016
Sure, please go ahead. I want very specific way of handling this parameter when customized built-in elements are implemented (soon.) For now, just handling the dictionary, but also accepting a string (maybe using toString?) but with a deprecation warning for the string, would be good.
,
Sep 9 2016
Thanks, will do.
,
Sep 13 2016
Hi, I made a draft patch. https://codereview.chromium.org/2334223005 Plz check if I am going in the right direction.
,
Oct 12 2016
,
Oct 27 2016
Hi Anton, what's happening with this? The blink-dev thread got enough LGTMs to ship the new option, but not add the deprecation message to the string, string version yet--just the use counter. It would be good to get this in the tree soon. yurak is implementing customized built-in elements which needs this parameter.
,
Oct 27 2016
Hi, sorry for delay - was on holiday last week and was actually waiting for your reply on one of my emails. Will update the patch and try to merge it today.
,
Oct 27 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/fc17d505758c284f99624ac69b6e2fb72ea7b623 commit fc17d505758c284f99624ac69b6e2fb72ea7b623 Author: a.obzhirov <a.obzhirov@samsung.com> Date: Thu Oct 27 19:33:32 2016 2nd arg of document.createElement should be an object This patch adds a dictionary as a second argument for document.createElement. See https://dom.spec.whatwg.org/#dom-document-createelement. BUG= 637353 Review-Url: https://codereview.chromium.org/2334223005 Cr-Commit-Position: refs/heads/master@{#428111} [add] https://crrev.com/fc17d505758c284f99624ac69b6e2fb72ea7b623/third_party/WebKit/LayoutTests/fast/dom/custom/create-element-second-arg.html [modify] https://crrev.com/fc17d505758c284f99624ac69b6e2fb72ea7b623/third_party/WebKit/Source/bindings/core/v8/BUILD.gn [modify] https://crrev.com/fc17d505758c284f99624ac69b6e2fb72ea7b623/third_party/WebKit/Source/bindings/core/v8/V0CustomElementConstructorBuilder.cpp [modify] https://crrev.com/fc17d505758c284f99624ac69b6e2fb72ea7b623/third_party/WebKit/Source/core/core_idl_files.gni [modify] https://crrev.com/fc17d505758c284f99624ac69b6e2fb72ea7b623/third_party/WebKit/Source/core/dom/Document.cpp [modify] https://crrev.com/fc17d505758c284f99624ac69b6e2fb72ea7b623/third_party/WebKit/Source/core/dom/Document.h [modify] https://crrev.com/fc17d505758c284f99624ac69b6e2fb72ea7b623/third_party/WebKit/Source/core/dom/Document.idl [add] https://crrev.com/fc17d505758c284f99624ac69b6e2fb72ea7b623/third_party/WebKit/Source/core/dom/ElementCreationOptions.idl [modify] https://crrev.com/fc17d505758c284f99624ac69b6e2fb72ea7b623/third_party/WebKit/Source/core/dom/TreeScopeTest.cpp [modify] https://crrev.com/fc17d505758c284f99624ac69b6e2fb72ea7b623/third_party/WebKit/Source/core/dom/custom/CustomElementUpgradeSorterTest.cpp [modify] https://crrev.com/fc17d505758c284f99624ac69b6e2fb72ea7b623/third_party/WebKit/Source/core/frame/UseCounter.h [modify] https://crrev.com/fc17d505758c284f99624ac69b6e2fb72ea7b623/tools/metrics/histograms/histograms.xml
,
Oct 28 2016
Hi Dominic, The patch is merged without the deprecation message. I guess now we would need to wait some time to get use count for string argument. Do we keep this bug open for now?
,
Oct 31 2016
Awesome, thank you so much. I've filed Issue 660758 to track the deprecation since it will take ages for the use counter data to come in.
,
Nov 4 2016
,
Nov 4 2016
,
Feb 14 2017
|
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by dominicc@chromium.org
, Aug 17 2016Owner: dominicc@chromium.org
Status: Available (was: Untriaged)