gitmyhub

samples

JavaScript ★ 5.9k updated 4h ago

A repo containing samples tied to new functionality in each release of Google Chrome.

This repository is a collection of small code samples created by the Google Chrome team to demonstrate new browser features as they are added to Chrome. Each time Chrome ships a new web platform capability, a corresponding demo shows developers how that feature works in practice. The samples are hosted as a website and are also browsable through the Chrome Platform Status site, which tracks every feature added to the browser.

Each sample is a self-contained folder containing HTML, JavaScript, and CSS files. Some samples use a Jekyll-based templating system to reduce repeated boilerplate, while simpler contributions can just be plain files in a folder. The entire site is served from the gh-pages branch of the repository.

Contributing a new sample follows a defined process. You start from a template provided in the repository, create a folder for the feature, write the demo, and file a pull request against the gh-pages branch. The instructions suggest mentioning the Chrome engineer who implemented the feature in the pull request so they can verify the sample accurately represents what was built. Their contact information can be found in the corresponding Chrome Platform Status entry.

Code style follows the Google JavaScript Style Guide. Linting is enforced with ESLint using a Google base configuration, and can be run locally with a standard npm command. The README also notes that many code editors can show linting errors in real time, which helps catch problems before submitting.

This is primarily a reference and documentation resource rather than a reusable library.