document-register-element is a lightweight polyfill that brought Custom Elements APIs to browsers without complete native support. It supports both the older V0 model and much of the V1 specification, including autonomous elements and customized built-in elements. Developers can define components with lifecycle callbacks that respond to creation, connection, removal, and observed attribute changes. The package uses feature detection so modern browsers can retain native behavior instead of receiving unnecessary patches. It can be loaded through npm, CommonJS, AMD, bundlers, a script tag, or a CDN. The repository is archived and deprecated, and its maintainer recommends newer custom-elements packages for current projects.
Features
- Custom Elements V0 and V1 compatibility
- Autonomous custom element definitions
- Customized built-in element support
- Component lifecycle callbacks
- Automatic browser feature detection
- npm, AMD, CommonJS, CDN, and script loading