A repo containing samples tied to new functionality in each release of Google Chrome.
Перейти к файлу
Jeff Posnick 79a8afc81d Sample for KeyboardEvent.key 2016-04-13 15:41:59 -04:00
SAMPLE_STARTING_POINT Externalising JS 2015-10-05 18:07:03 +01:00
_includes More tweaks 2016-02-11 11:12:18 +00:00
_layouts Adjust default style 2016-02-24 15:30:08 +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 Delete .DS_Store 2016-01-12 14:12:32 -08: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
audio audionode disconnect sample, plus audio from h5r 2015-04-14 18:31:57 +10: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 ESLint, with the Google config 2015-12-11 17:04:47 -05: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-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-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-shapes Switched to https://www.chromestatus.com instead of http 2015-10-27 08:32:20 +01: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 ESLint, with the Google config 2015-12-11 17:04:47 -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 Fix off by 1 error in generators example 2015-11-13 18:13:43 +01:00
idb-getall Missing semicolon. 2015-11-30 10:58:11 -05: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
input-device-capabilities Review feedback 2015-10-13 12:09:45 -04:00
keyboardevent-code-attribute KeyboardEvent.code attribute sample. 2015-11-24 11:00:38 -05: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-hover-pointer Fix media query checking for absence of any fine pointer 2016-01-04 21:11:29 +00: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
network-information Removed the bit about iOS support. 2015-11-25 08:53:28 -05: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
permissions Fixing JSHint errors 2015-08-27 10:41:56 +01:00
picture-element Switched to https://www.chromestatus.com instead of http 2015-10-27 08:32:20 +01:00
play-return-promise Review feedback 2016-03-07 10:45:31 -05:00
promise-rejection-events onResolved → onFulfilled 2016-01-29 15:23:25 -05:00
push-messaging-and-notifications Fix a typo in README.md 2016-01-30 15:25:50 +01:00
report-validity # This is a combination of 48 commits. 2015-10-09 11:10:54 +01: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 Properly wait on ready promise 2016-02-11 10:36:32 +00:00
spread-operator Switched to https://www.chromestatus.com instead of http 2015-10-27 08:32:20 +01:00
styles Adjust default style 2016-02-24 15:30:08 +01: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
typedarray-methods-es6 Externalising JS 2015-10-05 18:07:03 +01:00
urlsearchparams Better demo 2016-01-25 11:14:28 -08: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 Add theme_color and background_color (a nice happy-cloud grey) 2016-03-10 08:58:12 -08:00
web-bluetooth Add description to web bluetooth samples index page. 2016-03-01 15:24:38 +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
.eslintignore Don't lint vendor/ 2015-12-11 17:20:56 -05:00
.eslintrc ESLint, with the Google config 2015-12-11 17:04:47 -05:00
.gitignore Merge remote-tracking branch 'upstream/gh-pages' into gh-pages 2015-07-08 11:25:50 -04:00
.travis.yml ESLint, with the Google config 2015-12-11 17:04:47 -05: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.