A repo containing samples tied to new functionality in each release of Google Chrome.
Перейти к файлу
Mark Foltz 552bfcba89
Merge pull request #490 from petrkle/related-applications-info
Add criteria for related app install banner
2024-10-17 16:03:40 -07:00
SAMPLE_STARTING_POINT
_includes
_layouts
allow-popups-to-escape-sandbox
app-install-banner
array-includes-es7
array-methods-es6
arrows-es6
async-clipboard
audio
auto-picture-in-picture
autocapitalize
battery-status
beacon
block-modal-dialogs-sandboxed-iframe
classes-es6
collections-iterators-es6
compute-pressure
computed-properties-es6
cookie-prefixes
csp-upgrade-insecure-requests
css-alpha-channel
css-attribute-case-sensitivity
css-custom-properties
css-escape
css-flexbox-abspos
css-hyphens
css-intrinsic-sizing
css-motion-path
css-opacity-force-flattening
css-shapes
css-will-change-transform-rasterization
cut-and-copy
decorators-es7/read-write
default-parameters-es6
destructuring-es6
dialog
encoding-api
event-istrusted
event-listeners-mandatory-arguments
event-timestamp
extended-object-literals-es6
extended-unicode-escapes
fetch-api
file-constructor
focus-navigation-start-point
font-face-set
formdata-methods
generators
hdcp-detection
idb-getall
image-capture
image-rendering-pixelated
images
indexeddb-observers
input-device-capabilities
intersectionobserver
intrinsic-size
keyboardevent-code-attribute
keyboardevent-key-attribute
lexical-declarations-es6
media
media-capabilities
media-hover-pointer
media-session
mouseevent-get-modifier-state
multi-column-css
muted-autoplay
network-information
new-target-es6
notifications
object-assign-es6
paymentrequest
permissions
picture-element
picture-in-picture
play-return-promise
presentation-api
promise-rejection-events
proxies-es6
push-messaging-and-notifications
quictransport
report-validity
resizeobserver
rest-parameters-es6
screen-orientation
service-worker
spread-operator
styles
subresource-integrity
template-literals-es6
touch-action
typedarray-methods-es6
urlsearchparams
variable-fonts-experiments
vibration
web-animations
web-application-manifest
web-bluetooth
web-nfc
web-share
web-vr
webassembly
webaudio-audiocontext-close
webaudio-audionode-disconnect
webaudio-method-chaining
webaudio-offlinecontext-rendering
webaudio-suspend-resume
webtransport
.DS_Store
.eslintignore
.eslintrc
.gitignore
.travis.yml
Gemfile
LICENSE
README.md
_config.yml
index.html
package-lock.json
package.json

README.md

Build Status

Google Chrome Samples

Samples tied to new functionality in Google Chrome.

Each sample corresponds to an entry in https://www.chromestatus.com/features, and using that interface is currently the best way to browse.

Contributing Samples

Please use SAMPLE_STARTING_POINT as a starting point.

While it's possible to simply create a standard set of HTML/JS/CSS files within the new directory, you can take advantage of the Jekyll-based templating system to handle most of the boilerplate. Any files that start with a front matter block will be templated, and any other files will be served verbatim.

If you're still unsure, two canonical samples that use templates are:

Follow the Using Jekyll with Pages guide to mimic the production Jekyll environment during local development.

Once complete, please file a pull request against the gh-pages branch with your sample. It's ideal when filing a pull request @-mention the relevant engineer who worked on adding the feature into Chrome, to solicit their feedback and ensure that the sample properly describes the functionality. The email address of the engineer who worked on a given feature can be found in the corresponding https://www.chromestatus.com/features entry. If you're unsure of the GitHub username corresponding to the engineer, an alternative is to email them a link to the pull request and ask for feedback directly.

Style / Linting / CI

The samples ideally should follow the Google JavaScript Style Guide, and that's enforced via ESLint, using the eslint-config-google base configuration, with a few overrides as needed.

Linting can be performed via npm run lint (make sure to npm install first).

Various IDEs offer real-time ESLint integration, and using those integrations that can help avoid errors before anything gets checked in.

Travis CI is currently being used to verify that the Jekyll build completes successfully and that linting passes without errors.