HTML as Custom Elements
The HTML as Custom Elements project is an ambitious initiative aimed at reimagining the elements of HTML as custom components. This venture not only seeks to find the missing platform APIs essential for replicating the functionality of native HTML elements but also to validate the design principles of custom elements as foundational APIs for the web. As the project is exploratory at this stage, it envisions a future where its code forms a basis for more robust integration into rendering engines, paving the way for a more adaptable web environment.
Led by the Blink team with interest from the Servo team, this project highlights the complexities and challenges involved in redefining HTML elements. Through a demo showcasing several simple elements, it points out the gaps in functionality, particularly in accessibility, while emphasizing the need for a layered platform that allows developers to harness lower-level APIs seamlessly.
Custom Element Creation: Aims to rebuild native HTML elements as custom components, enabling developers to create reusable and composable features.
API Discovery: Identifies and categorizes missing platform APIs necessary to provide functionalities offered by native elements.
Declarative and Imperative APIs: Encourages a structure where higher-level APIs can be explained through lower-level APIs, improving usability for developers.
Encapsulation Efforts: Acknowledges the limitations of custom elements compared to native ones, particularly regarding true encapsulation of implementation.
Lifecycle Hooks: Offers unique opportunities to interact with the lifecycle of elements, enhancing the behavior and interactivity of web applications.
Accessibility Gap Analysis: Highlights the importance of accessibility within custom elements, identifying current shortcomings in this vital area.
Experimental Features in Chromium: Proposes the testing and validation of new APIs through experimental versions in the Chromium browser to establish standards for future development.
Gulp.js is an old but popular site building tool that automates various repetitive development tasks in web development, such as compiling Sass, minifying JavaScript, and optimizing images.