Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix out-of-date code comment #3315

Merged
merged 1 commit into from
Jan 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,13 @@ import { createCustomElementUsingUpgradableConstructor } from './create-custom-e
import type { LifecycleCallback } from '@lwc/engine-core';

/**
* We have three modes for creating custom elements:
* We have two modes for creating custom elements:
*
* 1. Compat (legacy) browser support (e.g. IE11). Totally custom, doesn't rely on native browser APIs.
* 2. "Upgradable constructor" custom element. This allows us to have two LWC components with the same tag name,
* via a trick: every custom element constructor we define in the registry is basically the same. It's essentially
* a dummy `class extends HTMLElement` that accepts an `upgradeCallback` in its constructor ("upgradable
* constructor"), which allows us to have completely customized functionality for different components.
* 3. "Scoped" (or "pivot") custom elements. This relies on a sophisticated system that emulates the "scoped custom
* elements registry" proposal, with support for avoiding conflicts in tag names both between LWC components and
* between LWC components and third-party elements. This uses a similar trick to #2, but is much more complex
* because it must patch the global `customElements` and `HTMLElement` objects.
*/
export let createCustomElement: (
tagName: string,
Expand Down