Primary eng (and PM) emails
hay...@chromium.org, ko...@chromium.org, yoi...@chromium.org,
Summary
Remove Shadow DOM V0, Custom Elements V0, and HTML Imports at once in April, 2019 after deprecation period. All these pre-V1 era web components technologies except HTML Templates were not adopted by any other rendering engines. We discourage any usage of these APIs and encourage migrating to V1 APIs and ES modules.
We are targeting M73 which will be on the stable channel in April 2019 to disable the features. Just in case people need more time for migration, we plan to provide an option of using origin trials to keep using the APIs, see below for details.
Here is the timeline.
2018Q2 (done)
Reach out Chrome internal users (e.g. WebUI)
Analyze log data (UKM etc.) to identify non-polyfilled users
2018Q3
Start showing deprecation message on dev channel (M70)
Proactively drive the usage down
2018Q4
Start showing deprecation message on stable channel (M70)
Continue driving the usage down
2019Q1
Disable the feature in M73 (branch Jan. 2019)
2019Q2
Feature disabled in stable, start reverse origin trials for remaining users
2020Q1
Stop accepting origin trials
2020Q2
Remove the code from the code base
Motivation
Shadow DOM V0, Custom Elements V0, and HTML Imports were launched in 2014, but they did not get adopted by other browser engines. Instead, Shadow DOM V1, Custom Elements V1, and ES modules are widely adopted by various browser engines today. Chrome has shipped Shadow DOM V1 / Custom Elements V1 in 2016 and ES modules in 2017.
This is the second intent, the first one was to deprecate only Shadow DOM V0 in Nov. 2016 after Shadow DOM V1 shipped. We withheld deprecating mostly because we had not analyzed the usage at that time.
Since then, we
identified the most major users of Shadow DOM V0 and reached out to them (AdBlock Plus, AdBlock) , and helped them moving away from Shadow DOM V0, which resulted in significant usage drop (14% to 2% - considering the usage was 2.2% at the previous intent post with a different measurement method than today, current 2% corresponds to ~0.3% at that time).
reached out Chrome internal users (e.g. Chrome WebUI used V0 APIs via Polymer V1) to migrate to V1 APIs (or Polymer V2+), tracked at crbug.com/806159. Half of them are done, and the rest have plan to meet the timeline.
removed features of Shadow DOM V0 which are not available in V1 (/deep/, multiple shadow roots) to facilitate web developers to migrate from Shadow DOM V0 to V1.
migrated Blink’s UA shadow implementation from V0 to V1.
shipped type extension (aka “is=” attribute) for Custom Elements V1, for Custom Element V0 users to migrate to V1
Opted in UKM for better analysis of which sites are using these APIs
Analyzed httparchive data to identify list of sites that use the APIs
Since then, we also found that in many real-world use cases, Shadow DOM V0, Custom Elements V0, HTML Imports were used together, and instead of getting each of them migrated respectively, getting all of them migrated to today’s standards at once, or at least use the polyfill would make it less troublesome, easier to migrate, rather than fighting with every edge case of combination of polyfill and native implementation.
We found cases that some sites use browser sniffing to assume if it is “Chrome”, use native Custom Elements V0 and HTML Imports, and other sites once feature detect Shadow DOM V0, they assume Custom Elements V0 and HTML Imports are also available. The former can’t be helped, but the latter can be saved by one-off deprecation strategy.
Note: the polyfill (webcomponentsjs) is designed to feature-detect and polyfill any combination of Shadow DOM V0, Custom Elements V0, HTML Imports. Having said that, each has its own implementation limitation and different level of fidelity to native implementation, if we go the route of one-by-one deprecation, every site owner has to extensively test the site, while if we deprecate and remove at once, assuming the original site is designed to work for both Blink-based and non-Blink-based browsers using the polyfill, the probability that the site continues to work without any modification must be very high.
Compatibility and Interoperability Risk
No other browser engines support Shadow DOM V0, Custom Elements V0, and HTML Imports.
Existing users of these APIs are mainly coming from Polymer V1 users (Shadow DOM V0, Custom Elements V0, and HTML Imports) and Polymer V2 users (HTML Imports only, Shadow DOM and Custom Elements are V1). Fortunately for them, the impact should be minimal at the removal because these features are polyfilled and those pages should continue to work. Therefore even though their current usages via UMA look high, we can ignore the major portion of it (see below for details). We continue to figure out more exact usage of non-polyfilled sites that will break via various sources (UMA, UKM, httparchive, …).
Most of Chrome internal usage (such as Chrome Web UI) has migration plans and it is tracked at crbug.com/806159.
Note: even though Event.path was originally defined with Shadow DOM V0, and is superseded by Event.composedPath() in the V1 spec, Event.path can work without Shadow DOM V0 and will be deprecated separately.
Edge/IE: Not supported
Firefox: Not supported
Safari: Not supported
Alternative implementation suggestion for web developers
The most straightforward option is to migrate to Shadow DOM V1, Custom Elements V1, ES modules respectively at once. For Shadow DOM V1, there’s a document to compare V0 and V1 APIs. As this is not a simple replacement of APIs, it may be time consuming.
If you use the features without Polymer, one option is to use a polyfill. The polyfill bundled with Polymer is separately available as “webcomponentsjs”. Specifically for polyfilling V0 APIs, you can use its v0 branch. There are other alternative polyfills for each, like AshleyScirra’s HTML Imports polyfill.
If you use Polymer V1 or V2, in most cases you do not have to take any action because the polyfill should kick in where these APIs are not available. If you would like to try if the polyfill works, you can pass --disable-blink-features=ShadowDOMV0,CustomElementsV0,HTMLImports to Chrome (see howto document for passing command line parameter). To be more future proof, it is a good idea to migrate to a newer version of Polymer, see their document for upgrading to 3.0 and 2.0.
Note: at this moment Chrome’s devtools use Shadow DOM V0 and Custom Elements V0, if you pass the option above, you cannot open developer tools. In that case you can use remote debugging.
If you are an owner/developer of a site where any options above does not help, and cannot have time to do the work by the expected deadline (April 2019), we plan to offer an option to use origin trials to opt-in for the site to enable deprecated features for up to 1 year. Origin Trials are a mechanism that a site owner can apply for using Chrome’s experimental features, by getting a token to embed in a page to unlock the features. We use this for allowing to use deprecated features, aka “reverse origin trials”. How to apply for this will be sent out separately, when the removal date approaches (expecting in Jan 2019).
If you encounter a site that you do not own, but is broken due to this deprecation, you can try passing --enable-blink-features=ShadowDOMV0,CustomElementsV0,HTMLImports to Chrome. This will work until we remove the code in 2020.
Usage information from UseCounter
Element.createShadowRoot() (representative for Shadow DOM V0 usage)
https://www.chromestatus.com/metrics/feature/timeline/popularity/456 (~1.7%)
According to internal per-OS breakdown data, Android is the lowest (~0.85%) and other desktop OSes are all higher than 1.7%. It could mean that still some extensions use this. On httparchive mobile sites, we have only ~260 URLs out of Alexa 500,000 top mobile sites (~0.45%, because UMA takes page views into account, number % of top URLs must be smaller than UMA). By reaching out non-polyfilled sites we think we can reduce the pageview-based number of non-polyfilled sites to below 0.1% within this deprecation period.
Document.registerElement() (representative for Custom Elements V0 usage)
https://www.chromestatus.com/metrics/feature/timeline/popularity/457 (~5.0%)
We are aware that this number is high, however, this includes YouTube desktop usage. We have been talking with YouTube team. From internal UMA per-OS breakdown, Android is ~3.8% (and other desktop OSes are above 5%). We have ~4000 URLs in httparchive for mobile sites (~0.8%), and will pick up non-polyfilled sites and reach them out. Even for non-polyfilled sites, unless they run Blink-based browser only sites, we assume most of them feature-detect with some fallback, therefore problematic sites should be very few (to be closely analyzed, though).
HTML Imports (<link rel=”import”>)
https://www.chromestatus.com/metrics/feature/timeline/popularity/455 (~2.0%)
We are aware that this number is high, however, this includes YouTube desktop usage. From internal UMA per-OS breakdown, Android is ~0.13% (and other desktop OSs are above 2%). Once YouTube desktop move out of HTML Imports, desktop numbers should become closer to Android’s. From httparchive mobile sites, ~280 URLs (out of 500,000 - ~0.6%) pmeenan@ already looked at these list and 175 out of 277 are identified using web components polyfill. So ~100 sites out of 500,000 sites will be affected by this, which is ~0.02% of sites.
Polymer V1 (detected by “dom-module” registration via document.registerElement)
https://www.chromestatus.com/metrics/feature/timeline/popularity/2466 (~1.9%)
This includes desktop YouTube usage (Note: this counter is added in M69 (still dev or beta), so the variance against the real number could be high). We use this number for roughly estimating those who are NOT affected by this removal.
Other less significant counters
V0CustomElementsCreateTypeExtensionElement
https://www.chromestatus.com/metrics/feature/timeline/popularity/1878 (~3.5%)
As M67 shipped type extension for Custom Elements V1, this number should decrease, and we will observe how this declines.
Tracking bug
https://bugs.chromium.org/p/chromium/issues/detail?id=671907 (Shadow DOM V0)
https://bugs.chromium.org/p/chromium/issues/detail?id=660759 (Custom Elements V0)
https://bugs.chromium.org/p/chromium/issues/detail?id=766694 (HTML Imports)
Entry on the feature dashboard
https://www.chromestatus.com/features/4507242028072960 (Shadow DOM V0)
https://www.chromestatus.com/feature/4642138092470272 (Custom Elements V0)
https://www.chromestatus.com/features/5144752345317376 (HTML Imports)
Requesting approval to remove too?
Yes
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAFpjS_2%3DWVFFf8fK%2BXrOJmw-_a6nBO1YqzA%2BUaaiOpm1UK-xyQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAOMQ%2Bw9ua4%2Bey7XB%2BTA4_pHYqPwveq9azEcgSEVq5FwQQv2sCQ%40mail.gmail.com.
I can't help but feel that the deprecation of HTML imports is being rushed and should be decoupled from the deprecation of CE and Shadow DOM V0. Agree it's not good to keep non standard APIs but HTML imports are being used with CE and Shadow DOM V1 in Polymer 2 for instance which was released just a year ago!
There isn't any comparable alternative yet apart from ES Modules which require generating HTML and CSS with JS. HTML modules are the most similar proposal but very far from even a first implementation. IMHO it would make sense to delay deprecation of HTML imports until we have HTML modules or a way to leverage ES Modules to load HTML.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/73977699-55ff-42a3-8aab-10188b89c785%40chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CACj%3DBEj15Bh7heVM_G0JV%3DhZvJbVfr5F5LfjmuFP5hEpLYBL9w%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/83fe2c3d-ca2c-4879-b84b-0aae39faca55%40chromium.org.
From: Philip Jägenstedt <foo...@chromium.org>
> We're still concerned that the replacement will be less performant than HTML imports,
My understanding is that many of the theoretical performance benefits of HTML imports were not, in the end, implemented; in practice to get acceptable performance with them sites had to use tooling like Vulcanize to inline their contents into the main page. See https://www.polymer-project.org/1.0/docs/tools/optimize-for-production for example. Hayato or the rest of the DOM team can weigh in further.
On Wed, Aug 15, 2018 at 1:25 AM Domenic Denicola <d...@domenic.me> wrote:From: Philip Jägenstedt <foo...@chromium.org>
> We're still concerned that the replacement will be less performant than HTML imports,
My understanding is that many of the theoretical performance benefits of HTML imports were not, in the end, implemented; in practice to get acceptable performance with them sites had to use tooling like Vulcanize to inline their contents into the main page. See https://www.polymer-project.org/1.0/docs/tools/optimize-for-production for example. Hayato or the rest of the DOM team can weigh in further.
Yeah, in practice, I think most sites are using Vulcanize at this point.Polymer has already switched to use ES Modules, and I've not heard any significant performance regression on this switch, compared to HTML Imports.
We know that ES Modules couldn't be a replacement of HTML Imports because they solve a different problem, however, from the performance perspective, ES Modules shouldn't be less performant than HTML imports.
ES Modules' performance is getting better and better, I think.In addition to that, as Olli@ pointed out in this thread, other browsers never get performance benefits from HTML Imports.Polymer team would have more insights on the performance.--Hayato
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAFpjS_1xd02xp8vVCiA8bPUi7kZor%3DEKJqOrNxeGu5xoSpJHEA%40mail.gmail.com.
Usage information from UseCounter
...
HTML Imports (<link rel=”import”>)
https://www.chromestatus.com/metrics/feature/timeline/popularity/455 (~2.0%)
We are aware that this number is high, however, this includes YouTube desktop usage. From internal UMA per-OS breakdown, Android is ~0.13% (and other desktop OSs are above 2%). Once YouTube desktop move out of HTML Imports, desktop numbers should become closer to Android’s. From httparchive mobile sites, ~280 URLs (out of 500,000 - ~0.6%) pmeenan@ already looked at these list and 175 out of 277 are identified using web components polyfill. So ~100 sites out of 500,000 sites will be affected by this, which is ~0.02% of sites.
On Wed, Aug 15, 2018 at 3:17 PM Hayato Ito <hay...@chromium.org> wrote:On Wed, Aug 15, 2018 at 1:25 AM Domenic Denicola <d...@domenic.me> wrote:From: Philip Jägenstedt <foo...@chromium.org>
> We're still concerned that the replacement will be less performant than HTML imports,
My understanding is that many of the theoretical performance benefits of HTML imports were not, in the end, implemented; in practice to get acceptable performance with them sites had to use tooling like Vulcanize to inline their contents into the main page. See https://www.polymer-project.org/1.0/docs/tools/optimize-for-production for example. Hayato or the rest of the DOM team can weigh in further.
Yeah, in practice, I think most sites are using Vulcanize at this point.Polymer has already switched to use ES Modules, and I've not heard any significant performance regression on this switch, compared to HTML Imports.Interesting. Was the existing implementation not optimized to go through preloadScanning and progressive DOM building? Or are the payloads typically used too small for it to make a difference?
We know that ES Modules couldn't be a replacement of HTML Imports because they solve a different problem, however, from the performance perspective, ES Modules shouldn't be less performant than HTML imports.Can the HTML modules model enable progressive tokenization and DOM building?
----ES Modules' performance is getting better and better, I think.In addition to that, as Olli@ pointed out in this thread, other browsers never get performance benefits from HTML Imports.Polymer team would have more insights on the performance.--Hayato
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAFpjS_1xd02xp8vVCiA8bPUi7kZor%3DEKJqOrNxeGu5xoSpJHEA%40mail.gmail.com.
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CACj%3DBEhf-5xd1hVPUu%2B9qTyawvSJA%2Bz06OO5_ztQUo6Dc%2By2dg%40mail.gmail.com.
On Thu, Aug 16, 2018 at 8:17 PM Yoav Weiss <yo...@yoav.ws> wrote:On Wed, Aug 15, 2018 at 3:17 PM Hayato Ito <hay...@chromium.org> wrote:On Wed, Aug 15, 2018 at 1:25 AM Domenic Denicola <d...@domenic.me> wrote:From: Philip Jägenstedt <foo...@chromium.org>
> We're still concerned that the replacement will be less performant than HTML imports,
My understanding is that many of the theoretical performance benefits of HTML imports were not, in the end, implemented; in practice to get acceptable performance with them sites had to use tooling like Vulcanize to inline their contents into the main page. See https://www.polymer-project.org/1.0/docs/tools/optimize-for-production for example. Hayato or the rest of the DOM team can weigh in further.
Yeah, in practice, I think most sites are using Vulcanize at this point.Polymer has already switched to use ES Modules, and I've not heard any significant performance regression on this switch, compared to HTML Imports.Interesting. Was the existing implementation not optimized to go through preloadScanning and progressive DOM building? Or are the payloads typically used too small for it to make a difference?I don't think any implementation of ES Modules are doing progressive DOM building. I think you can get more insights from ES Modules owners.
We know that ES Modules couldn't be a replacement of HTML Imports because they solve a different problem, however, from the performance perspective, ES Modules shouldn't be less performant than HTML imports.Can the HTML modules model enable progressive tokenization and DOM building?That is basically up-to UA. I don't see any reason Blink can't do that for HTML Modules.I guess the reason you asked these questions is to let us know that HTML Modules would be much better than ES Modules, regarding loading HTML and DOM building. Yup, that is the reason that we would like to move HTML Modules forward.
On Thu, Aug 16, 2018 at 2:26 PM Hayato Ito <hay...@chromium.org> wrote:On Thu, Aug 16, 2018 at 8:17 PM Yoav Weiss <yo...@yoav.ws> wrote:On Wed, Aug 15, 2018 at 3:17 PM Hayato Ito <hay...@chromium.org> wrote:On Wed, Aug 15, 2018 at 1:25 AM Domenic Denicola <d...@domenic.me> wrote:From: Philip Jägenstedt <foo...@chromium.org>
> We're still concerned that the replacement will be less performant than HTML imports,
My understanding is that many of the theoretical performance benefits of HTML imports were not, in the end, implemented; in practice to get acceptable performance with them sites had to use tooling like Vulcanize to inline their contents into the main page. See https://www.polymer-project.org/1.0/docs/tools/optimize-for-production for example. Hayato or the rest of the DOM team can weigh in further.
Yeah, in practice, I think most sites are using Vulcanize at this point.Polymer has already switched to use ES Modules, and I've not heard any significant performance regression on this switch, compared to HTML Imports.Interesting. Was the existing implementation not optimized to go through preloadScanning and progressive DOM building? Or are the payloads typically used too small for it to make a difference?I don't think any implementation of ES Modules are doing progressive DOM building. I think you can get more insights from ES Modules owners.Apologies for not being clearer. By "existing implementation" I was referring to the current HTML imports implementation.We know that ES Modules couldn't be a replacement of HTML Imports because they solve a different problem, however, from the performance perspective, ES Modules shouldn't be less performant than HTML imports.Can the HTML modules model enable progressive tokenization and DOM building?That is basically up-to UA. I don't see any reason Blink can't do that for HTML Modules.I guess the reason you asked these questions is to let us know that HTML Modules would be much better than ES Modules, regarding loading HTML and DOM building. Yup, that is the reason that we would like to move HTML Modules forward.I was asking that because I wanted to know the answer :)I wasn't sure if the reliance on ES modules as infrastructure would make it more difficult to process the HTML content progressively.Glad to see you don't foresee any difficulties there, and glad to hear HTML modules is something the team continues to pursue.
----ES Modules' performance is getting better and better, I think.In addition to that, as Olli@ pointed out in this thread, other browsers never get performance benefits from HTML Imports.Polymer team would have more insights on the performance.--Hayato
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAFpjS_1xd02xp8vVCiA8bPUi7kZor%3DEKJqOrNxeGu5xoSpJHEA%40mail.gmail.com.
You received this message because you are subscribed to the Google Groups "blink-dev" group.To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CACj%3DBEhf-5xd1hVPUu%2B9qTyawvSJA%2Bz06OO5_ztQUo6Dc%2By2dg%40mail.gmail.com.
--Hayato
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAFpjS_0zGUXd6gHQMJFrBwSZvW9buZm-OCp4v_AbQbqPO86wrA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CACj%3DBEjrne99e1UVtmhfkmEgqRtjH_wPuSnzdJYN0D66EVVJ_g%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAARdPYebYDX%2BcX7U_5CFifr70vyT7Zy9%3Dn-ow1fpwQk5Z_SHiA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAFpjS_2U2uZvHgq0PA8FJ_43deVagks75R1Y9akGc-_pmcnB7A%40mail.gmail.com.