You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From #710, we should provide a mechanism to prevent automatic upgrades when defining a new custom element so that we'll end up with more predictable upgrading order & avoid O(nk) runtime cost of iterating over n DOM nodes for k custom elements.
The text was updated successfully, but these errors were encountered:
That clearly allows for batching, but might not be general enough if there's not a single point where definitions can be made as is typical for using the current global registry. It might be sufficient for scoped registries though.
Though due to module import ordering, disabling will need to happen before importing self-registering elements, so using it won't always be so straight-forward:
Maybe it would make sense to extend existing define method with an additional field in options param?
As an user we would provide a hint to the browser that we would like to upgrade a batch of custom elements manually later by passing upgrade: false to define method:
After that when the custom elements module(s) are imported, parsed and executed, we would call upgrade on elements that we need:
import'./my-element-1.js';import'./my-element-2.js';customElements.upgradeMultiple(['my-element-1','my-element-2']);// not sure what should be the argument here
From #710, we should provide a mechanism to prevent automatic upgrades when defining a new custom element so that we'll end up with more predictable upgrading order & avoid O(nk) runtime cost of iterating over n DOM nodes for k custom elements.
The text was updated successfully, but these errors were encountered: