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 Externalising JS 2015-10-05 18:07:03 +01:00
_includes Add warning message if min chrome version check fails (#369) 2016-06-16 10:19:24 -04:00
_layouts Add Auto Picture-in-Picture sample (#628) 2019-02-06 08:23:49 +01:00
allow-popups-to-escape-sandbox
app-install-banner Merge pull request #490 from petrkle/related-applications-info 2024-10-17 16:03:40 -07:00
array-includes-es7 Externalising JS 2015-10-05 18:07:03 +01:00
array-methods-es6 ESLint, with the Google config 2015-12-11 17:04:47 -05:00
arrows-es6 ESLint, with the Google config 2015-12-11 17:04:47 -05:00
async-clipboard Switch to addEventListener 2018-03-14 12:17:53 -04:00
audio
auto-picture-in-picture Update origin trial token 2019-04-29 09:05:29 +02:00
autocapitalize Template migration 2015-10-13 01:16:38 -04:00
battery-status ESLint, with the Google config 2015-12-11 17:04:47 -05:00
beacon Switched to https://www.chromestatus.com instead of http 2015-10-27 08:32:20 +01:00
block-modal-dialogs-sandboxed-iframe
classes-es6 s/pple/ple/g (#398) 2016-08-01 10:02:43 -04:00
collections-iterators-es6 Don't log two spaces 2015-12-25 20:56:50 +01:00
compute-pressure Update README.md 2021-06-03 13:58:08 -04:00
computed-properties-es6 Switched to https://www.chromestatus.com instead of http 2015-10-27 08:32:20 +01:00
cookie-prefixes Review feedback. 2016-01-29 10:17:16 -05:00
csp-upgrade-insecure-requests Switched to https://www.chromestatus.com instead of http 2015-10-27 08:32:20 +01:00
css-alpha-channel Alpha (#363) 2016-06-09 13:32:03 -04:00
css-attribute-case-sensitivity Added Case-insensitive Attribute Selector Matching sample 2016-01-05 12:10:28 +01:00
css-custom-properties Review changes for @jeffposnick and @ebidel 2016-01-23 22:59:19 -08:00
css-escape fix a few typos 2016-01-07 16:48:09 -06:00
css-flexbox-abspos Sample for new CSS Flexbox absolute-positioned children. (#353) 2016-06-02 16:10:02 -04:00
css-hyphens CSS hyphens example (#429) 2016-10-19 16:54:05 -04:00
css-intrinsic-sizing Fix typo 2015-10-16 15:14:40 -04:00
css-motion-path ESLint, with the Google config 2015-12-11 17:04:47 -05:00
css-opacity-force-flattening Force Flattening When Ancestor Has Opacity Sample (#393) 2016-08-02 12:57:55 -04:00
css-shapes Switched to https://www.chromestatus.com instead of http 2015-10-27 08:32:20 +01:00
css-will-change-transform-rasterization Rasterization & will-change: transform sample (#394) 2016-08-01 14:45:12 -04:00
cut-and-copy ESLint, with the Google config 2015-12-11 17:04:47 -05:00
decorators-es7/read-write Trialing the gulp linting 2015-09-02 12:14:18 +01:00
default-parameters-es6 Address feedback on def. params 2016-01-27 13:58:41 -08:00
destructuring-es6 Address review feedback 2016-01-26 19:58:26 -08:00
dialog Merge remote-tracking branch 'upstream/gh-pages' into templatization 2015-11-03 11:08:21 -05:00
encoding-api ESLint, with the Google config 2015-12-11 17:04:47 -05:00
event-istrusted ESLint, with the Google config 2015-12-11 17:04:47 -05:00
event-listeners-mandatory-arguments Added addEventListener/removeEventListener non-optional arguments Sample 2016-01-04 16:30:12 +01:00
event-timestamp Remove the new Date() stuff 2016-01-22 12:37:44 -05:00
extended-object-literals-es6 ESLint, with the Google config 2015-12-11 17:04:47 -05:00
extended-unicode-escapes Fixing JSHint errors 2015-08-27 10:41:56 +01:00
fetch-api Add newer referrer policies (#565) 2018-01-11 10:51:43 -05:00
file-constructor Switched to https://www.chromestatus.com instead of http 2015-10-27 08:32:20 +01:00
focus-navigation-start-point Broken link 2016-03-18 14:25:50 +05:30
font-face-set ESLint, with the Google config 2015-12-11 17:04:47 -05:00
formdata-methods review comments 2016-03-15 07:52:40 +11:00
generators Fixed TypeError caused by invoking generator function with 'new' keyword 2017-11-10 01:12:03 +02:00
hdcp-detection Update HDCP sample (#629) 2019-01-31 09:07:42 +01:00
idb-getall Missing semicolon. 2015-11-30 10:58:11 -05:00
image-capture Fix background-blur.js (#852) 2024-09-27 09:49:37 +02:00
image-rendering-pixelated Switched to https://www.chromestatus.com instead of http 2015-10-27 08:32:20 +01:00
images
indexeddb-observers Fix nit in IndexedDB Observers Sample (#479) 2017-01-31 10:17:36 +01:00
input-device-capabilities Review feedback 2015-10-13 12:09:45 -04:00
intersectionobserver Fix comment 2020-03-13 09:52:27 -07:00
intrinsic-size Update index.html 2018-09-14 12:29:36 -05:00
keyboardevent-code-attribute Check to see if KeyboardEvent.code is supported 2016-04-14 14:57:09 -04:00
keyboardevent-key-attribute Sample for KeyboardEvent.key 2016-04-13 15:41:59 -04:00
lexical-declarations-es6 Fixing JSHint errors 2015-08-27 10:41:56 +01:00
media Add EME MediaKeySession Closed Reason sample (#741) 2021-09-21 09:15:07 +02:00
media-capabilities Update OT token 2019-08-26 11:51:34 +02:00
media-hover-pointer Link update to current specification 2017-05-17 23:37:00 -07:00
media-session Update video.js (#831) 2024-04-12 09:16:56 +02:00
mouseevent-get-modifier-state ESLint, with the Google config 2015-12-11 17:04:47 -05:00
multi-column-css Switched to https://www.chromestatus.com instead of http 2015-10-27 08:32:20 +01:00
muted-autoplay Autoplay Muted Video on Android sample (#395) 2016-08-01 10:06:28 -04:00
network-information netinfo: fix incorrect spacing (#701) 2020-09-28 16:06:07 -04:00
new-target-es6 ESLint, with the Google config 2015-12-11 17:04:47 -05:00
notifications ESLint, with the Google config 2015-12-11 17:04:47 -05:00
object-assign-es6 ESLint, with the Google config 2015-12-11 17:04:47 -05:00
paymentrequest Replace basic-card with BobBucks in paymentrequests samples (#769) 2022-03-07 15:22:39 -05:00
permissions Fixing JSHint errors 2015-08-27 10:41:56 +01:00
picture-element Add label to images to clarify which is currently displayed (#626) 2019-10-11 13:51:37 +02:00
picture-in-picture Update Picture-in-Picture CSS pseudo class sample 2022-12-12 10:49:56 +00:00
play-return-promise Review feedback 2016-03-07 10:45:31 -05:00
presentation-api Fix receiver demo (#753) 2021-11-08 14:52:30 +01:00
promise-rejection-events onResolved → onFulfilled 2016-01-29 15:23:25 -05:00
proxies-es6 Add ES2015 Proxies sample (#275) 2016-05-24 12:36:26 -04:00
push-messaging-and-notifications Fix typo (#489) 2017-06-05 14:45:49 +01:00
quictransport Update README.md 2020-12-02 09:59:35 -05:00
report-validity # This is a combination of 48 commits. 2015-10-09 11:10:54 +01:00
resizeobserver Add ResizeObserver sample (#424) 2016-10-11 13:26:58 -04:00
rest-parameters-es6 ESLint, with the Google config 2015-12-11 17:04:47 -05:00
screen-orientation Switched to https://www.chromestatus.com instead of http 2015-10-27 08:32:20 +01:00
service-worker Fixes #772 2022-05-17 09:13:51 -04:00
spread-operator Switched to https://www.chromestatus.com instead of http 2015-10-27 08:32:20 +01:00
styles CSS Nit: Align vertically status and log (#372) 2016-06-16 13:38:01 -04:00
subresource-integrity Update index.html 2015-11-30 12:08:38 -08:00
template-literals-es6 Fixing JSHint errors 2015-08-27 10:41:56 +01:00
touch-action Add touch-action demo, based on Matt Gaunt's work. (#459) 2016-12-07 11:38:59 -05:00
typedarray-methods-es6 Externalising JS 2015-10-05 18:07:03 +01:00
urlsearchparams Better demo 2016-01-25 11:14:28 -08:00
variable-fonts-experiments Variable fonts (#570) 2018-04-09 16:27:33 +02:00
vibration ESLint, with the Google config 2015-12-11 17:04:47 -05:00
web-animations Merge pull request #239 from beaufortfrancois/removeUpdatesHtml5Rocks 2015-10-28 11:47:34 -04:00
web-application-manifest Remove density from manifest (#457) 2016-12-05 11:02:08 -05:00
web-bluetooth Update exclusion-filters-async-await.html 2023-04-04 12:57:11 +02:00
web-nfc Add Make Read-Only feature (#763) 2022-02-01 09:12:32 +01:00
web-share Bump braces from 3.0.2 to 3.0.3 in /web-share 2024-10-10 21:41:09 +00:00
web-vr Adds input demo 2016-12-08 10:55:49 +00:00
webassembly Add missing C file 2018-06-13 17:02:11 +01:00
webaudio-audiocontext-close Switched to https://www.chromestatus.com instead of http 2015-10-27 08:32:20 +01:00
webaudio-audionode-disconnect Switched to https://www.chromestatus.com instead of http 2015-10-27 08:32:20 +01:00
webaudio-method-chaining ESLint, with the Google config 2015-12-11 17:04:47 -05:00
webaudio-offlinecontext-rendering Switched to https://www.chromestatus.com instead of http 2015-10-27 08:32:20 +01:00
webaudio-suspend-resume Fixing JSHint errors 2015-08-27 10:41:56 +01:00
webtransport [webtransport] remove unnecessary code (#764) 2022-02-03 19:35:56 -05:00
.DS_Store Replace basic-card with BobBucks in paymentrequests samples (#769) 2022-03-07 15:22:39 -05:00
.eslintignore Don't lint vendor/ 2015-12-11 17:20:56 -05:00
.eslintrc Add eslint rule about single-parameter arrow functions. (#408) 2016-08-23 16:18:57 -04:00
.gitignore Update ignore 2021-08-06 10:14:42 -04:00
.travis.yml Update Travis CI config to use Ruby 2.2.2 (#387) 2016-07-13 13:33:42 -04:00
Gemfile Add presenting slides actions sample 2022-12-01 14:23:24 +00:00
LICENSE
README.md Updated the README with ESLint info 2015-12-11 17:18:35 -05:00
_config.yml Rename gems to plugins in _config.yml 2024-10-14 09:57:43 -07:00
index.html # This is a combination of 48 commits. 2015-10-09 11:10:54 +01:00
package-lock.json Bump lodash and eslint 2023-08-09 22:06:58 +00:00
package.json Bump lodash and eslint 2023-08-09 22:06:58 +00:00

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.