├── SAMPLE_STARTING_POINT ├── demo.js └── README.md ├── encoding-api ├── utf8.bin ├── macintosh.bin ├── utf16le.bin ├── README.md └── index.html ├── muted-autoplay ├── styles.css ├── chrome-clip.mp4 └── README.md ├── computed-properties-es6 └── README.md ├── new-target-es6 ├── .eslintrc ├── README.md ├── demo.js └── index.html ├── font-face-set ├── .eslintrc └── README.md ├── typedarray-methods-es6 ├── demo2.js ├── demo1.js └── README.md ├── vibration ├── .eslintrc ├── demo1.js ├── demo2.js ├── demo4.js ├── README.md ├── demo3.js └── index.html ├── service-worker ├── prefetch │ ├── static │ │ ├── pre_fetched.txt │ │ ├── not_pre_fetched.txt │ │ └── pre_fetched.html │ └── README.md ├── window-caches │ ├── static │ │ ├── pre_fetched.txt │ │ └── pre_fetched.html │ └── README.md ├── registration │ ├── service-worker.js │ └── README.md ├── .eslintrc ├── custom-offline-page │ ├── index.js │ ├── images │ │ ├── launcher-icon-2x.png │ │ └── launcher-icon-4x.png │ ├── README.md │ ├── manifest.json │ └── index.html ├── windowclient-navigate │ ├── index.js │ ├── README.md │ ├── service-worker.js │ └── activated.html ├── prefetch-video │ ├── static │ │ └── poster.jpg │ └── README.md ├── basic │ ├── icons │ │ ├── ic_folder_black_48dp.png │ │ ├── ic_file_upload_black_48dp.png │ │ ├── ic_folder_open_black_48dp.png │ │ ├── ic_folder_shared_black_48dp.png │ │ └── ic_create_new_folder_black_48dp.png │ ├── styles.css │ ├── README.md │ └── demo.js ├── mock-responses │ └── README.md ├── post-message │ └── README.md ├── fallback-response │ └── README.md ├── immediate-control │ └── README.md ├── selective-caching │ └── README.md ├── multiple-handlers │ └── README.md ├── registration-events │ └── README.md ├── foreign-fetch │ ├── README.md │ ├── local-client.js │ ├── package.json │ └── foreign-fetch-sw.js ├── read-through-caching │ └── README.md └── offline-analytics │ └── README.md ├── subresource-integrity ├── correct_hash.css ├── incorrect_hash.css └── README.md ├── .DS_Store ├── fetch-api ├── users.json ├── users.html ├── fetch-html-demo.js ├── fetch-json-demo.js ├── fetch-html.html ├── fetch-json.html ├── fetch-response-metadata.html ├── fetch-response-metadata-demo.js ├── fetch-post.html ├── fetch-success-error-handlers.html ├── fetch-reddit.html ├── fetch-success-error-handlers-demo.js ├── fetch-post-demo.js └── fetch-referrer-policy.html ├── .eslintignore ├── audio └── techno.wav ├── css-shapes ├── cat.png └── README.md ├── images ├── favicon.ico ├── touch │ ├── icon-128x128.png │ ├── chrome-touch-icon-192x192.png │ └── ms-touch-icon-144x144-precomposed.png └── apple-touch-icon-precomposed.png ├── notifications ├── .eslintrc ├── sw.js ├── index.html └── README.md ├── web-share ├── .gitignore ├── src │ ├── images │ │ ├── audio.png │ │ ├── icon.png │ │ ├── image.png │ │ ├── video.png │ │ └── splash.jpg │ ├── css │ │ └── index.css │ ├── index.html │ ├── js │ │ └── constants.js │ ├── manifest.json │ └── svelte │ │ └── components │ │ ├── Navbar.svelte │ │ └── Snackbar.svelte ├── workbox-config.js └── firebase.json ├── intrinsic-size ├── cat.jpg ├── README.md ├── unsized.html ├── sized.html └── width_only.html ├── web-bluetooth ├── icon.png ├── README.md ├── .eslintrc ├── _includes │ └── utils.html ├── availability.js ├── availability-async-await.js ├── availability.html ├── availability-async-await.html ├── battery-level-async-await.js ├── service-worker.js ├── battery-level.js ├── reset-energy-async-await.js ├── watch-advertisements.html ├── reset-energy.js ├── watch-advertisements-async-await.html ├── automatic-reconnect.html └── automatic-reconnect-async-await.html ├── webassembly ├── image.jpg ├── image.wasm ├── fib.c ├── README.md ├── fib.wasm └── webp.c ├── Gemfile ├── quictransport ├── screenshot.png ├── README.md └── client.html ├── webtransport ├── screenshot.png └── README.md ├── array-methods-es6 ├── .eslintrc ├── demo2.js ├── demo3.js ├── demo4.js ├── demo5.js ├── demo6.js ├── demo1.js ├── demo7.js ├── demo8.js └── README.md ├── autocapitalize └── readme.md ├── webaudio-method-chaining ├── audio.mp3 ├── .eslintrc ├── README.md └── demo.js ├── picture-element ├── images │ ├── butterfly.jpg │ ├── butterfly.webp │ ├── kitten-large.png │ ├── kitten-medium.png │ ├── kitten-small.png │ └── butterfly_small.jpg └── README.md ├── variable-fonts-experiments ├── .DS_Store ├── fonts │ ├── .DS_Store │ ├── Gingham.woff │ ├── DecovarAlpha-VF.ttf │ └── AmstelvarAlpha-VF.ttf ├── styles │ └── .DS_Store ├── samples │ ├── .DS_Store │ ├── SliderDemoMultipleValues │ │ └── .DS_Store │ ├── SliderDemoCustomPropVaribleFont │ │ ├── .DS_Store │ │ └── Gingham.woff │ ├── SimpleSliderDemo │ │ ├── style.css │ │ ├── script.js │ │ └── slider-test.html │ └── SliderDemoCustomProp │ │ ├── style.css │ │ └── slider-test.html ├── sketch │ └── designs.sketch ├── variable-fonts-viewer │ └── .DS_Store └── readme.md ├── decorators-es7 └── read-write │ ├── src │ ├── favicon.ico │ ├── scripts │ │ └── app-core.js │ └── styles │ │ └── app-core.scss │ └── package.json ├── web-vr └── basic-input │ └── images │ └── press-button.jpg ├── auto-picture-in-picture ├── launcher-icon-1x.png ├── launcher-icon-2x.png ├── launcher-icon-3x.png ├── launcher-icon-4x.png ├── launcher-icon-0-75x.png ├── launcher-icon-1-5x.png ├── service-worker.js ├── index.js └── manifest.json ├── web-application-manifest ├── launcher-icon-1x.png ├── launcher-icon-2x.png ├── launcher-icon-3x.png ├── launcher-icon-4x.png ├── launcher-icon-0-75x.png ├── launcher-icon-1-5x.png ├── README.md └── manifest.json ├── css-opacity-force-flattening ├── after-chrome-53.png ├── before-chrome-53.png └── README.md ├── image-capture ├── update-camera-zoom.css ├── background-blur.css ├── README.md ├── photo-resolution.css ├── update-camera-zoom.html ├── grab-frame-take-photo.css ├── index.html ├── photo-resolution.html ├── update-camera-zoom.js └── background-blur.html ├── paymentrequest ├── stickersheet │ ├── images │ │ └── example.png │ ├── PR-API-Stickersheet-Chrome_Android-V1.00.sketch │ └── index.html ├── payment-handler │ └── index.html ├── google-pay │ └── index.html ├── free-shipping │ └── index.html ├── can-make-payment │ └── index.html ├── contact-info │ └── index.html ├── shipping-options │ └── index.html └── dynamic-shipping │ └── index.html ├── app-install-banner ├── basic-banner │ ├── launcher-icon-1x.png │ ├── launcher-icon-2x.png │ ├── launcher-icon-3x.png │ ├── launcher-icon-4x.png │ ├── launcher-icon-0-75x.png │ ├── launcher-icon-1-5x.png │ ├── service-worker.js │ ├── readme.md │ └── manifest.json ├── deferred-banner │ ├── launcher-icon-1x.png │ ├── launcher-icon-2x.png │ ├── launcher-icon-3x.png │ ├── launcher-icon-4x.png │ ├── launcher-icon-0-75x.png │ ├── launcher-icon-1-5x.png │ ├── service-worker.js │ ├── readme.md │ └── manifest.json ├── cancelable-banner │ ├── launcher-icon-1x.png │ ├── launcher-icon-2x.png │ ├── launcher-icon-3x.png │ ├── launcher-icon-4x.png │ ├── launcher-icon-0-75x.png │ ├── launcher-icon-1-5x.png │ ├── service-worker.js │ ├── readme.md │ └── manifest.json ├── useraction-banner │ ├── launcher-icon-1x.png │ ├── launcher-icon-2x.png │ ├── launcher-icon-3x.png │ ├── launcher-icon-4x.png │ ├── launcher-icon-0-75x.png │ ├── launcher-icon-1-5x.png │ ├── service-worker.js │ ├── readme.md │ └── manifest.json └── related-applications │ ├── launcher-icon-1x.png │ ├── launcher-icon-2x.png │ ├── launcher-icon-3x.png │ ├── launcher-icon-4x.png │ ├── launcher-icon-0-75x.png │ ├── launcher-icon-1-5x.png │ ├── readme.md │ └── manifest.json ├── allow-popups-to-escape-sandbox ├── iframe.html ├── popup.html └── README.md ├── beacon ├── README.md ├── demo.js └── index.html ├── extended-unicode-escapes └── README.md ├── push-messaging-and-notifications ├── images │ └── icon-192x192.png ├── .eslintrc ├── config.sample.js ├── manifest.sample.json ├── demo.js └── README.md ├── index.html ├── dialog ├── README.md ├── demo.js └── index.html ├── classes-es6 ├── README.md └── index.html ├── css-escape ├── README.md └── demo.js ├── cut-and-copy ├── README.md └── index.html ├── generators └── README.md ├── media-session ├── README.md └── index.html ├── permissions └── README.md ├── web-animations └── README.md ├── arrows-es6 ├── README.md └── index.html ├── cookie-prefixes └── README.md ├── css-hyphens └── README.md ├── css-motion-path ├── README.md └── demo.js ├── file-constructor └── README.md ├── proxies-es6 ├── README.md └── index.html ├── report-validity └── README.md ├── resizeobserver ├── README.md └── demo.js ├── spread-operator └── README.md ├── idb-getall └── README.md ├── multi-column-css └── README.md ├── presentation-api ├── README.md └── receiver │ └── index.html ├── urlsearchparams ├── README.md └── page.css ├── battery-status ├── README.md └── index.html ├── screen-orientation └── README.md ├── css-intrinsic-sizing └── README.md ├── indexeddb-observers ├── README.md └── .eslintrc ├── intersectionobserver ├── README.md └── demo.js ├── touch-action └── README.md ├── async-clipboard ├── README.md └── index.html ├── network-information ├── README.md └── demo.js ├── compute-pressure └── README.md ├── event-istrusted ├── README.md └── demo.js ├── event-timestamp ├── README.md └── demo.js ├── lexical-declarations-es6 └── README.md ├── webaudio-suspend-resume └── README.md ├── image-rendering-pixelated └── README.md ├── input-device-capabilities ├── README.md └── demo.js ├── media ├── controlslist-noplaybackrate.js ├── preload-metadata.js ├── playback-rate-exception.js ├── color-gamut-media-query.js ├── color-gamut-media-query.html ├── opus-in-mp4-for-mse.html ├── flac-in-mp4-for-mse.html ├── error-message.html ├── sourcebuffer-changetype.html ├── flac-in-mp4-for-mse.js ├── opus-in-mp4-for-mse.js └── error-message.js ├── promise-rejection-events └── README.md ├── css-alpha-channel └── README.md ├── css-custom-properties └── README.md ├── play-return-promise ├── README.md ├── demo.js └── index.html ├── webaudio-audiocontext-close └── README.md ├── .gitignore ├── .travis.yml ├── csp-upgrade-insecure-requests └── README.md ├── keyboardevent-code-attribute ├── README.md └── demo.js ├── keyboardevent-key-attribute ├── README.md └── demo.js ├── css-flexbox-abspos └── README.md ├── destructuring-es6 ├── README.md └── index.html ├── extended-object-literals-es6 ├── README.md ├── index.html └── demo.js ├── media-hover-pointer └── README.md ├── mouseevent-get-modifier-state ├── README.md └── demo.js ├── array-includes-es7 ├── README.md └── demo.js ├── rest-parameters-es6 ├── README.md └── index.html ├── template-literals-es6 └── README.md ├── webaudio-audionode-disconnect └── README.md ├── default-parameters-es6 ├── README.md └── index.html ├── focus-navigation-start-point └── README.md ├── webaudio-offlinecontext-rendering └── README.md ├── .eslintrc ├── css-attribute-case-sensitivity └── README.md ├── object-assign-es6 ├── README.md ├── index.html └── demo.js ├── _includes ├── html_snippet.html ├── css_snippet.html └── js_snippet.html ├── css-will-change-transform-rasterization ├── README.md └── demo.js ├── block-modal-dialogs-sandboxed-iframe ├── README.md └── iframe.html ├── package.json ├── formdata-methods ├── README.md └── demo.js ├── event-listeners-mandatory-arguments ├── README.md ├── index.html └── demo.js ├── collections-iterators-es6 ├── README.md └── index.html ├── _config.yml ├── picture-in-picture ├── skip-ad.js └── css-pseudo-class.js ├── media-capabilities └── decoding-info.js ├── web-nfc └── index.html └── hdcp-detection └── index.js /SAMPLE_STARTING_POINT/demo.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /encoding-api/utf8.bin: -------------------------------------------------------------------------------- 1 | Hello! I'm a Unicode string encoded as UTF-8! ☺ -------------------------------------------------------------------------------- /muted-autoplay/styles.css: -------------------------------------------------------------------------------- 1 | video { 2 | max-width: 70%; 3 | } 4 | -------------------------------------------------------------------------------- /computed-properties-es6/README.md: -------------------------------------------------------------------------------- 1 | ES6 Computed Property Names 2 | === 3 | -------------------------------------------------------------------------------- /new-target-es6/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-new": 0 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /font-face-set/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "guard-for-in": 0 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /typedarray-methods-es6/demo2.js: -------------------------------------------------------------------------------- 1 | Uint8Array.of(1, 2, 3, 256 + 4); // [1, 2, 3, 4] 2 | -------------------------------------------------------------------------------- /vibration/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-unused-vars": 0 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /service-worker/prefetch/static/pre_fetched.txt: -------------------------------------------------------------------------------- 1 | I'm a basic file that's been pre-fetched. 2 | -------------------------------------------------------------------------------- /subresource-integrity/correct_hash.css: -------------------------------------------------------------------------------- 1 | #correct { 2 | background-color: #00e300; 3 | } 4 | -------------------------------------------------------------------------------- /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/.DS_Store -------------------------------------------------------------------------------- /fetch-api/users.json: -------------------------------------------------------------------------------- 1 | [ 2 | "Paul", 3 | "Matt", 4 | "Peter", 5 | "Kenji", 6 | "Jeff" 7 | ] -------------------------------------------------------------------------------- /service-worker/prefetch/static/not_pre_fetched.txt: -------------------------------------------------------------------------------- 1 | I'm a file that hasn't been pre-fetched. 2 | -------------------------------------------------------------------------------- /service-worker/window-caches/static/pre_fetched.txt: -------------------------------------------------------------------------------- 1 | I'm a basic file that's been pre-fetched. 2 | -------------------------------------------------------------------------------- /subresource-integrity/incorrect_hash.css: -------------------------------------------------------------------------------- 1 | #incorrect { 2 | background-color: #ff9ca0; 3 | } 4 | -------------------------------------------------------------------------------- /service-worker/registration/service-worker.js: -------------------------------------------------------------------------------- 1 | // This service worker doesn't actually do anything! 2 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | _site/ 2 | vendor/ 3 | service-worker/serviceworker-cache-polyfill.js 4 | decorators-es7/ 5 | -------------------------------------------------------------------------------- /audio/techno.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/audio/techno.wav -------------------------------------------------------------------------------- /css-shapes/cat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/css-shapes/cat.png -------------------------------------------------------------------------------- /images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/images/favicon.ico -------------------------------------------------------------------------------- /notifications/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "worker": true, 4 | "serviceworker": true 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /service-worker/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "worker": true, 4 | "serviceworker": true 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /vibration/demo1.js: -------------------------------------------------------------------------------- 1 | function example1() { 2 | // Vibrate for 500ms 3 | navigator.vibrate([500]); 4 | } 5 | -------------------------------------------------------------------------------- /web-share/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .firebase 3 | .firebaserc 4 | .netlify 5 | *.log 6 | dist 7 | node_modules 8 | -------------------------------------------------------------------------------- /intrinsic-size/cat.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/intrinsic-size/cat.jpg -------------------------------------------------------------------------------- /web-bluetooth/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/web-bluetooth/icon.png -------------------------------------------------------------------------------- /webassembly/image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/webassembly/image.jpg -------------------------------------------------------------------------------- /webassembly/image.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/webassembly/image.wasm -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | gem 'github-pages', '>=39' 3 | gem 'jekyll-sitemap' 4 | 5 | gem "webrick", "~> 1.7" 6 | -------------------------------------------------------------------------------- /encoding-api/macintosh.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/encoding-api/macintosh.bin -------------------------------------------------------------------------------- /quictransport/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/quictransport/screenshot.png -------------------------------------------------------------------------------- /webtransport/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/webtransport/screenshot.png -------------------------------------------------------------------------------- /images/touch/icon-128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/images/touch/icon-128x128.png -------------------------------------------------------------------------------- /muted-autoplay/chrome-clip.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/muted-autoplay/chrome-clip.mp4 -------------------------------------------------------------------------------- /web-share/src/images/audio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/web-share/src/images/audio.png -------------------------------------------------------------------------------- /web-share/src/images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/web-share/src/images/icon.png -------------------------------------------------------------------------------- /web-share/src/images/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/web-share/src/images/image.png -------------------------------------------------------------------------------- /web-share/src/images/video.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/web-share/src/images/video.png -------------------------------------------------------------------------------- /web-share/src/images/splash.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/web-share/src/images/splash.jpg -------------------------------------------------------------------------------- /array-methods-es6/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-unused-vars": 0, 4 | "no-undef": 0, 5 | "space-infix-ops": 0 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /autocapitalize/readme.md: -------------------------------------------------------------------------------- 1 | Auto Capitalize 2 | === 3 | 4 | See https://googlechrome.github.io/samples/autocapitalize/index.html for a live demo. 5 | -------------------------------------------------------------------------------- /fetch-api/users.html: -------------------------------------------------------------------------------- 1 |

Users!

2 | -------------------------------------------------------------------------------- /webaudio-method-chaining/audio.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/webaudio-method-chaining/audio.mp3 -------------------------------------------------------------------------------- /encoding-api/utf16le.bin: -------------------------------------------------------------------------------- 1 | Hello! I'm a Unicode string encoded as UTF-16 (little-endian)! :& -------------------------------------------------------------------------------- /picture-element/images/butterfly.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/picture-element/images/butterfly.jpg -------------------------------------------------------------------------------- /picture-element/images/butterfly.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/picture-element/images/butterfly.webp -------------------------------------------------------------------------------- /quictransport/README.md: -------------------------------------------------------------------------------- 1 | QuicTransport Sample 2 | === 3 | Please see the [WebTransport sample](../webtransport/), as QuicTransport has been renamed. 4 | -------------------------------------------------------------------------------- /service-worker/custom-offline-page/index.js: -------------------------------------------------------------------------------- 1 | if ('serviceWorker' in navigator) { 2 | navigator.serviceWorker.register('service-worker.js'); 3 | } 4 | -------------------------------------------------------------------------------- /service-worker/windowclient-navigate/index.js: -------------------------------------------------------------------------------- 1 | if ('serviceWorker' in navigator) { 2 | navigator.serviceWorker.register('service-worker.js'); 3 | } 4 | -------------------------------------------------------------------------------- /variable-fonts-experiments/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/variable-fonts-experiments/.DS_Store -------------------------------------------------------------------------------- /array-methods-es6/demo2.js: -------------------------------------------------------------------------------- 1 | var divs = document.querySelectorAll('div'); 2 | Array.from(divs).forEach(function(node) { 3 | console.log(node); 4 | }); 5 | -------------------------------------------------------------------------------- /array-methods-es6/demo3.js: -------------------------------------------------------------------------------- 1 | Array.of('hello'); // ["hello"] 2 | Array.of(1, 2, 3); // [1, 2, 3] 3 | Array.of('blink', 182); // ["blink", 182] 4 | -------------------------------------------------------------------------------- /images/apple-touch-icon-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/images/apple-touch-icon-precomposed.png -------------------------------------------------------------------------------- /picture-element/images/kitten-large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/picture-element/images/kitten-large.png -------------------------------------------------------------------------------- /picture-element/images/kitten-medium.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/picture-element/images/kitten-medium.png -------------------------------------------------------------------------------- /picture-element/images/kitten-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/picture-element/images/kitten-small.png -------------------------------------------------------------------------------- /vibration/demo2.js: -------------------------------------------------------------------------------- 1 | function example2() { 2 | // For a single value you can pass in a Number rather than an Array 3 | navigator.vibrate(500); 4 | } 5 | -------------------------------------------------------------------------------- /webaudio-method-chaining/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "globals": { 3 | "webkitAudioContext": true 4 | }, 5 | "rules": { 6 | "new-cap": 0 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /decorators-es7/read-write/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/decorators-es7/read-write/src/favicon.ico -------------------------------------------------------------------------------- /images/touch/chrome-touch-icon-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/images/touch/chrome-touch-icon-192x192.png -------------------------------------------------------------------------------- /picture-element/images/butterfly_small.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/picture-element/images/butterfly_small.jpg -------------------------------------------------------------------------------- /variable-fonts-experiments/fonts/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/variable-fonts-experiments/fonts/.DS_Store -------------------------------------------------------------------------------- /variable-fonts-experiments/styles/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/variable-fonts-experiments/styles/.DS_Store -------------------------------------------------------------------------------- /web-vr/basic-input/images/press-button.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/web-vr/basic-input/images/press-button.jpg -------------------------------------------------------------------------------- /array-methods-es6/demo4.js: -------------------------------------------------------------------------------- 1 | [0, 1, 2, 3, 4].copyWithin(target=4, start=0); // [0, 1, 2, 3, 0] 2 | [0, 1, 2, 3, 4].copyWithin(target=0, start=2); // [2, 3, 4, 3, 4] 3 | -------------------------------------------------------------------------------- /auto-picture-in-picture/launcher-icon-1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/auto-picture-in-picture/launcher-icon-1x.png -------------------------------------------------------------------------------- /auto-picture-in-picture/launcher-icon-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/auto-picture-in-picture/launcher-icon-2x.png -------------------------------------------------------------------------------- /auto-picture-in-picture/launcher-icon-3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/auto-picture-in-picture/launcher-icon-3x.png -------------------------------------------------------------------------------- /auto-picture-in-picture/launcher-icon-4x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/auto-picture-in-picture/launcher-icon-4x.png -------------------------------------------------------------------------------- /variable-fonts-experiments/fonts/Gingham.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/variable-fonts-experiments/fonts/Gingham.woff -------------------------------------------------------------------------------- /variable-fonts-experiments/samples/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/variable-fonts-experiments/samples/.DS_Store -------------------------------------------------------------------------------- /web-application-manifest/launcher-icon-1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/web-application-manifest/launcher-icon-1x.png -------------------------------------------------------------------------------- /web-application-manifest/launcher-icon-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/web-application-manifest/launcher-icon-2x.png -------------------------------------------------------------------------------- /web-application-manifest/launcher-icon-3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/web-application-manifest/launcher-icon-3x.png -------------------------------------------------------------------------------- /web-application-manifest/launcher-icon-4x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/web-application-manifest/launcher-icon-4x.png -------------------------------------------------------------------------------- /auto-picture-in-picture/launcher-icon-0-75x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/auto-picture-in-picture/launcher-icon-0-75x.png -------------------------------------------------------------------------------- /auto-picture-in-picture/launcher-icon-1-5x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/auto-picture-in-picture/launcher-icon-1-5x.png -------------------------------------------------------------------------------- /css-opacity-force-flattening/after-chrome-53.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/css-opacity-force-flattening/after-chrome-53.png -------------------------------------------------------------------------------- /image-capture/update-camera-zoom.css: -------------------------------------------------------------------------------- 1 | video { 2 | background: #263238; 3 | height: 198px; 4 | width: 100%; 5 | } 6 | 7 | input { 8 | width: 100%; 9 | } 10 | -------------------------------------------------------------------------------- /paymentrequest/stickersheet/images/example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/paymentrequest/stickersheet/images/example.png -------------------------------------------------------------------------------- /service-worker/prefetch-video/static/poster.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/service-worker/prefetch-video/static/poster.jpg -------------------------------------------------------------------------------- /variable-fonts-experiments/sketch/designs.sketch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/variable-fonts-experiments/sketch/designs.sketch -------------------------------------------------------------------------------- /web-application-manifest/launcher-icon-0-75x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/web-application-manifest/launcher-icon-0-75x.png -------------------------------------------------------------------------------- /web-application-manifest/launcher-icon-1-5x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/web-application-manifest/launcher-icon-1-5x.png -------------------------------------------------------------------------------- /css-opacity-force-flattening/before-chrome-53.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/css-opacity-force-flattening/before-chrome-53.png -------------------------------------------------------------------------------- /fetch-api/fetch-html-demo.js: -------------------------------------------------------------------------------- 1 | fetch('users.html').then(function(response) { 2 | return response.text(); 3 | }).then(function(body) { 4 | ChromeSamples.log(body); 5 | }); 6 | -------------------------------------------------------------------------------- /images/touch/ms-touch-icon-144x144-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/images/touch/ms-touch-icon-144x144-precomposed.png -------------------------------------------------------------------------------- /app-install-banner/basic-banner/launcher-icon-1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/app-install-banner/basic-banner/launcher-icon-1x.png -------------------------------------------------------------------------------- /app-install-banner/basic-banner/launcher-icon-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/app-install-banner/basic-banner/launcher-icon-2x.png -------------------------------------------------------------------------------- /app-install-banner/basic-banner/launcher-icon-3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/app-install-banner/basic-banner/launcher-icon-3x.png -------------------------------------------------------------------------------- /app-install-banner/basic-banner/launcher-icon-4x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/app-install-banner/basic-banner/launcher-icon-4x.png -------------------------------------------------------------------------------- /array-methods-es6/demo5.js: -------------------------------------------------------------------------------- 1 | [0, 1, 2, 3, 4].copyWithin(target=0, start=3, end=4); // [3, 1, 2, 3, 4] 2 | [0, 1, 2, 3, 4].copyWithin(target=0, start=-2, end=-1); // [3, 1, 2, 3, 4] 3 | -------------------------------------------------------------------------------- /service-worker/basic/icons/ic_folder_black_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/service-worker/basic/icons/ic_folder_black_48dp.png -------------------------------------------------------------------------------- /variable-fonts-experiments/fonts/DecovarAlpha-VF.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/variable-fonts-experiments/fonts/DecovarAlpha-VF.ttf -------------------------------------------------------------------------------- /allow-popups-to-escape-sandbox/iframe.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Open popup.html in a new window 5 | 6 | 7 | -------------------------------------------------------------------------------- /app-install-banner/basic-banner/launcher-icon-0-75x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/app-install-banner/basic-banner/launcher-icon-0-75x.png -------------------------------------------------------------------------------- /app-install-banner/basic-banner/launcher-icon-1-5x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/app-install-banner/basic-banner/launcher-icon-1-5x.png -------------------------------------------------------------------------------- /app-install-banner/deferred-banner/launcher-icon-1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/app-install-banner/deferred-banner/launcher-icon-1x.png -------------------------------------------------------------------------------- /app-install-banner/deferred-banner/launcher-icon-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/app-install-banner/deferred-banner/launcher-icon-2x.png -------------------------------------------------------------------------------- /app-install-banner/deferred-banner/launcher-icon-3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/app-install-banner/deferred-banner/launcher-icon-3x.png -------------------------------------------------------------------------------- /app-install-banner/deferred-banner/launcher-icon-4x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/app-install-banner/deferred-banner/launcher-icon-4x.png -------------------------------------------------------------------------------- /beacon/README.md: -------------------------------------------------------------------------------- 1 | Beacon Sample 2 | === 3 | See https://googlechrome.github.io/samples/beacon for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/5517433905348608 -------------------------------------------------------------------------------- /variable-fonts-experiments/fonts/AmstelvarAlpha-VF.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/variable-fonts-experiments/fonts/AmstelvarAlpha-VF.ttf -------------------------------------------------------------------------------- /app-install-banner/cancelable-banner/launcher-icon-1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/app-install-banner/cancelable-banner/launcher-icon-1x.png -------------------------------------------------------------------------------- /app-install-banner/cancelable-banner/launcher-icon-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/app-install-banner/cancelable-banner/launcher-icon-2x.png -------------------------------------------------------------------------------- /app-install-banner/cancelable-banner/launcher-icon-3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/app-install-banner/cancelable-banner/launcher-icon-3x.png -------------------------------------------------------------------------------- /app-install-banner/cancelable-banner/launcher-icon-4x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/app-install-banner/cancelable-banner/launcher-icon-4x.png -------------------------------------------------------------------------------- /app-install-banner/deferred-banner/launcher-icon-0-75x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/app-install-banner/deferred-banner/launcher-icon-0-75x.png -------------------------------------------------------------------------------- /app-install-banner/deferred-banner/launcher-icon-1-5x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/app-install-banner/deferred-banner/launcher-icon-1-5x.png -------------------------------------------------------------------------------- /app-install-banner/useraction-banner/launcher-icon-1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/app-install-banner/useraction-banner/launcher-icon-1x.png -------------------------------------------------------------------------------- /app-install-banner/useraction-banner/launcher-icon-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/app-install-banner/useraction-banner/launcher-icon-2x.png -------------------------------------------------------------------------------- /app-install-banner/useraction-banner/launcher-icon-3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/app-install-banner/useraction-banner/launcher-icon-3x.png -------------------------------------------------------------------------------- /app-install-banner/useraction-banner/launcher-icon-4x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/app-install-banner/useraction-banner/launcher-icon-4x.png -------------------------------------------------------------------------------- /extended-unicode-escapes/README.md: -------------------------------------------------------------------------------- 1 | Extended Unicode Escapes in Strings Sample 2 | === 3 | See https://googlechrome.github.io/samples/extended-unicode-escapes/index.html for a live demo. 4 | -------------------------------------------------------------------------------- /push-messaging-and-notifications/images/icon-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/push-messaging-and-notifications/images/icon-192x192.png -------------------------------------------------------------------------------- /service-worker/basic/icons/ic_file_upload_black_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/service-worker/basic/icons/ic_file_upload_black_48dp.png -------------------------------------------------------------------------------- /service-worker/basic/icons/ic_folder_open_black_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/service-worker/basic/icons/ic_folder_open_black_48dp.png -------------------------------------------------------------------------------- /service-worker/basic/icons/ic_folder_shared_black_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/service-worker/basic/icons/ic_folder_shared_black_48dp.png -------------------------------------------------------------------------------- /variable-fonts-experiments/variable-fonts-viewer/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/variable-fonts-experiments/variable-fonts-viewer/.DS_Store -------------------------------------------------------------------------------- /vibration/demo4.js: -------------------------------------------------------------------------------- 1 | function stopVibrations() { 2 | // You can also stop an ongoing vibration pattern by specifying a vibration 3 | // length of zero. 4 | navigator.vibrate(0); 5 | } 6 | -------------------------------------------------------------------------------- /app-install-banner/cancelable-banner/launcher-icon-0-75x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/app-install-banner/cancelable-banner/launcher-icon-0-75x.png -------------------------------------------------------------------------------- /app-install-banner/cancelable-banner/launcher-icon-1-5x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/app-install-banner/cancelable-banner/launcher-icon-1-5x.png -------------------------------------------------------------------------------- /app-install-banner/related-applications/launcher-icon-1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/app-install-banner/related-applications/launcher-icon-1x.png -------------------------------------------------------------------------------- /app-install-banner/related-applications/launcher-icon-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/app-install-banner/related-applications/launcher-icon-2x.png -------------------------------------------------------------------------------- /app-install-banner/related-applications/launcher-icon-3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/app-install-banner/related-applications/launcher-icon-3x.png -------------------------------------------------------------------------------- /app-install-banner/related-applications/launcher-icon-4x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/app-install-banner/related-applications/launcher-icon-4x.png -------------------------------------------------------------------------------- /app-install-banner/useraction-banner/launcher-icon-0-75x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/app-install-banner/useraction-banner/launcher-icon-0-75x.png -------------------------------------------------------------------------------- /app-install-banner/useraction-banner/launcher-icon-1-5x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/app-install-banner/useraction-banner/launcher-icon-1-5x.png -------------------------------------------------------------------------------- /image-capture/background-blur.css: -------------------------------------------------------------------------------- 1 | video { 2 | background: #263238; 3 | height: 198px; 4 | width: 100%; 5 | } 6 | 7 | button { 8 | margin: 0 auto; 9 | display: block; 10 | } 11 | -------------------------------------------------------------------------------- /app-install-banner/related-applications/launcher-icon-0-75x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/app-install-banner/related-applications/launcher-icon-0-75x.png -------------------------------------------------------------------------------- /app-install-banner/related-applications/launcher-icon-1-5x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/app-install-banner/related-applications/launcher-icon-1-5x.png -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Redirecting... 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /push-messaging-and-notifications/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "worker": true, 4 | "serviceworker": true 5 | }, 6 | "rules": { 7 | "no-warning-comments": 0 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /service-worker/basic/icons/ic_create_new_folder_black_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/service-worker/basic/icons/ic_create_new_folder_black_48dp.png -------------------------------------------------------------------------------- /service-worker/custom-offline-page/images/launcher-icon-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/service-worker/custom-offline-page/images/launcher-icon-2x.png -------------------------------------------------------------------------------- /service-worker/custom-offline-page/images/launcher-icon-4x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/service-worker/custom-offline-page/images/launcher-icon-4x.png -------------------------------------------------------------------------------- /css-shapes/README.md: -------------------------------------------------------------------------------- 1 | CSS Shapes Level 1 Sample 2 | === 3 | See https://googlechrome.github.io/samples/css-shapes for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/5163890719588352 -------------------------------------------------------------------------------- /dialog/README.md: -------------------------------------------------------------------------------- 1 | Element Sample 2 | === 3 | See https://googlechrome.github.io/samples/dialog/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/5770237022568448 -------------------------------------------------------------------------------- /classes-es6/README.md: -------------------------------------------------------------------------------- 1 | Classes (ES6) Sample 2 | === 3 | See https://googlechrome.github.io/samples/classes-es6/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/4633745457938432 -------------------------------------------------------------------------------- /array-methods-es6/demo6.js: -------------------------------------------------------------------------------- 1 | [0, 1, 2, 3, 4].fill(5); // [5, 5, 5, 5, 5] 2 | [0, 1, 2, 3, 4].fill(5, start=2); // [0, 1, 5, 5, 5] 3 | [0, 1, 2, 3, 4].fill(5, start=2, end=4); // [0, 1, 5, 5, 4] 4 | -------------------------------------------------------------------------------- /css-escape/README.md: -------------------------------------------------------------------------------- 1 | CSS.escape() Sample 2 | === 3 | See https://googlechrome.github.io/samples/css-escape/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/6526863593701376 6 | -------------------------------------------------------------------------------- /cut-and-copy/README.md: -------------------------------------------------------------------------------- 1 | Cut and Copy Sample 2 | === 3 | See https://googlechrome.github.io/samples/cut-and-copy/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/5223997243392000 -------------------------------------------------------------------------------- /encoding-api/README.md: -------------------------------------------------------------------------------- 1 | Encoding API Sample 2 | === 3 | See https://googlechrome.github.io/samples/encoding-api/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/5714368087982080 -------------------------------------------------------------------------------- /picture-element/README.md: -------------------------------------------------------------------------------- 1 | Picture Element Sample 2 | === 3 | See https://googlechrome.github.io/samples/picture-element for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/5910974510923776 6 | -------------------------------------------------------------------------------- /variable-fonts-experiments/samples/SliderDemoMultipleValues/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/variable-fonts-experiments/samples/SliderDemoMultipleValues/.DS_Store -------------------------------------------------------------------------------- /web-share/workbox-config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | globDirectory: 'dist', 3 | globPatterns: ['**/*.{css,html,js,json,png}'], 4 | swDest: 'dist/service-worker.js', 5 | swSrc: 'dist/service-worker.js', 6 | }; 7 | -------------------------------------------------------------------------------- /generators/README.md: -------------------------------------------------------------------------------- 1 | Generators (ES6) Sample 2 | === 3 | See https://googlechrome.github.io/samples/generators/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/4959347197083648 6 | -------------------------------------------------------------------------------- /media-session/README.md: -------------------------------------------------------------------------------- 1 | Media Session Sample 2 | === 3 | See https://googlechrome.github.io/samples/media-session/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/5639924124483584 6 | -------------------------------------------------------------------------------- /new-target-es6/README.md: -------------------------------------------------------------------------------- 1 | new.target Sample 2 | === 3 | See https://googlechrome.github.io/samples/new-target-es6/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/5210159227863040 6 | -------------------------------------------------------------------------------- /permissions/README.md: -------------------------------------------------------------------------------- 1 | Permissions API sample 2 | === 3 | See https://googlechrome.github.io/samples/permissions/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/6376494003650560 6 | -------------------------------------------------------------------------------- /service-worker/basic/styles.css: -------------------------------------------------------------------------------- 1 | #container { 2 | display: flex; 3 | flex-direction: row; 4 | flex-wrap: wrap; 5 | justify-content: space-around; 6 | } 7 | 8 | li { 9 | margin-bottom: 1em; 10 | } 11 | -------------------------------------------------------------------------------- /vibration/README.md: -------------------------------------------------------------------------------- 1 | Vibration API Sample 2 | === 3 | 4 | See https://googlechrome.github.io/samples/vibration/index.html for a live demo. 5 | 6 | Learn more at https://www.chromestatus.com/feature/5698768766763008 7 | -------------------------------------------------------------------------------- /web-animations/README.md: -------------------------------------------------------------------------------- 1 | Web Animations Sample 2 | === 3 | See https://googlechrome.github.io/samples/web-animations/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/4854343836631040 -------------------------------------------------------------------------------- /arrows-es6/README.md: -------------------------------------------------------------------------------- 1 | Arrow functions (ES6) Sample 2 | === 3 | See https://googlechrome.github.io/samples/arrows-es6/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/5047308127305728 6 | -------------------------------------------------------------------------------- /cookie-prefixes/README.md: -------------------------------------------------------------------------------- 1 | Cookie Prefixes Sample 2 | === 3 | See https://googlechrome.github.io/samples/cookie-prefixes/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/4952188392570880 6 | -------------------------------------------------------------------------------- /css-hyphens/README.md: -------------------------------------------------------------------------------- 1 | CSS Hyphens Property Sample 2 | === 3 | See https://googlechrome.github.io/samples/css-hyphens/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/5642121184804864 6 | -------------------------------------------------------------------------------- /css-motion-path/README.md: -------------------------------------------------------------------------------- 1 | CSS Motion Path Sample 2 | === 3 | See https://googlechrome.github.io/samples/css-motion-path/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/6190642178818048 6 | -------------------------------------------------------------------------------- /file-constructor/README.md: -------------------------------------------------------------------------------- 1 | File Constructor Sample 2 | === 3 | See https://googlechrome.github.io/samples/file-constructor/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/5731244088229888 -------------------------------------------------------------------------------- /paymentrequest/stickersheet/PR-API-Stickersheet-Chrome_Android-V1.00.sketch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/paymentrequest/stickersheet/PR-API-Stickersheet-Chrome_Android-V1.00.sketch -------------------------------------------------------------------------------- /proxies-es6/README.md: -------------------------------------------------------------------------------- 1 | 2 | Proxies (ES2015) Sample 3 | === 4 | See https://googlechrome.github.io/samples/proxies-es6/index.html for a live demo. 5 | 6 | Learn more at https://www.chromestatus.com/feature/4811188005240832 7 | -------------------------------------------------------------------------------- /report-validity/README.md: -------------------------------------------------------------------------------- 1 | Report Validity Sample 2 | === 3 | See https://googlechrome.github.io/samples/report-validity/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/5433505009893376 6 | -------------------------------------------------------------------------------- /resizeobserver/README.md: -------------------------------------------------------------------------------- 1 | ResizeObserver Sample 2 | === 3 | See https://googlechrome.github.io/samples/resizeobserver/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/5705346022637568 6 | -------------------------------------------------------------------------------- /spread-operator/README.md: -------------------------------------------------------------------------------- 1 | Spread Calls Sample 2 | === 3 | See https://googlechrome.github.io/samples/spread-operator/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/6031334694715392 6 | -------------------------------------------------------------------------------- /app-install-banner/basic-banner/service-worker.js: -------------------------------------------------------------------------------- 1 | /* 2 | This service worker doesn't actually do anything! 3 | 4 | In the real world, you would add support for Offline or the ability to 5 | handle push messages. 6 | */ 7 | -------------------------------------------------------------------------------- /app-install-banner/deferred-banner/service-worker.js: -------------------------------------------------------------------------------- 1 | /* 2 | This service worker doesn't actually do anything! 3 | 4 | In the real world, you would add support for Offline or the ability to 5 | handle push messages. 6 | */ 7 | -------------------------------------------------------------------------------- /idb-getall/README.md: -------------------------------------------------------------------------------- 1 | IndexedDB getAll() Methods Sample 2 | === 3 | See https://googlechrome.github.io/samples/idb-getall/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/6537756637396992 6 | -------------------------------------------------------------------------------- /multi-column-css/README.md: -------------------------------------------------------------------------------- 1 | Multi-column CSS Sample 2 | === 3 | See https://googlechrome.github.io/samples/multi-column-css/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/6526151266664448 6 | -------------------------------------------------------------------------------- /presentation-api/README.md: -------------------------------------------------------------------------------- 1 | Presentation API Sample 2 | === 3 | See https://googlechrome.github.io/samples/presentation-api/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/6676265876586496 6 | -------------------------------------------------------------------------------- /urlsearchparams/README.md: -------------------------------------------------------------------------------- 1 | URLSearchParams Sample 2 | === 3 | 4 | See https://googlechrome.github.io/samples/urlsearchparams/index.html for a live demo. 5 | 6 | Learn more at https://www.chromestatus.com/feature/5632984866619392 7 | -------------------------------------------------------------------------------- /variable-fonts-experiments/samples/SliderDemoCustomPropVaribleFont/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/variable-fonts-experiments/samples/SliderDemoCustomPropVaribleFont/.DS_Store -------------------------------------------------------------------------------- /webassembly/fib.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | EMSCRIPTEN_KEEPALIVE 4 | int fib(int n) { 5 | int i, t, a = 0, b = 1; 6 | for (i = 0; i < n; i++) { 7 | t = a + b; a = b; b = t; 8 | } 9 | return b; 10 | } 11 | -------------------------------------------------------------------------------- /app-install-banner/cancelable-banner/service-worker.js: -------------------------------------------------------------------------------- 1 | /* 2 | This service worker doesn't actually do anything! 3 | 4 | In the real world, you would add support for Offline or the ability to 5 | handle push messages. 6 | */ 7 | -------------------------------------------------------------------------------- /app-install-banner/useraction-banner/service-worker.js: -------------------------------------------------------------------------------- 1 | /* 2 | This service worker doesn't actually do anything! 3 | 4 | In the real world, you would add support for Offline or the ability to 5 | handle push messages. 6 | */ 7 | -------------------------------------------------------------------------------- /array-methods-es6/demo1.js: -------------------------------------------------------------------------------- 1 | Array.from(new Set([1, 1, 2, 3])); // [1, 2, 3] 2 | Array.from('hello'); // ["h", "e", "l", "l", "o"] 3 | Array.from('hello', x => x.charCodeAt(0)); // [104, 101, 108, 108, 111] 4 | -------------------------------------------------------------------------------- /auto-picture-in-picture/service-worker.js: -------------------------------------------------------------------------------- 1 | self.addEventListener('fetch', function(event) { 2 | console.log(event.request.url); 3 | if (!navigator.onLine) { 4 | event.respondWith(new Response('offline ;(')); 5 | } 6 | }); 7 | -------------------------------------------------------------------------------- /battery-status/README.md: -------------------------------------------------------------------------------- 1 | Battery Status Sample 2 | ===================== 3 | 4 | See https://googlechrome.github.io/samples/battery-status for a live demo. 5 | 6 | Learn more at https://www.chromestatus.com/feature/4537134732017664 7 | -------------------------------------------------------------------------------- /intrinsic-size/README.md: -------------------------------------------------------------------------------- 1 | Intrinsic Size Attribute Sample 2 | === 3 | See https://googlechrome.github.io/samples/intrinsic-size/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/4704436815396864 6 | -------------------------------------------------------------------------------- /screen-orientation/README.md: -------------------------------------------------------------------------------- 1 | Screen Orientation Sample 2 | === 3 | See https://googlechrome.github.io/samples/screen-orientation/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/6191285283061760 6 | -------------------------------------------------------------------------------- /variable-fonts-experiments/samples/SliderDemoCustomPropVaribleFont/Gingham.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patterns/chrome-samples-web-bluetooth/gh-pages/variable-fonts-experiments/samples/SliderDemoCustomPropVaribleFont/Gingham.woff -------------------------------------------------------------------------------- /webassembly/README.md: -------------------------------------------------------------------------------- 1 | WebAssembly sample 2 | === 3 | See https://googlechrome.github.io/samples/webassembly/index.html for a live demo. 4 | 5 | Learn more at https://developers.google.com/web/updates/2018/03/emscripting-a-c-library 6 | -------------------------------------------------------------------------------- /webassembly/fib.wasm: -------------------------------------------------------------------------------- 1 | asm```envSTACKTOP# 0_fib 2 | stackAlloc stackRestore stackSave 3 | a7 AJ@A!A @  j! Aj" G@ ! !    $ # #!# j$#AjApq$  -------------------------------------------------------------------------------- /css-intrinsic-sizing/README.md: -------------------------------------------------------------------------------- 1 | CSS Intrinsic Sizing Sample 2 | === 3 | See https://googlechrome.github.io/samples/css-intrinsic-sizing/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/5901353784180736 6 | -------------------------------------------------------------------------------- /dialog/demo.js: -------------------------------------------------------------------------------- 1 | var dialog = document.querySelector('dialog'); 2 | document.querySelector('#show').onclick = function() { 3 | dialog.show(); 4 | }; 5 | document.querySelector('#close').onclick = function() { 6 | dialog.close(); 7 | }; 8 | -------------------------------------------------------------------------------- /font-face-set/README.md: -------------------------------------------------------------------------------- 1 | CSS Font Loading API's FontFaceSet Sample 2 | === 3 | See https://googlechrome.github.io/samples/font-face-set/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/4594172182921216 6 | -------------------------------------------------------------------------------- /indexeddb-observers/README.md: -------------------------------------------------------------------------------- 1 | IndexedDB observer Sample 2 | === 3 | See https://googlechrome.github.io/samples/indexeddb-observers/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/5669292892749824 6 | -------------------------------------------------------------------------------- /intersectionobserver/README.md: -------------------------------------------------------------------------------- 1 | IntersectionObserver Sample 2 | === 3 | See https://googlechrome.github.io/samples/intersectionobserver/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/5695342691483648 6 | -------------------------------------------------------------------------------- /muted-autoplay/README.md: -------------------------------------------------------------------------------- 1 | Muted Autoplay Sample 2 | ===================== 3 | See https://googlechrome.github.io/samples/muted-autoplay/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/4864052794753024 6 | -------------------------------------------------------------------------------- /touch-action/README.md: -------------------------------------------------------------------------------- 1 | Touch-action pinch-zoom CSS property Sample 2 | === 3 | See https://googlechrome.github.io/samples/touch-action/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/5670200775016448 6 | -------------------------------------------------------------------------------- /async-clipboard/README.md: -------------------------------------------------------------------------------- 1 | Asynchronous Clipboard API Sample 2 | === 3 | 4 | See https://googlechrome.github.io/samples/async-clipboard/index.html for a live demo. 5 | 6 | Learn more at https://www.chromestatus.com/feature/5861289330999296 7 | -------------------------------------------------------------------------------- /image-capture/README.md: -------------------------------------------------------------------------------- 1 | Image Capture Samples 2 | === 3 | See https://googlechrome.github.io/samples/image-capture/index.html to browse all Image Capture samples. 4 | 5 | Learn more at https://www.chromestatus.com/features/4843864737185792 6 | -------------------------------------------------------------------------------- /network-information/README.md: -------------------------------------------------------------------------------- 1 | Network Information API Sample 2 | === 3 | See https://googlechrome.github.io/samples/network-information/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/6338383617982464 6 | -------------------------------------------------------------------------------- /subresource-integrity/README.md: -------------------------------------------------------------------------------- 1 | Subresource Integrity Sample 2 | === 3 | See https://googlechrome.github.io/samples/subresource-integrity/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/6183089948590080 6 | -------------------------------------------------------------------------------- /typedarray-methods-es6/demo1.js: -------------------------------------------------------------------------------- 1 | Uint8Array.from(new Set([1, 1, 2, 3])); // [1, 2, 3] 2 | Uint8Array.from('hello'); // [0, 0, 0, 0, 0] 3 | Uint8Array.from('hello', x => x.charCodeAt(0)); // [104, 101, 108, 108, 111] 4 | -------------------------------------------------------------------------------- /compute-pressure/README.md: -------------------------------------------------------------------------------- 1 | Compute Pressure Sample 2 | ===================== 3 | 4 | See https://googlechrome.github.io/samples/compute-pressure/index.html for a live demo. 5 | 6 | Learn more at https://chromestatus.com/feature/5597608644968448 7 | -------------------------------------------------------------------------------- /event-istrusted/README.md: -------------------------------------------------------------------------------- 1 | Event.isTrusted Sample 2 | ====================== 3 | 4 | See https://googlechrome.github.io/samples/event-istrusted/index.html for a live demo. 5 | 6 | Learn more at https://www.chromestatus.com/feature/6461137440735232 7 | -------------------------------------------------------------------------------- /event-timestamp/README.md: -------------------------------------------------------------------------------- 1 | High Resolution Time Stamp for Events Sample 2 | === 3 | See https://googlechrome.github.io/samples/event-timestamp/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/5523910145605632 6 | -------------------------------------------------------------------------------- /lexical-declarations-es6/README.md: -------------------------------------------------------------------------------- 1 | Lexical Declarations (ES6) Sample 2 | === 3 | See https://googlechrome.github.io/samples/lexical-declarations-es6/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/4645595339816960 -------------------------------------------------------------------------------- /webaudio-suspend-resume/README.md: -------------------------------------------------------------------------------- 1 | WebAudio suspend/resume Sample 2 | === 3 | See https://googlechrome.github.io/samples/webaudio-suspend-resume/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/5664622837235712 6 | -------------------------------------------------------------------------------- /beacon/demo.js: -------------------------------------------------------------------------------- 1 | if ('sendBeacon' in navigator) { 2 | window.addEventListener('pagehide', function() { 3 | navigator.sendBeacon( 4 | 'https://putsreq.herokuapp.com/4GE2nVUuDoDGsNyKES2G', 5 | 'Sent by a beacon!'); 6 | }, false); 7 | } 8 | -------------------------------------------------------------------------------- /image-rendering-pixelated/README.md: -------------------------------------------------------------------------------- 1 | Pixelated Image Rendering Sample 2 | === 3 | 4 | See https://googlechrome.github.io/samples/image-rendering-pixelated/index.html for a live demo. 5 | 6 | Learn more at https://www.chromestatus.com/feature/5118058116939776 -------------------------------------------------------------------------------- /input-device-capabilities/README.md: -------------------------------------------------------------------------------- 1 | Input Device Capabilities Sample 2 | === 3 | See https://googlechrome.github.io/samples/input-device-capabilities/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/5681847971348480 6 | -------------------------------------------------------------------------------- /media/controlslist-noplaybackrate.js: -------------------------------------------------------------------------------- 1 | window.onload = () => { 2 | const video = document.querySelector('video'); 3 | if (!video.controlsList.supports('noplaybackrate')) { 4 | ChromeSamples.log('"noplaybackrate" is not supported.'); 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /promise-rejection-events/README.md: -------------------------------------------------------------------------------- 1 | Promise Rejection Events Sample 2 | === 3 | See https://googlechrome.github.io/samples/promise-rejection-events/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/4805872211460096 6 | -------------------------------------------------------------------------------- /web-application-manifest/README.md: -------------------------------------------------------------------------------- 1 | Web Application Manifest Sample 2 | === 3 | See https://googlechrome.github.io/samples/web-application-manifest/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/6488656873259008 6 | -------------------------------------------------------------------------------- /webaudio-method-chaining/README.md: -------------------------------------------------------------------------------- 1 | Web Audio Method Chaining Sample 2 | === 3 | See https://googlechrome.github.io/samples/webaudio-method-chaining/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/5706033670389760 6 | -------------------------------------------------------------------------------- /css-alpha-channel/README.md: -------------------------------------------------------------------------------- 1 | Alpha Channel Support in CSS Color Parsing Sample 2 | === 3 | See https://googlechrome.github.io/samples/css-alpha-channel/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/5685348285808640 6 | -------------------------------------------------------------------------------- /css-custom-properties/README.md: -------------------------------------------------------------------------------- 1 | CSS Custom Properties (CSS Variables) Sample 2 | === 3 | See https://googlechrome.github.io/samples/css-custom-properties/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/6401356696911872 6 | -------------------------------------------------------------------------------- /indexeddb-observers/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "globals": { 3 | "IDBObserver": true 4 | }, 5 | "rules": { 6 | "radix": 0, 7 | "max-len": 0, 8 | "max-nested-callbacks": 0, 9 | "no-unused-vars": 0, 10 | "no-undef": 0 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /play-return-promise/README.md: -------------------------------------------------------------------------------- 1 | HTMLMediaElement.play() Returns a Promise Sample 2 | === 3 | See https://googlechrome.github.io/samples/play-return-promise/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/5920584248590336 6 | -------------------------------------------------------------------------------- /webaudio-audiocontext-close/README.md: -------------------------------------------------------------------------------- 1 | WebAudio AudioContext close Sample 2 | === 3 | See https://googlechrome.github.io/samples/webaudio-audiocontext-close/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/5411681005993984 -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | _site 2 | .DS_Store 3 | .idea/* 4 | .netlify 5 | .vscode/ 6 | *.iml 7 | *.pyc 8 | certificate.* 9 | dist/ 10 | Gemfile.lock 11 | node_modules 12 | push-messaging-and-notifications/config.js 13 | push-messaging-and-notifications/manifest.json 14 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: ruby 2 | rvm: 3 | - 2.2.2 4 | script: 5 | - npm install 6 | - npm run lint 7 | - bundle exec jekyll build 8 | branches: 9 | only: 10 | - /.*/ 11 | cache: bundler 12 | notifications: 13 | email: false 14 | sudo: false 15 | -------------------------------------------------------------------------------- /csp-upgrade-insecure-requests/README.md: -------------------------------------------------------------------------------- 1 | Upgrade Insecure Requests Sample 2 | === 3 | See https://googlechrome.github.io/samples/csp-upgrade-insecure-requests/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/6534575509471232 6 | -------------------------------------------------------------------------------- /keyboardevent-code-attribute/README.md: -------------------------------------------------------------------------------- 1 | KeyboardEvent code Attribute Sample 2 | === 3 | See https://googlechrome.github.io/samples/keyboardevent-code-attribute/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/5228092293382144 6 | -------------------------------------------------------------------------------- /keyboardevent-key-attribute/README.md: -------------------------------------------------------------------------------- 1 | KeyboardEvent key Attribute Sample 2 | === 3 | See https://googlechrome.github.io/samples/keyboardevent-key-attribute/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/4748790720364544 6 | -------------------------------------------------------------------------------- /service-worker/basic/README.md: -------------------------------------------------------------------------------- 1 | Basic Service Worker Sample 2 | =========================== 3 | See https://googlechrome.github.io/samples/service-worker/basic/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/6561526227927040 6 | -------------------------------------------------------------------------------- /service-worker/prefetch-video/README.md: -------------------------------------------------------------------------------- 1 | Service Worker Video Cache Sample 2 | === 3 | See https://googlechrome.github.io/samples/service-worker/prefetch-video/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/6561526227927040 6 | -------------------------------------------------------------------------------- /web-bluetooth/README.md: -------------------------------------------------------------------------------- 1 | Web Bluetooth Samples 2 | ===================== 3 | 4 | See https://googlechrome.github.io/samples/web-bluetooth/index.html to browse all Web Bluetooth samples. 5 | 6 | Learn more at https://www.chromestatus.com/feature/5264933985976320 7 | -------------------------------------------------------------------------------- /array-methods-es6/demo7.js: -------------------------------------------------------------------------------- 1 | function startsWithLetterA(element, index, array) { 2 | if (element.startsWith('a')) { 3 | return element; 4 | } 5 | } 6 | var cuteNames = ['jeff', 'marc', 'addy', 'francois']; 7 | 8 | cuteNames.find(startsWithLetterA); // "addy" 9 | -------------------------------------------------------------------------------- /array-methods-es6/demo8.js: -------------------------------------------------------------------------------- 1 | function startsWithLetterA(element, index, array) { 2 | if (element.startsWith('a')) { 3 | return element; 4 | } 5 | } 6 | var cuteNames = ['jeff', 'marc', 'addy', 'francois']; 7 | 8 | cuteNames.findIndex(startsWithLetterA); // 2 9 | -------------------------------------------------------------------------------- /css-flexbox-abspos/README.md: -------------------------------------------------------------------------------- 1 | CSS Flexbox: New behavior for absolute-positioned children 2 | === 3 | See https://googlechrome.github.io/samples/css-flexbox-abspos/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/6600926009753600 6 | -------------------------------------------------------------------------------- /destructuring-es6/README.md: -------------------------------------------------------------------------------- 1 | Destructuring (ES2015) Sample 2 | ================================== 3 | See https://googlechrome.github.io/samples/destructuring-es6/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/4588790303686656 6 | -------------------------------------------------------------------------------- /extended-object-literals-es6/README.md: -------------------------------------------------------------------------------- 1 | Extended Object Literals (ES6) Sample 2 | === 3 | See https://googlechrome.github.io/samples/extended-object-literals-es6/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/4873630588600320 6 | -------------------------------------------------------------------------------- /media-hover-pointer/README.md: -------------------------------------------------------------------------------- 1 | 'any-pointer' and 'any-hover' Media Queries Sample 2 | === 3 | 4 | See https://googlechrome.github.io/samples/media-hover-pointer/index.html for a live demo. 5 | 6 | Learn more at https://www.chromestatus.com/feature/6460705494532096 7 | -------------------------------------------------------------------------------- /mouseevent-get-modifier-state/README.md: -------------------------------------------------------------------------------- 1 | MouseEvent.getModifierState() Sample 2 | === 3 | See https://googlechrome.github.io/samples/mouseevent-get-modifier-state/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/5662574238498816 6 | -------------------------------------------------------------------------------- /push-messaging-and-notifications/config.sample.js: -------------------------------------------------------------------------------- 1 | window.GoogleSamples = window.GoogleSamples || {}; 2 | window.GoogleSamples.Config = window.GoogleSamples.Config || { 3 | gcmAPIKey: '' 4 | }; 5 | -------------------------------------------------------------------------------- /service-worker/mock-responses/README.md: -------------------------------------------------------------------------------- 1 | Service Worker Sample: Mock Responses 2 | === 3 | See https://googlechrome.github.io/samples/service-worker/mock-responses/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/6561526227927040 6 | -------------------------------------------------------------------------------- /service-worker/post-message/README.md: -------------------------------------------------------------------------------- 1 | Service Worker Sample: Posting Messages 2 | === 3 | See https://googlechrome.github.io/samples/service-worker/post-message/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/6561526227927040 6 | -------------------------------------------------------------------------------- /service-worker/registration/README.md: -------------------------------------------------------------------------------- 1 | Service Worker Sample: Basic Registration 2 | === 3 | See https://googlechrome.github.io/samples/service-worker/registration/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/6561526227927040 6 | -------------------------------------------------------------------------------- /array-includes-es7/README.md: -------------------------------------------------------------------------------- 1 | Array Method includes (ES7) Sample 2 | ================================== 3 | See https://googlechrome.github.io/samples/array-includes-es7/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/5964420647747584 6 | -------------------------------------------------------------------------------- /rest-parameters-es6/README.md: -------------------------------------------------------------------------------- 1 | Rest parameters (ES2015) Sample 2 | ================================== 3 | See https://googlechrome.github.io/samples/rest-parameters-es6/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/5937087912083456 6 | -------------------------------------------------------------------------------- /service-worker/window-caches/README.md: -------------------------------------------------------------------------------- 1 | Service Worker Sample: Using window.caches 2 | === 3 | See https://googlechrome.github.io/samples/service-worker/window-caches/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/features/5072127703121920 6 | -------------------------------------------------------------------------------- /template-literals-es6/README.md: -------------------------------------------------------------------------------- 1 | 2 | Template Literals (ES6) Sample 3 | === 4 | 5 | See https://googlechrome.github.io/samples/template-literals-es6/index.html for a live demo. 6 | 7 | Learn more at https://www.chromestatus.com/feature/4743002513735680 8 | 9 | 10 | -------------------------------------------------------------------------------- /webaudio-audionode-disconnect/README.md: -------------------------------------------------------------------------------- 1 | WebAudio AudioNode selective disconnect Sample 2 | === 3 | See https://googlechrome.github.io/samples/webaudio-audionode-disconnect/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/4793068276416512 -------------------------------------------------------------------------------- /array-methods-es6/README.md: -------------------------------------------------------------------------------- 1 | Array Methods (ECMAScript 2015) Sample 2 | ====================================== 3 | See https://googlechrome.github.io/samples/array-methods-es6/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/6732923508097024 6 | -------------------------------------------------------------------------------- /keyboardevent-key-attribute/demo.js: -------------------------------------------------------------------------------- 1 | window.addEventListener('keydown', function(event) { 2 | if ('key' in event) { 3 | ChromeSamples.log('KeyboardEvent.key:', event.key); 4 | } else { 5 | ChromeSamples.setStatus('KeyboardEvent.key is not supported.'); 6 | } 7 | }); 8 | -------------------------------------------------------------------------------- /service-worker/fallback-response/README.md: -------------------------------------------------------------------------------- 1 | Service Worker Sample: Fallback Response 2 | === 3 | See https://googlechrome.github.io/samples/service-worker/fallback-response/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/6561526227927040 6 | -------------------------------------------------------------------------------- /service-worker/immediate-control/README.md: -------------------------------------------------------------------------------- 1 | Service Worker Sample: Immediate Control 2 | === 3 | See https://googlechrome.github.io/samples/service-worker/immediate-control/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/6561526227927040 6 | -------------------------------------------------------------------------------- /service-worker/selective-caching/README.md: -------------------------------------------------------------------------------- 1 | Service Worker Sample: Selective Caching 2 | === 3 | See https://googlechrome.github.io/samples/service-worker/selective-caching/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/6561526227927040 6 | -------------------------------------------------------------------------------- /web-bluetooth/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "globals": { 3 | "BluetoothUUID": true, 4 | "log": true 5 | }, 6 | "rules": { 7 | "radix": 0, 8 | "max-len": 0, 9 | "max-nested-callbacks": 0, 10 | "no-unused-vars": 0, 11 | "no-undef": 0 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /default-parameters-es6/README.md: -------------------------------------------------------------------------------- 1 | Default parameters (ES2015) Sample 2 | ================================== 3 | See https://googlechrome.github.io/samples/default-parameters-es6/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/5275456790069248 6 | -------------------------------------------------------------------------------- /fetch-api/fetch-json-demo.js: -------------------------------------------------------------------------------- 1 | fetch('users.json').then(function(response) { 2 | return response.json(); 3 | }).then(function(json) { 4 | ChromeSamples.log('Parsed JSON from the response:', json); 5 | }).catch(function(ex) { 6 | ChromeSamples.log('Parsing failed:', ex); 7 | }); 8 | -------------------------------------------------------------------------------- /focus-navigation-start-point/README.md: -------------------------------------------------------------------------------- 1 | Sequential Focus Navigation Start Point Sample 2 | === 3 | 4 | See https://googlechrome.github.io/samples/focus-navigation-start-point/index.html for a live demo. 5 | 6 | Learn more at https://www.chromestatus.com/features/5671747802103808 7 | -------------------------------------------------------------------------------- /keyboardevent-code-attribute/demo.js: -------------------------------------------------------------------------------- 1 | window.addEventListener('keydown', function(event) { 2 | if ('code' in event) { 3 | ChromeSamples.log('KeyboardEvent.code:', event.code); 4 | } else { 5 | ChromeSamples.setStatus('KeyboardEvent.code is not supported.'); 6 | } 7 | }); 8 | -------------------------------------------------------------------------------- /service-worker/custom-offline-page/README.md: -------------------------------------------------------------------------------- 1 | Service Worker Sample: Custom Offline Page 2 | === 3 | See https://googlechrome.github.io/samples/service-worker/custom-offline-page/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/6561526227927040 6 | -------------------------------------------------------------------------------- /service-worker/multiple-handlers/README.md: -------------------------------------------------------------------------------- 1 | Service Worker Sample: Multiple Fetch Handlers 2 | === 3 | See https://googlechrome.github.io/samples/service-worker/multiple-handlers/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/6561526227927040 6 | -------------------------------------------------------------------------------- /service-worker/prefetch/README.md: -------------------------------------------------------------------------------- 1 | Service Worker Sample: Prefetching Resources During Registration 2 | === 3 | See https://googlechrome.github.io/samples/service-worker/prefetch/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/6561526227927040 6 | -------------------------------------------------------------------------------- /service-worker/registration-events/README.md: -------------------------------------------------------------------------------- 1 | Service Worker Sample: Detailed Registration 2 | === 3 | See https://googlechrome.github.io/samples/service-worker/registration-events/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/6561526227927040 6 | -------------------------------------------------------------------------------- /webaudio-offlinecontext-rendering/README.md: -------------------------------------------------------------------------------- 1 | WebAudio Offline context rendering promise Sample 2 | === 3 | See https://googlechrome.github.io/samples/webaudio-offlinecontext-rendering/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/5692188675538944 -------------------------------------------------------------------------------- /allow-popups-to-escape-sandbox/popup.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

I'm NOT allowed to execute JavaScript.

6 | 7 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /service-worker/foreign-fetch/README.md: -------------------------------------------------------------------------------- 1 | Foreign Fetch Service Worker Sample 2 | =========================== 3 | See https://googlechrome.github.io/samples/service-worker/foreign-fetch/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/5684130679357440 6 | -------------------------------------------------------------------------------- /service-worker/read-through-caching/README.md: -------------------------------------------------------------------------------- 1 | Service Worker Sample: Read-through Caching 2 | === 3 | See https://googlechrome.github.io/samples/service-worker/read-through-caching/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/6561526227927040 6 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "google", 3 | "env": { 4 | "browser": true 5 | }, 6 | "globals": { 7 | "ChromeSamples": true 8 | }, 9 | "rules": { 10 | "arrow-parens": [2, "as-needed"], 11 | "require-jsdoc": 0, 12 | "no-inline-comments": 0 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /service-worker/windowclient-navigate/README.md: -------------------------------------------------------------------------------- 1 | Service Worker Sample: WindowClient.navigate() 2 | === 3 | See https://googlechrome.github.io/samples/service-worker/windowclient-navigate/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/5314750808326144 6 | -------------------------------------------------------------------------------- /typedarray-methods-es6/README.md: -------------------------------------------------------------------------------- 1 | TypedArray Methods (ECMAScript 2015) Sample 2 | =========================================== 3 | See https://googlechrome.github.io/samples/typedarray-methods-es6/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/4919908559224832 6 | -------------------------------------------------------------------------------- /service-worker/offline-analytics/README.md: -------------------------------------------------------------------------------- 1 | Service Worker Sample: Read-through Caching (w/Offline Analytics) 2 | === 3 | See https://googlechrome.github.io/samples/service-worker/offline-analytics/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/6561526227927040 6 | -------------------------------------------------------------------------------- /css-attribute-case-sensitivity/README.md: -------------------------------------------------------------------------------- 1 | Case-insensitive Attribute Selector Matching 2 | ============================================ 3 | See https://googlechrome.github.io/samples/css-attribute-case-sensitivity/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/5610936115134464 6 | -------------------------------------------------------------------------------- /object-assign-es6/README.md: -------------------------------------------------------------------------------- 1 | Object.assign() (ES6) Sample 2 | === 3 | See https://googlechrome.github.io/samples/object-assign-es6/index.html for a live demo. 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /allow-popups-to-escape-sandbox/README.md: -------------------------------------------------------------------------------- 1 | Allow popups to escape sandboxed iframe Sample 2 | ============================================== 3 | See https://googlechrome.github.io/samples/allow-popups-to-escape-sandbox/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/5708368589094912 6 | -------------------------------------------------------------------------------- /css-opacity-force-flattening/README.md: -------------------------------------------------------------------------------- 1 | Force Flattening When Ancestor Has Opacity Sample 2 | ================================================= 3 | See https://googlechrome.github.io/samples/css-opacity-force-flattening/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/5671480339726336 6 | -------------------------------------------------------------------------------- /vibration/demo3.js: -------------------------------------------------------------------------------- 1 | function startPattern() { 2 | // Values at even indices (0, 2, 4, ...) specify vibrations, while the odd 3 | // indices specify pauses. 4 | // Vibrate for 500ms 6 times, pausing for 250ms in between each one. 5 | navigator.vibrate([500, 250, 500, 250, 500, 250, 500, 250, 500, 250, 500]); 6 | } 7 | -------------------------------------------------------------------------------- /urlsearchparams/page.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin-bottom: 2em; 3 | } 4 | .flex { 5 | display: flex; 6 | } 7 | .vertical { 8 | flex-direction: column; 9 | } 10 | input[type="text"] { 11 | padding: 8px; 12 | font-size: 18px; 13 | width: 75px; 14 | margin-right: 18px; 15 | } 16 | #radios { 17 | margin: 16px 0; 18 | } 19 | -------------------------------------------------------------------------------- /_includes/html_snippet.html: -------------------------------------------------------------------------------- 1 | {% if include.html %} 2 | {{ include.html }} 3 | 4 | {% if include.title == null %} 5 |

HTML Snippet

6 | {% elsif include.title != "" %} 7 |

{{ include.title }}

8 | {% endif %} 9 | 10 | {% highlight html %}{{ include.html }}{% endhighlight %} 11 | {% endif %} 12 | -------------------------------------------------------------------------------- /css-will-change-transform-rasterization/README.md: -------------------------------------------------------------------------------- 1 | Rasterization & will-change: transform Sample 2 | ============================================= 3 | See https://googlechrome.github.io/samples/css-will-change-transform-rasterization/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/5637351992721408 6 | -------------------------------------------------------------------------------- /_includes/css_snippet.html: -------------------------------------------------------------------------------- 1 | {% if include.css %} 2 | 3 | 4 | {% if include.title == null %} 5 |

CSS Snippet

6 | {% elsif include.title != "" %} 7 |

{{ include.title }}

8 | {% endif %} 9 | 10 | {% highlight css %}{{ include.css }}{% endhighlight %} 11 | {% endif %} 12 | -------------------------------------------------------------------------------- /block-modal-dialogs-sandboxed-iframe/README.md: -------------------------------------------------------------------------------- 1 | Block modal dialogs inside a sandboxed iframe Sample 2 | ==================================================== 3 | See https://googlechrome.github.io/samples/block-modal-dialogs-sandboxed-iframe/index.html for a live demo. 4 | 5 | Learn more at https://www.chromestatus.com/feature/4747009953103872 6 | -------------------------------------------------------------------------------- /resizeobserver/demo.js: -------------------------------------------------------------------------------- 1 | /* global ResizeObserver */ 2 | 3 | const ro = new ResizeObserver(entries => { 4 | for (let entry of entries) { 5 | entry.target.style.borderRadius = Math.max(0, 250 - entry.contentRect.width) + 'px'; 6 | } 7 | }); 8 | // Only observe the 2nd box 9 | ro.observe(document.querySelector('.box:nth-child(2)')); 10 | -------------------------------------------------------------------------------- /media/preload-metadata.js: -------------------------------------------------------------------------------- 1 | const videowithNoPreload = document.querySelector('#videoWithNoPreload'); 2 | const videowithAutoPreload = document.querySelector('#videoWithNoPreload'); 3 | 4 | log('