Skip to content

Commit

Permalink
create wc after registration (#3552)
Browse files Browse the repository at this point in the history
  • Loading branch information
hardl authored Dec 1, 2023
1 parent a78094e commit 5c16b0a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/src/services/web-components.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,14 +263,15 @@ class WebComponentSvcClass {
if (renderer.viewUrl) {
try {
const wc_id = navNode?.webcomponent?.tagName || this.generateWCId(renderer.viewUrl);
const wc = document.createElement(wc_id);
if (navNode?.webcomponent?.selfRegistered) {
this.includeSelfRegisteredWCFromUrl(navNode, renderer.viewUrl, () => {
const wc = document.createElement(wc_id);
this.initWC(wc, wc_id, wc, renderer.viewUrl, ctx, '_root');
resolve(wc);
});
} else {
this.registerWCFromUrl(renderer.viewUrl, wc_id).then(() => {
const wc = document.createElement(wc_id);
this.initWC(wc, wc_id, wc, renderer.viewUrl, ctx, '_root');
resolve(wc);
});
Expand Down

0 comments on commit 5c16b0a

Please sign in to comment.