[WICG/webcomponents] Creating non-ugraded defined custom element : `createElement(tagname, {upgrade:false})` (Issue #1097)

denis-migdal created an issue (WICG/webcomponents#1097)

It could be great if we could easily create non-ugraded defined custom element.

Currently, to do that, we need to create a `<template>` element, set its content with `.innerHTML`, and then fetch the element :
```js
const t = document.createElement("template");
t.innerHTML = "<my-tag></my-tag>";
const elem = t.content.firstChild;
```

We can also create the element on another document, but then the element is impossible to upgrade :
```js
const doc = new Document();
const elem = doc.createElement("my-tag");
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/WICG/webcomponents/issues/1097
You are receiving this because you are subscribed to this thread.

Message ID: <WICG/webcomponents/issues/1097@github.com>

Received on Monday, 17 February 2025 17:25:39 UTC