A lightweight polyfill for the W3C Custom Elements V1 specification, enabling custom HTML elements in older browsers.
Document Register Element is a polyfill that implements the W3C Custom Elements V1 specification, allowing developers to define and use custom HTML elements in browsers that do not natively support the standard. It solves the problem of inconsistent custom element behavior across older browsers by providing a lightweight, spec-compliant shim. The polyfill enables features like class-based element definition, lifecycle callbacks, and extending native elements.
Frontend developers and teams building web applications that need to use custom elements while maintaining compatibility with legacy browsers like IE8+, older mobile browsers, and environments without native V1 support.
Developers choose this polyfill for its reliability, minimal size, and extensive browser support. It has been proven in production by major projects and offers a straightforward way to adopt Custom Elements V1 without waiting for universal native implementation.
A stand-alone working lightweight version of the W3C Custom Elements specification
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Implements the modern Custom Elements V1 API including class-based definition and lifecycle callbacks, ensuring alignment with W3C standards as highlighted in the README.
Works on legacy browsers like IE8+ and older mobile platforms such as iOS 5.1+, providing broad compatibility for cross-browser applications as tested in production.
Minimal overhead at around 5KB minified and gzipped, focusing on performance in resource-constrained environments, a key feature noted in the description.
Offers a non-polluting version that can be conditionally applied without automatic global patching, giving developers control over polyfill injection as described in the 'New Ponyfill' section.
The README explicitly states it's deprecated and recommends using @ungap/custom-elements, meaning no future updates, support, or fixes, making it risky for new adoption.
Version 1.9 doesn't patch native-supported browsers, but transpilers like TypeScript can break class inheritance, requiring careful configuration and potential workarounds as warned in the README.
Has constructor caveats that need workarounds like upgrading the constructor context or using a base class, complicating development and deviating from native behavior as detailed in the 'V1 Caveat' section.
Lacks built-in Shadow DOM support and advises against other polyfills, limiting full web components implementation in older browsers and requiring separate solutions like attach-shadow.