Skip to content

pantoken / renderers/web-components/src / RegisterContext

인터페이스: RegisterContext

알파

모든 ElementDefinition에 스레드되는 register() 호출이 한 번 생성하는 공유 상태입니다. 이 상태는 접두사 인식 레지스트리 어댑터, 중첩 마크업을 위한 tag() 헬퍼, CSS 클래스 접두사 I, Invoker Commands 지원 플래그 및 라우터, wrapper/variantClass/iconSvg 팩토리들, 그리고 로케일 데이터(strings, locale, dir, firstDay)를 담고 있습니다.

속성

registry

registry: ElementRegistry

알파

The scoped registry: rewrites instui-<base> → the active-prefix tag on get/define.


tag

tag: (base) => string

알파

기본 이름을 활성 접두사 태그에 매핑합니다(중첩 마크업을 위한 querySelector, tagName).

매개변수

base

string

반환값

string


I

I: object

알파

인라인된 컴포넌트 시트의 CSS 클래스 접두사 — 항상 instui이며 태그 접두사와는 별도입니다.

prefix

readonly prefix: "instui"


invokerSupported

invokerSupported: boolean

알파

브라우저가 Invoker Commands API(command/commandfor)를 지원하는지 여부.


onCommand

onCommand: OnCommand

알파

대상 요소의 command 이벤트(또는 클릭 폴백)를 핸들러로 라우팅합니다.


wrapper

wrapper: (tag, css, render, options?) => void

알파

Define a shadow-DOM element: <style>:host{display}css</style> + markup from render(host). invoker: true forwards the host's popovertarget/command to the inner <button> (IDL).

매개변수

tag

string

css

string

render

(host) => string

options?
display?

string

invoker?

boolean

반환값

void


variantClass

variantClass: (name, host) => string

알파

Build a .instui-<name> class with an optional -color-<variant> modifier from variant.

매개변수

name

string

host

HTMLElement

반환값

string


iconSvg

iconSvg: (name) => string

알파

아이콘 이름을 인라인 SVG로 해석합니다(알 수 없을 경우 빈 문자열).

매개변수

name

string

반환값

string


locale

locale: string

알파

toLocaleDateStringIntl 포맷팅에 사용되는 BCP47 로케일 태그.


dir

dir: "ltr" | "rtl"

알파

활성 로케일 번들에서 파생된 텍스트 방향.


firstDay

firstDay: number

알파

JS Date.getDay() 인덱스로 표현된 주의 첫째 날(0=일요일 … 6=토요일).


strings

strings: WebComponentStrings

알파

모든 동작 요소에 대한 번역된 UI 문자열.