recenlty on Chrome dev console warning started to appear about deprecation of document.registerElement method
[Deprecation] document.registerElement is deprecated and will be removed in M73, around March 2019. Please use window.customElements.define instead. See https://www.chromestatus.com/features/4642138092470272 for more details.
When I checked what would happen if this function is no longer available, our application crashed. We have custom bundle so according to this: https://github.com/telerik/kendo-ui-core/issues/4675 the solution would be to upgrade R1.2019 when it will be available.
So my question is when this version is planned to be available, or do you know if upgrading to current latest version would solve this problem?
7 Answers, 1 is accepted
Thank you for sharing that you have already seen the logged issue related to this Chrome warning.
The R1 2019 release is coming up in a couple of days - it is due on 16th January. (I have now added this milestone to the issue - apologies for the late update on our part in the issue).
The fix itself removed all references to kendo webcomponents.js so that the warning will disappear. However, you mentioned:
Can you please let me know if you removed just the function or the reference to the kendo.webcomponents.js from the application?
Can you let us know at which point is this script used and the function called?
Look forward to hearing back from you.
Hello, I have just removed this function from document, as this is the worst case scenario which we need to be prepared.
As for the errors, when the page is loaded I get first error from kendo.custom.min.js which is:
And then when creating component, there is error that component is not a function, in this case it's kendoListView. As I observed after the first error there is no any kendo components available.
Thank you for clarifying how the application stopped working.
The kendo.custom.min.js script was probably created by the Custom Download Builder Tool which bundled the kendo.webcomponents.js. As of tomorrow, the Download Builder Tool should not include the kendo.webcomponents.js and the warning will go away.
Nonetheless, the only place in the source where document.registerElement() is used is in kendo.webcomponents.js. This function is not used in the jQuery, ASP.NET MVC, ASP.NET Core, JSP, PHP, React, Vue or AngularJS wrappers so none of these applications would be affected.
The only people who would be affected are the ones who created web components and still use them. In case there are no web components in the application you are working on, you do not need to do anything special. Just download the latest version of Kendo UI and the warning should be gone.
Let me know if you have further questions.
We are using 2016 version of Kendo UI on some old websites.
What do we have to do to fix this issue without upgrading to a newer version.
You can also take advantage of the Custom Download builder tool for the older versions.
- Select the version that you are currently using and do not wish to update from the dropdown list.
- Select the needed functionality
- Make sure the web components script is deselected
Download the script and replace where in use.
I am getting the warning on kendo.all.js and the custom download generates kendo.custom.min.js
kendo.all.js:119632 [Deprecation] document.registerElement is deprecated and will be removed in M73, around March 2019. Please use window.customElements.define instead. See https://www.chromestatus.com/features/4642138092470272 for more details.
l @ kendo.all.js:119632
How do I get this file from custom download
The kendo.all.min.js package which was distributed back in 2016 contains the kendo.webcomponents.min.js file which causes the warning.
To avoid the error, you should use the Custom Download Builder tool and download the version that you need. If you let me know which version exactly you are using, I can test it for you. You can easily rename the file from kendo.custom.min.js to kendo.all.min.js and continue using the old version by replacing the kendo.all.min.js file which was distributed at the time with the one you created with the download builder tool.
*** For very old versions,i.e. 2014 there may be other dependencies but for 2016 this approach should work
Let me know in case you have further questions or concerns.