forked from mirrors/gecko-dev
Co-author/investigator: Tim Giles <tgiles@mozilla.com> When using SetElementCreationCallback with ESM based custom elements we are seeing a performance regression vs when we previously required manually adding a <script type="module"> for the import to the page. To work around this issue we can delay registering the callback until the DOMContentLoaded event which improves performance, presumably due to reduced thrashing from HTML parsing to JS parsing. With that change however any components that were encountered before the DOMContentLoaded event will not be loaded or upgraded until the next time a component of that type is created. This patch updates the SetElementCreationCallback function to immediately invoke the callback if there are candidate elements of that type to upgrade. Differential Revision: https://phabricator.services.mozilla.com/D212190 |
||
|---|---|---|
| .. | ||
| browser | ||
| mochitest | ||
| reftest | ||
| unit | ||
| moz.build | ||