Version 9 (modified by, 12 years ago) (diff)


The Care and Feeding of WebCore Modules


As we add more features to WebCore, the project becomes more complex. Some features, like IndexedDB and MediaStream, add DOM interfaces but aren't otherwise involved in the core functionality of the engine, such as layout and rendering. WebCore Modules let us reduce the complexity of the project by loosening the coupling of between these features and the rest of WebCore.

This document describes how WebCore's module system works and how to leverage it when building a new feature.

Dependency diagram

The code for a module belongs in a subdirectory of the Modules directory and in a subdirectory of WebCore/platform. For example, the MediaStream module is contained in and

Associating JavaScript APIs with "core" objects

Associating state with "core" objects

Observing the lifecycle of "core" objects

Adding new events and exceptions