3 ms·
The MDN page has the deprecation notice for the `shadowRoot` property. Yes, the examples on your page are way more comprehensive. Even with compatibility suppo
by marcosdumay 2y ago
The MDN page has the deprecation notice for the `shadowRoot` property.
Yes, the examples on your page are way more comprehensive. Even with compatibility support for old Chrome versions. Unfortunately, that support example will also break your code on other browsers.
People may want to read it anyway, and just fix the problem. It being outdated doesn't make the explanation bad.
- throwitaway1123 2y ago> The MDN page has the deprecation notice for the `shadowRoot` property. The `shadowRoot` property of the ElementInternals object is not deprecated: https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals/shadowRoot https://developer.mozilla.org/en-US/docs/Web/API/ElementInte... What's deprecated is the `shadowroot` attribute on the template element, which the example I linked to does not use. The second line of code in that example is `<template shadowrootmode="open">`. All of this is mentioned at the very top of the article where it says: "Note that the specification for this feature changed in 2023 (including a rename of shadowroot to shadowrootmode), and the most up to date standardized versions of all parts of the feature landed in Chrome version 124." > Unfortunately, that support example will also break your code on other browsers. No, it will not.