- From: Joe Pea <notifications@github.com>
- Date: Sun, 21 Mar 2021 23:49:38 -0700
- To: WICG/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <WICG/webcomponents/issues/914/803808907@github.com>
> This might be somewhat surprising consequence of start using a scoped custom element registry and may cause havoc for some websites / web apps with a large number of web components with complex dependencies. A web component author today currently has to design their components to work no matter the order that global-registry elements are upgraded. F.e., an author needs to make sure all of these permutations work: ```html <script src="parent-el.js"></script> <script src="child-el.js"></script> <parent-el><child-el></child-el></parent-el> ``` ```html <script src="child-el.js"></script> <script src="parent-el.js"></script> <parent-el><child-el></child-el></parent-el> ``` <details> <summary>more permutations...</summary> ```html <script src="parent-el.js"></script> <parent-el><child-el></child-el></parent-el> <script src="child-el.js"></script> ``` ```html <script src="child-el.js"></script> <parent-el><child-el></child-el></parent-el> <script src="parent-el.js"></script> ``` ```html <parent-el><child-el></child-el></parent-el> <script src="parent-el.js"></script> <script src="child-el.js"></script> ``` ```html <parent-el><child-el></child-el></parent-el> <script src="child-el.js"></script> <script src="parent-el.js"></script> ``` ... etc ... </details> For any CE author that already designs their elements robustly, the load order differences will not be a problem. **The top-down order is very intuitive and will lead to web developers having an easier time with less upgrade order issues. In React, Vue, Svelte, etc, the order is always top-down. It would confuse people otherwise.** The _ease_ of the developer experience may be something to consider here. The _single most difficult_ part of Custom Elements (for me) has been dealing with upgrade order. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/WICG/webcomponents/issues/914#issuecomment-803808907
Received on Monday, 22 March 2021 06:49:50 UTC