CustomElement API
Table of Contents
Core Methods
CustomElement.for
Method Signatures
Parameters
Examples
CustomElement.define
Method Signatures
Parameters
Examples
CustomElement.getDefinition
Method Signature
Parameters
Return Value
Example
CustomElement.find
Method Signature
Parameters
Return Value
Example
CustomElement.isType
Method Signature
Parameters
Return Value
Example
Metadata Methods
CustomElement.annotate
Method Signature
Parameters
Example
CustomElement.getAnnotation
Method Signature
Parameters
Return Value
Example
Utility Methods
CustomElement.generateName
Method Signature
Return Value
Example
CustomElement.generateType
Method Signature
Parameters
Return Value
Example
CustomElement.createInjectable
Method Signature
Return Value
Example
CustomElement.keyFrom
Method Signature
Parameters
Return Value
Example
Decorators
@customElement Decorator
Syntax
Examples
@useShadowDOM Decorator
Syntax
Example
@containerless Decorator
Syntax
Example
@capture Decorator
Syntax
Example
@processContent Decorator
Syntax
Example
Definition Objects
PartialCustomElementDefinition
Properties
Example
CustomElementDefinition
Key Properties
Programmatic Resource Aliases
alias(...aliases) decorator
alias(...aliases) decoratorregisterAliases(...)
registerAliases(...)Best Practices
1. Use Decorators Over Direct API Calls
2. Type Your Controllers
3. Handle Errors Gracefully
4. Leverage Definition Objects for Complex Elements
Last updated
Was this helpful?