A repo containing samples tied to new functionality in each release of Google Chrome.
Перейти к файлу
Veeck 31b4635295 Add label to images to clarify which is currently displayed (#626) 2019-10-11 13:51:37 +02: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 Added Allow popups to escape sandboxed iframe Sample 2015-07-31 11:05:24 +02:00
app-install-banner Merge pull request #455 from dandv/patch-2 2018-01-11 14:05:43 +00: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 audionode disconnect sample, plus audio from h5r 2015-04-14 18:31:57 +10:00
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 Added Block modal dialogs in a sandboxed iframe Sample 2015-07-31 11:07:25 +02:00
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
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 Update Photo Resolution sample (#530) 2017-07-29 07:12:45 +02:00
image-rendering-pixelated Switched to https://www.chromestatus.com instead of http 2015-10-27 08:32:20 +01:00
images Images and some small style changes to bring the placeholder more inline with the WSK basic.html. 2014-08-27 19:35:04 -04:00
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 spelling mistake (#359) 2016-06-02 10:46:58 -04: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 sourceBuffer.changeType sample (#600) 2018-09-17 09:01:45 +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 Add fastseek support (#653) 2019-10-08 10:22:34 +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 Add saveData attribute to the NetInfo samples page (#561) 2017-12-14 04:33:05 -08: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 Move Android Pay sample to Google Pay 2018-07-17 11:42:52 -04: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 Add CSS pseudo-class :picture-in-picture Sample (#640) 2019-05-08 06:56:20 -07:00
play-return-promise Review feedback 2016-03-07 10:45:31 -05:00
presentation-api [Presentation API] Update receiver sample to check connections after DOM is loaded. (#582) 2018-05-07 19:25:05 +02: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
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 Tiny refactor of sample caching service worker (#440) 2019-03-06 10:38:06 -05: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 Add Web Bluetooth Availability Sample (#648) 2019-10-08 10:32:49 +02: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
.DS_Store Variable fonts (#570) 2018-04-09 16:27:33 +02: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 Variable fonts (#570) 2018-04-09 16:27:33 +02:00
.travis.yml Update Travis CI config to use Ruby 2.2.2 (#387) 2016-07-13 13:33:42 -04:00
Gemfile Require >= v39 of the github-pages gem 2015-09-28 13:56:16 -04:00
LICENSE <dialog> demo and some placeholder templates. 2014-08-05 18:53:30 +01:00
README.md Updated the README with ESLint info 2015-12-11 17:18:35 -05:00
_config.yml ESLint, with the Google config 2015-12-11 17:04:47 -05:00
index.html # This is a combination of 48 commits. 2015-10-09 11:10:54 +01:00
package.json ESLint, with the Google config 2015-12-11 17:04:47 -05: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.