Function: defineRasdElement()
function defineRasdElement(tag?): DefineRasdElementResult;
Defined in: packages/element/src/element.tsx:410
Register <rasd-form> (docs/00 §11: defineRasdElement(tag = 'rasd-form')).
Two things this has to get right that are easy to get wrong.
A fresh subclass per call. customElements.define throws
NotSupportedError if the same constructor is registered under a second
name — so the documented escape hatch ("call it with another tag when the
host already owns rasd-form") would throw on the second call if it reused
one class. Each call gets its own anonymous subclass.
The double-load rule is per tag, not per bundle. docs/11 §17.1 says the
first definition wins, which must be checked against the tag being
registered — checking the literal 'rasd-form' would silently no-op a
perfectly legitimate defineRasdElement('agency-form').
Parameters
| Parameter | Type | Default value |
|---|---|---|
tag | string | 'rasd-form' |